Skip to content

agent stop when no tool called #1279

@CoderJzy

Description

@CoderJzy

Please read this first

  • Have you read the docs?Agents SDK docs
  • I have read the docs.
  • Have you searched for related issues? Others may have had similar requests
  • I have searched related issues.

Question

I want to only get the tool result by using Agent, but not the final response with further LLM processing.
And then i studied the docs deeply, I find there is a tool_use_behavior parameter for Agent which have a stop_on_first_tool attribute.
After using the stop_on_first_tool, I found it that agent continues to respond further LLM result when there is no tool called.
How can agent stop when either no tool is called or first tool called?

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