OpenAI DevDay 2026 後、AI Agent の Workflow はどう組む?2026 Decisions API・JSON Tools・Structured Data 実践
2026-09-29 の DevDay が役割分担を決めた。2026-10-22 に Decisions API が GA し、ネイティブ input_json と最大 400 問をサポート。長いツールループは Responses / Agents のまま。モデルは JSON だけを埋め、宿主が decision → tool → structured の順で実行する。
読む前の早見
| 層 | 2026 公式能力 | 宿主の仕事 |
|---|---|---|
| ルート / 分類 | POST /v1/decisions、gpt-6-luna;predicate / choice / score;input_json で ticket + order | choice を次の API にマップ—ここではツールを呼ばない |
| ツールと副作用 | Responses function_call + function_call_output;Computer Use / マルチ agent は Agents API | Schema で arguments を検証し lookup_order を実行、call_id で書き戻す |
| Structured 出力 | Responses text.format json_schema またはツール結果の要約;customer_visible は宿主が保持 | 生の tool output と分離 |
| 状態 | workflow_id、response_id、last_decision;非同期ツールは pending_async リスト | previous_response_id で続行—reasoning 項目を落とさない |
事実は 2026-10-26 時点:Decisions GA(changelog)、Decisions ガイド input_json、DevDay 2026 recap。A-1042、T-8841、wf_demo_3a は架空。
Workflow は「先に決定、次にツール、最後に structured 配送」
DevDay 以前、多くのチームは分類・照会・返信を 1 本の Chat Completions ループに詰め込んでいた。DevDay 以降の公式経路はより明確:bounded な質問は Decisions(ドキュメントは同モデル Responses 比で最大約 10× 速いと記載);副作用のある lookup_order は Responses;長時間ブラウザや sub-agent は Agents API。2026 年 10 月 GA の Decisions は user コンテンツに input_json を置ける—チケットオブジェクトを先に prompt に stringify する必要がない。パイプライン内の「コンテキスト JSON」の置き場所が変わる。
- Decisions:choice / probability / score—route、リスクゲート、escalate 可否。
- Responses tools:function_call で実クエリ;structured output でユーザー向け JSON。
- Agents API:ホストされた harness、Computer Use、tool search—state 書き戻しは依然としてあなたの責任。
何が出荷されたか:DevDay 出荷リスト。フィールド移行:API 移行。Responses と Agents の選び方:Agents と Responses。本稿はワークフロー実践であり「JSON Schema とは」ではない。
Decision → Tool → Output → State
第一歩:長い prompt ではなく構造化証拠を Decisions に載せる。公式例は input_json の data に ticket と order:
{
"model": "gpt-6-luna",
"input": [{
"role": "user",
"content": [
{ "type": "input_text", "text": "Route this ticket using the order record." },
{ "type": "input_json", "data": {
"ticket": { "id": "T-8841", "topic": "billing" },
"order": { "order_id": "A-1042", "status": "paid" }
}}
]
}],
"questions": [{
"type": "choice",
"name": "route",
"instructions": "Pick the next host action. Do not call tools here.",
"choices": [
{ "value": "lookup", "description": "Call lookup_order" },
{ "value": "hold", "description": "Stop and wait" },
{ "value": "escalate", "description": "Hand to a person" }
]
}]
}
第二歩:route が lookup のときだけ Responses にツールを登録。strict を設定;宿主は依然検証:
{
"type": "function",
"name": "lookup_order",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"order_id": { "type": "string", "pattern": "^[A-Z]-\\d{4}$" }
},
"required": ["order_id"],
"additionalProperties": false
}
}
第三歩:モデルは function_call を返す。arguments 文字列を parse し実行、同じ call_id で書き戻す:
{
"type": "function_call",
"call_id": "call_3c91",
"name": "lookup_order",
"arguments": "{\"order_id\":\"A-1042\"}"
}
第四歩:function_call_output の後、もう一ターン Responses で json_schema によりユーザー可視フィールドを出せる:
{
"type": "function_call_output",
"call_id": "call_3c91",
"output": "{\"order_id\":\"A-1042\",\"status\":\"paid\",\"amount\":99.00}"
}
宿主は workflow state で decision、response_id、structured フィールドを束ね、次ターンで route を再推測させない:
{
"workflow_id": "wf_demo_3a",
"step": "after_tool",
"last_decision": { "name": "route", "choice": "lookup" },
"response_id": "resp_9f2b",
"pending_async": [],
"structured": { "customer_visible": "Your order A-1042 is paid." }
}
四つの API 面—パーサーを共有しない
入口を誤ると latency とコストが積み上がる。公式境界で分割:
| 必要なこと | 使う面 |
|---|---|
| 固定集合から次ステップ(lookup / hold / escalate) | Decisions choice;input_json + キャッシュ共有コンテキスト |
| REST 呼び出し、DB、レコード更新 | Responses function_call;遅いツールは async: true + 同じ call_id で output |
| 多段ブラウズ、sub-agent、Computer Use | Agents API;turn_id 書き戻し、function_call_output 形状ではない |
| ユーザー / 下流向け JSON 契約 | Responses structured output または宿主が tool result から schema へマップ |
OpenAI の 2026-10-22 Decisions 投稿は Box の文書ルーティング、Datadog のホットパス shell リスクスコアなどを挙げる—共通点は決定 JSON と実行 JSON の分離。Decisions の choice は lookup 完了ではない。
ゼロからテスト可能な workflow への六手順
本番モデル ID に切り替える前に、staging で架空注文を JSON diff で通す:
- 状態機械を描く。どの遷移が列挙のみ(Decisions)か、ツール副作用(Responses)か。
- input_json 契約を定義。ticket / order フィールド名を固定;CRM エクスポート JSON と揃え JSONPath を容易に。
- ツールと strict を登録。副作用は function 一つ;execute 前に arguments を Schema 検証。
- choice → アクションをマップ。lookup → order_id 付き Responses;escalate → キュー、lookup_order は呼ばない。
- raw と visible を分離。tool output は全量保存;structured.customer_visible は許可フィールドのみ。
- response_id と decision を記録。previous_response_id で続行;各ホップを JSON Diff で監査。
旧 Chat Completions ループを移行するときはモデル名より先に書き戻し形状を変える—移行記事の順序に従い、本リストと入れ替えない。
ローンチ前に三種類の JSON を広げる
典型バグ:choice は escalate なのに function_call が走る、structured に tool output の秘密が混入。
- 整形 で arguments を展開;Schema 検証 で tool と structured の両 schema。
- JSON Diff で Decisions 前後、tool output と customer_visible。
- JSONPath で input_json から
$.order.order_idを取り function_call arguments と一致。 - Decisions が refusal のときツールチェーンを開始しない。
- JSONSort はローカル実行—本番 PII や鍵を貼らない。
三種類が揃って初めて、workflow はあなたの状態機械であり、モデルの API 即興ではない。
よくある誤解
- Responses で純ルーティング。choice で足りる跳躍に tool ラウンドと reasoning token を払わない。
- Decisions でツールを呼んだつもり。questions は答えのみ;実行は宿主側。
- input_json をログダンプ扱い。未定義フィールドはルートを drift—契約を先に固定。
- structured と tool output を同一オブジェクト。ユーザー JSON はより小さく安定。
- Agents と Responses の call_id パーサー混在。書き戻し形状が異なる。
- async の順序無視。遅いツールの output 前に同名 function_call を重複しない。
FAQ
Decisions GA 後も Chat Completions でルーティングすべきか?
新ルーティングは Decisions + gpt-6-luna。レガシー Completions ループは Responses へ(移行記事);ホットパス分類は Decisions 優先。
input_json と prompt への JSON stringify の違いは?
公式は構造化オブジェクトを content part の data に置く—エスケープ誤りが減り、チケットシステムフィールドと一対一で揃う。
Structured output は function_call を置き換えられるか?
いいえ。Structured output はモデル生成 JSON を拘束;照会など副作用は function_call + 宿主実行が必要。
Agents API に Decisions は含まれるか?
製品面は別。Agents は長タスクと Computer Use をホスト;Agents 前に Decisions を gate として呼べる。
400 問制限の影響は誰に?
バッチ QA やログラベル付けは 1 回の Decisions に多問を詰められる;通常サポートルートは 1–3 choice で足りる。
結論
DevDay 2026 以降の Agent workflow はJSON を職責で層分け:Decisions が bounded ルートとスコア、Responses が tools と structured 配送、Agents がホスト長タスク。10 月 GA の input_json がコンテキスト JSON を prompt 文字列から解放する。
新 flow では先に状態機械を描き、四つの JSON テンプレートを埋める。モデルは依然フィールドだけ—照会するかユーザーに何を見せるかは常に宿主の decision。
関連記事
- DevDay 2026 で出荷されたもの Decisions、Agents Computer Use など公式事実
- API 移行 function_call と call_id フィールド
- Agents vs Responses Harness をホストするタイミング
- JSON Schema 検証 arguments と structured 契約
- すべての記事 JSON と AI 開発のメモ
更新履歴: 初公開