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; async 도구는 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는 가상.
워크플로는 먼저 결정, 다음 도구, 마지막 structured 전달
DevDay 이전 많은 팀이 분류·조회·응답을 하나의 Chat Completions 루프에 넣었다. DevDay 이후 공식 분리는 더 분명: bounded 질문은 Decisions(문서는 동일 모델 Responses 대비 최대 ~10× 빠름); 부작용 있는 lookup_order는 Responses; 장기 브라우저·sub-agent는 Agents API. 2026년 10월 GA Decisions는 user content에 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 vs Agents: Agents vs Responses. 이 글은 워크플로 실습이며 JSON Schema 입문이 아니다.
Decision → tool → output → state
1단계: 긴 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" }
]
}]
}
2단계: 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
}
}
3단계: 모델이 function_call 반환. arguments 문자열 parse, 실행, 같은 call_id로 기록:
{
"type": "function_call",
"call_id": "call_3c91",
"name": "lookup_order",
"arguments": "{\"order_id\":\"A-1042\"}"
}
4단계: 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 완료가 아니다.
제로에서 테스트 가능한 워크플로 여섯 단계
프로덕션 모델 ID 전환 전 staging에서 가상 주문으로 JSON diff:
- 상태 기계 그리기. enum만(Decisions) vs 도구 부작용(Responses) 전환.
- input_json 계약 정의. ticket / order 필드명 고정; CRM export JSON과 맞춰 JSONPath.
- 도구와 strict 등록. 부작용당 function 하나; execute 전 arguments Schema 검증.
- choice → 동작 매핑. lookup → order_id 포함 Responses; escalate → 큐, lookup_order 호출 안 함.
- raw vs visible 분리. tool output 전량 저장; structured.customer_visible은 허용 필드만.
- response_id와 decision 기록. previous_response_id로 계속; 각 hop JSON Diff 감사.
구 Chat Completions 루프 마이그레이션: 모델 ID보다 먼저 writeback 형태 변경—마이그레이션 글 순서 따르고 이 목록과 바꾸지 말 것.
출시 전 세 종류 JSON 펼치기
흔한 버그: choice는 escalate인데 function_call 발사, structured에 tool output 비밀 혼입.
- 포맷로 arguments; Schema 검증로 tool·structured schema.
- JSON Diff로 Decisions 전후, tool output vs customer_visible.
- JSONPath로 input_json에서
$.order.order_id, function_call arguments와 일치. - Decisions refusal 시 도구 체인 시작 금지.
- JSONSort 로컬 실행—프로덕션 PII·키 붙이지 말 것.
세 종류가 맞춰져야 워크플로가 당신의 상태 기계이지, 모델의 API 즉흥이 아니다.
흔한 실수
- Responses로 순수 라우팅. choice로 되는 hop에 tool 라운드·reasoning token 낭비 금지.
- Decisions가 도구 호출하는 척. questions는 답만; 실행은 호스트.
- input_json을 덤프처럼. 미문서 필드는 라우트 drift—계약 먼저.
- structured와 tool output 한 객체. 사용자 JSON은 더 작고 안정적.
- Agents·Responses call_id 파서 혼용. writeback 형태 다름.
- async 순서 무시. 느린 도구 output 전 동일 function_call 중복 금지.
FAQ
Decisions GA 후 Chat Completions로 라우팅해야 하나?
새 라우팅은 Decisions + gpt-6-luna. 레거시 Completions는 Responses(마이그레이션); 핫패스 분류는 Decisions 우선.
input_json vs 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·로그 라벨은 Decisions 한 번에 다문항; 일반 지원 라우팅은 1–3 choice면 충분.
결론
DevDay 2026 이후 agent workflow는 JSON을 역할별 층분: Decisions bounded 라우팅·점수, Responses tools·structured, Agents 호스트 장기. 10월 GA input_json이 컨텍스트 JSON을 prompt 문자열에서 해방.
상태 기계 먼저, 네 JSON 템플릿 채우기. 모델은 필드만—조회 여부·사용자 노출은 항상 호스트 decision.
더 읽기
- DevDay 2026 출시 Decisions, Agents Computer Use—공식 사실
- API 마이그레이션 function_call과 call_id 필드
- Agents vs Responses Harness 호스팅 시점
- JSON Schema 검증 arguments·structured 계약
- 모든 글 JSON·AI 개발 메모
변경 이력: 최초 게시