Skip to content

Allow composing Agents as Tools via ComponentTool (input = UserMessage) #9943

@tommyjs007

Description

@tommyjs007

Summary

At the moment, it’s difficult to integrate one Agent as a Tool for another Agent, because agent inputs are based on lists of UserMessage objects rather than simple structured parameters. This makes nested or modular agent setups cumbersome and requires custom wrappers or adapters.

Proposal

Extend the existing ComponentTool so it can accept an Agent as its component argument.
This would allow developers to compose agents naturally using the same ComponentTool pattern already used for other components.

producer_info_tool = ComponentTool(
        component=producer_info_agent,
        description="Use this tool to find producer information by passing producer's name and it's country",
        name="producer_info_tool"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions