openai-agents-python/docs
Javier Leguina dcb88e69cd
docs: custom output extraction (#817)
In deep agent workflows, each sub‐agent automatically performs an LLM
step to summarize its tool calls before returning to its parent. This
leads to:
1. Excessive latency: every nested agent invokes the LLM, compounding
delays.
2. Loss of raw tool data: summaries may strip out details the top‐level
agent needs.

We discovered that `Agent.as_tool(...)` already accepts an
(undocumented) `custom_output_extractor` parameter. By providing a
callback, a parent agent can override what the sub‐agent returns e.g.
hand back raw tool outputs or a custom slice so that only the final
agent does summarization.

---

This PR adds a “Custom output extraction” section to the Markdown docs
under “Agents as tools,” with a minimal code example.
2025-06-09 10:24:51 -04:00
..
assets Tracing screenshot for MCP docs (#355) 2025-03-26 10:56:34 -07:00
ja Add REPL run_demo_loop helper (#811) 2025-06-04 11:53:17 -04:00
models Docs and tests for litellm (#561) 2025-04-21 16:59:01 -04:00
ref Add REPL run_demo_loop helper (#811) 2025-06-04 11:53:17 -04:00
scripts Docs: Switch to o3 model; exclude translated pages from search (#533) 2025-04-16 21:29:09 -04:00
stylesheets Initial commit 2025-03-11 09:42:28 -07:00
voice Update quickstart.md 2025-03-23 17:56:55 -04:00
agents.md Improve translation pipeline details (#475) 2025-04-10 16:54:05 -04:00
config.md Improve translation pipeline details (#475) 2025-04-10 16:54:05 -04:00
context.md fix annotation numbering in context management 2025-03-21 21:10:30 +00:00
examples.md add links and mcp + voice examples (#438) 2025-04-04 19:53:12 -04:00
guardrails.md fix line in guardrails 2025-03-21 15:58:34 -04: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
mcp.md Fix typo: Replace 'two' with 'three' in /docs/mcp.md (#757) 2025-05-30 12:11:10 -04:00
multi_agent.md docs: clarify multi-agent orchestration description 2025-03-11 23:57:03 +01:00
quickstart.md Docs for LiteLLM integration (#532) 2025-04-16 18:54:22 -04:00
release.md Add release documentation (#814) 2025-06-04 16:57:19 -04:00
repl.md Add REPL run_demo_loop helper (#811) 2025-06-04 11:53:17 -04:00
results.md docs: Fix typos in documentation files 2025-03-12 00:12:31 +01:00
running_agents.md Fix reference to group id as session id (#430) 2025-04-03 15:36:35 -04:00
streaming.md Initial commit 2025-03-11 09:42:28 -07:00
tools.md docs: custom output extraction (#817) 2025-06-09 10:24:51 -04:00
tracing.md Add Portkey AI as a tracing provider (#785) 2025-05-29 11:43:25 -04:00
visualization.md Fix visualize graph filename to without extension. (#554) 2025-04-21 13:47:51 -04:00