Skip to content

Make tools as output of an agent #409

Closed as not planned
Closed as not planned
@ShuhangChen1207

Description

@ShuhangChen1207

Hi. It's great honor to use this development framework.

I have one question that is it possible to make tools as the output of an agent ?

For instance, if I transmitted several tools into an agent like this:
agent = Agent(
name="agent",
instructions=(
"You select several tools based on the user's input and the tools transmitted."
"If there is any feedback provided, use it to improve the outline."
),
tools=[tool_1, tool_2, tool_3, tool_4, tool_5, tool_6, tool_7, tool_8]
)
result = await Runner.run(
agent,
input_items
)
Is it possible to let the result.final_output to be some of the tools (like tool_1, tool_4 and tool_7) that I transmitted into the agent?

Glad to see your helpful response !

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDKstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions