Message history for orchestrator agents or agents as tools #763
Replies: 1 comment
-
Hi @rebecca-barton, thanks for reaching out! Setting up multi-agent systems can be a bit difficult, which is why we ship some common multi-agent primitives in our sdk. Like you mentioned, the swarm primitive does share context between its agents. As a simple explanation, you give a swarm some task to work on, and a list of agents to do this work. Each agent is given a handoff tool, in addition to any tools you provide it, so that each agent can hand off work to another agent in the swarm. The process of handing off gives this shared context to the next agent, so they should not need to re-discover information. There are many different implementation of the swarm approach, but give ours a try and let us know what you think! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This seems related to this open question already...
I was wondering how the message history and agent's context works when you are either
What I'm trying to design is a system where you do some data processing and then you make a report. You have two agents that are specialised in each of these tasks with their own system prompts. I want any useful insights gained from the data processing step to be passed to the agent that makes the report so that it doesn't have to re-extract insights that the data processing agent has already "learned".
If you have two separate agents doing this task sequentially then you'd presumably need to pass the message history from the first agent to the second agent? I know you can pass the response from the first agent to the second agent but this contains only the final response rather than the full message history.
However if you have one "main" agent doing this task that can call the data processing agent and the report agent as tools, for example, then I'm unclear if the context gets shared properly? Per the example below as far as I understand it the
agent.messages
object that belongs to the "main" agent does not contain the history of tool calls that were called within the other agents e.g. the data processing agent or the report agent.The page about Swarms seems to suggest context/message history is shared though?
Appreciate any advice on the best way to design this kind of system.
Beta Was this translation helpful? Give feedback.
All reactions