OpenAI Agents SDK — Handoffs
- 最終確認日
- 2026-10-20
- 提供元・モデル・プラン・利用環境
- OpenAI · Python and TypeScript handoffs · agent control transfer
- 記事ID
- GX-0015
要点
OpenAI Agents SDKのHandoffsは、あるagentから別のagentへ会話の制御を移す機構です。handoffはLLMからtoolとして見え、既定では transfer_to_<agent_name> の形式になります。専門agentを元agentの背後でtoolとして呼ぶmanager patternとは異なり、handoffでは受信側agentが会話を引き継ぎます。
どこまで当てはまるか
2026年10月20日時点のauthor-maintained Python/TypeScript Agents SDK documentationでHandoffsは現行機能です。Agentの handoffs にはAgentを直接指定するか、handoff で生成したHandoff objectを指定できます。
詳しく理解する
主要機能
handoff では移行先agent、tool name/description override、on_handoff / onHandoff、input_type / inputType、input_filter / inputFilter、is_enabled / isEnabled 等を構成できます。input_type はhandoff tool callの引数schemaで、model-generated routing metadata用です。既定では受信側agentはそれまでのconversation historyを参照し、転送内容を減らす場合は明示的なinput filterを用います。
セキュリティとプライバシー
is_enabled はモデルへ公開するhandoffを準備する段階で評価されるため、モデルが後から生成するhandoff引数値の認可には使えません。引数値に依存するauthorizationはapplication side effectより前にhandoff callbackで検証します。tool input guardrailsはfunction tools向けでありhandoff自体には適用されません。
History / data exposure boundary
Python SDKの現行documentationではnested handoff historyはopt-in betaで既定無効です。summary化はredactionではなく、tool argumentsやoutputsがsummary textへ残り得ます。server-managed conversations (conversation_id, previous_response_id, auto_previous_response_id) はhandoff input filtersをサポートしません。TypeScript SDK documentationもfiltered handoffでは conversationId / previousResponseId を利用できないと明記しています。
Guardrail / run boundary
Handoffsは単一run内に留まります。input guardrailsはchainの最初のagent、output guardrailsは最終outputを生成するagentに適用されます。途中のcustom function-tool callごとに検査が必要な場合はtool guardrails等を別途配置します。
Source / provenance
- OpenAI Agents SDK (Python), “Handoffs”, live readback 2026-10-20: https://openai.github.io/openai-agents-python/handoffs/
- OpenAI Agents SDK (Python), “Running agents / RunConfig”, live readback 2026-10-20: https://openai.github.io/openai-agents-python/running_agents/
- OpenAI Agents SDK (TypeScript), “Handoffs”, live readback 2026-10-20: https://openai.github.io/openai-agents-js/guides/handoffs/
- OpenAI Agents SDK (TypeScript), Handoff class reference, live readback 2026-10-20: https://openai.github.io/openai-agents-js/openai/agents/classes/handoff/
よくある失敗・反証
handoff先の選択はmodel decisionを含むため完全なrouting guaranteeを仮定しません。
input_typeはapplication stateの正本ではありません。is_enabledはhandoff argument値に依存するauthorizationを代替しません。nested historyやtool-item除去は機密情報のredactionを自動保証しません。
server-managed historyとhandoff filteringには組合せ制約があります。
handoffはworkflow全体のtransaction boundaryではありません。外部side effectは各system of recordでreadbackします。
実務での使い方
handoff destination、tool contract、input schemaをversion管理し、authorizationをmodel routingから分離します。agentごとに必要最小限のhistory/dataだけを渡し、handoff発生、source/destination、validated metadata、authorization result、外部side effectをtraceへ残します。SDK更新時はrouting、history forwarding、guardrail coverage、server-managed conversationとの組合せをregression testします。
まだ確認できていないこと
- opt-in betaであるnested handoff historyの将来のdefault・representation変更時期は固定しません。
- model別のhandoff選択精度はprompt、tool description、model revision、候補destinationに依存するため一律値を断定しません。
- provider内部のtool-selectionやretry policyは公開仕様を超えて推測しません。
根拠資料
この根拠欄には、主張に対応づけて登録された外部出典がありません。本文中の引用・参考資料がある場合は、適用条件や未確認事項とあわせて確認してください。
このページから探す
種類
主題
やりたいこと
読み終えたら、次の判断へ
この記事で確かめた条件を、関連する用語・道具・手段・運用知識に接続して確認できます。実装や更新の判断には、各記事の確認時点・根拠・未確認事項を引き継いでください。
最初の知見から実務判断まで、3つの読み方を見る