Arafat Khan created HDDS-15570:
----------------------------------

             Summary: [Recon-Chatbot] Call Recon methods directly instead of 
using HTTP-calls
                 Key: HDDS-15570
                 URL: https://issues.apache.org/jira/browse/HDDS-15570
             Project: Apache Ozone
          Issue Type: Sub-task
          Components: Ozone Recon
            Reporter: Arafat Khan


h2. Problem

The Recon chatbot runs inside the same JVM as Recon. Making HTTP calls to Recon 
APIs from there adds extra work: building URLs, parsing responses, and 
duplicating logic that Recon already has in code.
h2. Proposal

Since the chatbot and Recon share the same process, the chatbot should call 
Recon methods directly when it needs cluster data the same way Recon’s own code 
would instead of going out over HTTP and back in.

Use LangChain’s native tool-calling support so the LLM picks from a fixed list 
of allowed tools (for example “get datanodes”, “list keys in a bucket”). The 
chatbot then maps each tool name to the right Recon method and runs it directly.
h2. Why this helps
 * Faster and simpler - no HTTP round trip inside the same server
 * Fewer moving parts - less parsing, less error handling for network failures
 * Clearer contract - the LLM chooses a tool; Java runs the matching Recon logic
 * Fits LangChain’s model - tool definitions, tool selection, and tool 
execution in one flow

h2. What stays the same
 * Users still ask questions in natural language
 * Safety rules still apply (allowed tools only, record limits, scoped queries 
where needed)
 * The public Recon REST API for the UI is unchanged

h2. Done when
 * Chatbot fetches Recon data via direct method calls, not HTTP to itself
 * LLM tool selection uses LangChain native tools end to end
 * Existing safety and limits still work



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to