Best practice of passing structured outputs between Agents #346
Unanswered
Jason-AI-lab
asked this question in
Q&A
Replies: 0 comments
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.
-
My question is what is the best practice in Agent-Squad for passing structured outputs between agents (Supervisor <-> team members, and Supervisor <-> Orchestrator)?
Considering a case the orchestrator passes a user query to a supervisor (routed by the classifier), then the supervisor sends the query to a team agent to process. This team agent processes the query and returns the intermediate result in a structured format (JSON or Dict in most case) for the downstream to further process, e.g., the supervisor receives the intermediate result and passes it to another team agent, until the final result is produced and returned to the supervisor. The supervisor generates response on the final result and it gets picked by the classifier and send back the answer to the user (in the orchestrator role) via UI. The UI will be able to display different components in the results by their nature (text, image, or table etc.) [Correct me if there is any misunderstanding in the description on how messages are passed within Agent-Squad under the hood]
I tried to go through the examples in the code repo but didn't find any on how to pass structure data properly. Or if there is any help resources on how to do it I should be aware of? It hard for me to imagine if the passing of structured information between agents all through prompting (It will be too complex and hard to guarantee structured outputs for every call). There should be an explicit way of doing it. Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions