Open
Description
Problem Statement
I would love to be able to pass Agent
objects directly to another Agent
's tool list, implementing the agents-as-tools supervisor multi-agent pattern with a simpler interface.
Currently I am able to implement this by wrapping an Agent in a function and decorating it with @tool
, however that's a bit more effort for me.
Proposed Solution
- Add optional
name
anddescription
parameters to theAgent
class - Allow objects of type
Agent
to be passed to anotherAgent
'stools
list - When
Agent
objects are passed as tools, requirename
anddescription
to be set - Generate a tool specification for
Agent
objects that are passed as tools to anotherAgent
:- Name:
Agent.name
- Description:
Agent.description
- Name:
Considerations:
- Some modes could be useful, for example invoking the sub agent with just a reformatted query by adding a
text
input parameter to the generated tool specification, along with another mode that invokes the sub agent with the full context of the parent agent without rewriting any queries to the sub agent
Use Case
- Agents as tools
- Supervisor multi-agent pattern
Alternatives Solutions
No response
Additional Context
No response