openai-agents-python/docs
Rohan Mehta 6d35c33592
Introduce tool_use_behavior on agents (#203)
## Context
By default, the outputs of tools are sent to the LLM again. The LLM gets
to read the outputs, and produce a new response. There are cases where
this is not desired:
1. Every tool results in another round trip, and sometimes the output of
the tool is enough.
2. If you force tool use (via model settings `tool_choice=required`),
then the agent will just infinite loop.

This enables you to have different behavior, e.g. use the first tool
output as the final output, or write a custom function to process tool
results and potentially produce an output.

## Test plan
Added new tests and ran existing tests
Also added examples.


Closes #117
2025-03-19 12:27:02 -04:00
..
assets Initial commit 2025-03-11 09:42:28 -07:00
ref Initial commit 2025-03-11 09:42:28 -07:00
stylesheets Initial commit 2025-03-11 09:42:28 -07:00
agents.md Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
config.md fix typo 2025-03-12 11:24:12 +08:00
context.md use @function_tool decorator in docs 2025-03-12 11:15:42 -07:00
guardrails.md fix reasoning order in guardrails.md 2025-03-19 11:10:58 +08:00
handoffs.md Initial commit 2025-03-11 09:42:28 -07:00
index.md fix: hyphenated compound adjective real world -> real-world for clarity 2025-03-12 10:48:29 +05:45
models.md Update model docs with common issues 2025-03-13 13:43:18 -04:00
multi_agent.md docs: clarify multi-agent orchestration description 2025-03-11 23:57:03 +01:00
quickstart.md Update quickstart.md 2025-03-12 00:48:29 +00:00
results.md docs: Fix typos in documentation files 2025-03-12 00:12:31 +01:00
running_agents.md fix: replace undefined variable name in documentation code snippet 2025-03-12 15:07:56 +03:00
streaming.md Initial commit 2025-03-11 09:42:28 -07:00
tools.md Initial commit 2025-03-11 09:42:28 -07:00
tracing.md chore: adds Maxim AI to tracing processors (#210) 2025-03-18 09:10:52 -07:00