Skip to content

Commit 799cf3e

Browse files
Clarify that first tool call output is used directly as final result
1 parent 9121ddb commit 799cf3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/agents/agent.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@ class Agent(AgentBase, Generic[TContext]):
205205
This lets you configure how tool use is handled.
206206
- "run_llm_again": The default behavior. Tools are run, and then the LLM receives the results
207207
and gets to respond.
208-
- "stop_on_first_tool": The output of the first tool call is used as the final output. This
209-
means that the LLM does not process the result of the tool call.
208+
- "stop_on_first_tool": The output from the first tool call is treated as the final result.
209+
In other words, it isn’t sent back to the LLM for further processing but is used directly
210+
as the final output.
210211
- A StopAtTools object: The agent will stop running if any of the tools listed in
211212
`stop_at_tool_names` is called.
212213
The final output will be the output of the first matching tool call.

0 commit comments

Comments
 (0)