Hello! I'm trying to chain two actions (from two different agents): Once the first agent has finished their task, they should call directly a second agent, to do a different task (so that the user gets two tasks done at once). However, when the first agent is finished, it just states that it will call the second agent but actually doesn't (the @ doesn't seem to work) Any idea on how to fix it ? 🙏
Thanks Samy Aumar , a few things we can try:
Can you try increasing the number of max steps?
Which model did you use? Can you try with another model?
Did you also add in the instructions when to use which agent?
Currently i'm using GPT 4o Yes, basically I told the agent that once it is done with its first answer, it should call the second one. Trying to increase the number of steps and change the model, will let you know!
Ok now it does this: still says that it will do it, but doesn't actually call the agent, it's still like raw text
(I switched to claude sonnet 4 and 24 max steps)
Can you show what the "tools inspection" panel shows?
Samy Aumar I see only one "agent" tool. You'll probably need to have at least 2 if you want your agent to call 2 different agents 🙂
To clarify, it should call only one agent (the only I linked) 😅
The flow would be:
User calls Agent 1 => the agent answers as they're prompted to. But then after answering they also pull into the conversation agent 2
Agent 2 answers and does their task as well
This would be a time saver as currently in any case users call the two agents, but it makes them do two actions vs. 1 if this works
Oh I see, maybe creating a new meta agent that runs the 2 other agent would work a bit better. Is it something that could work for your use case?
Hmm Ideally I would like to also have the agents available for these individual tasks, but yes my current agent could become a meta one that combines both
how would I go and do this 🤔 ?
You remove the agent tool from this one. You create a new @MetaAgent and you give it 2 "Run agent" tools that you plug to this agent and the other one. You add in the instructions something simple like: "you always run the 2 agents in sequence and share output to user". It should do the trick. People would still be able to call the sub-agents individually.
Remi it worked 🎉 However the task took a much longer time (i would say approx 1 minute) to the meta agent, any tip on how to reduce it?