docs: clarify agent runtime, handoff, HITL, and results flows#2596
Merged
docs: clarify agent runtime, handoff, HITL, and results flows#2596
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the Python documentation to make the SDK's runtime surfaces easier to navigate and reason about across multi-agent workflows. It rewrites the result guide around surface selection instead of a flat property inventory, clarifies handoff input typing and guardrail boundaries, expands the HITL guide around run-wide approvals and resumable flows, and tightens the docs for context, sessions, and model-input shaping so the guides agree on how state moves through a run.
The main changes are in
docs/results.md,docs/human_in_the_loop.md,docs/handoffs.md,docs/context.md, anddocs/agents.md, with supporting clarifications indocs/guardrails.md,docs/running_agents.md,docs/sessions/index.md, and the generated handoff reference docstrings insrc/agents/handoffs/__init__.py.Behavioral/documentation clarifications included in this PR:
handoff(input_type=...)is documented as the handoff tool-call payload schema rather than the next agent's main input.Agent.as_tool()runs, including partial resolution and resume behavior.input,to_input_list(),new_items,raw_responses,last_response_id,agent_tool_invocation, and streaming lifecycle caveats.RunContextWrapperexposes, and clarify when to usesession_input_callbackversuscall_model_input_filter.