generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 428
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Statement
I would like to easily pass an agent as a tool to anther agent with as little boiler plate code as possible.
Proposed Solution
researcher = Agent(system_prompt="You research topics")
manager = Agent(system_prompt="You delegate to the researcher", tools=[researcher.to_tool()])
The to_tool
method returns an AgentTool
instance for invoking an agent as a tool. It will initially take in a single parameter named preserve_context: bool
to determine if each time the agent as a tool is invoked, if the previous conversation context should be wiped or not.
Use Case
Make it easier to use one agent as a tool for another agent.
Alternatives Solutions
researcher = Agent(system_prompt="You research topics")
manager = Agent(system_prompt="You delegate to the researcher", tools=[researcher])
Allow an agent to be passed in directly to the tool array. We can do this as a follow up, but for configuration, we want to have a specific method on the agent class that enables this behavior.
Additional Context
No response
kbreese-x
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request