Replies: 1 comment
-
It would be helpful if you provide code snippets and output to your question |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team,
I'm creating a LangGraph supervisor agent with 2 specialized agents:
Search Agent: Has a tool for searching data from the web
Query Agent: Has 2 tools (database RAG and document RAG)
Expected Behavior
When a query comes in, the supervisor should:
Split the query and route parts to appropriate agents
Get internal data from query agent's tools (from both the tools)
Get external data from search agent if needed
Provide a combined result
Example Query: "Compare the sales for product X for company Y and the overall sales of the product in Canada for Q5"
First part → Query agent (internal data) (from both the tools)
Second part → Search agent (external web data)
Final → Combined comparison result
The Problem
Initially, with simple return statements from tools, everything worked fine. However, after converting the tools to use actual service implementations (RAG service, DB service), the supervisor is looping calls and each tool gets called multiple times, causing:
Workflow to break
Increased expenses
System instability
RAG/DB tools take significant time to process (like 20 seconds or so). I am guessing Supervisor doesn't know the agent is still working
and Supervisor assumes the agent failed and retries. This creates an infinite loop of tool calls. Is there a way to fix this issue.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions