{"id":"b7efeada-9ec5-43d5-b318-3254c97e7f72","shortId":"vT4b2w","kind":"skill","title":"openai-agents","tagline":"Build AI applications with OpenAI Agents SDK - text agents, voice agents, multi-agent handoffs, tools with Zod schemas, guardrails, and streaming. Prevents 11 documented errors.\n\nUse when: building agents with tools, voice agents with WebRTC, multi-agent workflows, or troubleshoo","description":"# OpenAI Agents SDK\n\nBuild AI applications with text agents, voice agents (realtime), multi-agent workflows, tools, guardrails, and human-in-the-loop patterns.\n\n---\n\n## Quick Start\n\n```bash\nnpm install @openai/agents zod@4  # v0.4.0+ requires Zod 4 (breaking change)\nnpm install @openai/agents-realtime  # Voice agents\nexport OPENAI_API_KEY=\"your-key\"\n```\n\n**Breaking Change (v0.4.0)**: Zod 3 no longer supported. Upgrade to `zod@4`.\n\n**Runtimes**: Node.js 22+, Deno, Bun, Cloudflare Workers (experimental)\n\n---\n\n## Core Concepts\n\n**Agents**: LLMs with instructions + tools\n```typescript\nimport { Agent } from '@openai/agents';\nconst agent = new Agent({ name: 'Assistant', tools: [myTool], model: 'gpt-5-mini' });\n```\n\n**Tools**: Functions with Zod schemas\n```typescript\nimport { tool } from '@openai/agents';\nimport { z } from 'zod';\nconst weatherTool = tool({\n  name: 'get_weather',\n  parameters: z.object({ city: z.string() }),\n  execute: async ({ city }) => `Weather in ${city}: sunny`,\n});\n```\n\n**Handoffs**: Multi-agent delegation\n```typescript\nconst triageAgent = Agent.create({ handoffs: [specialist1, specialist2] });\n```\n\n**Guardrails**: Input/output validation\n```typescript\nconst agent = new Agent({ inputGuardrails: [detector], outputGuardrails: [filter] });\n```\n\n**Structured Outputs**: Type-safe responses\n```typescript\nconst agent = new Agent({ outputType: z.object({ sentiment: z.enum(['positive', 'negative']) }) });\n```\n\n---\n\n## Text Agents\n\n**Basic**: `const result = await run(agent, 'What is 2+2?')`\n\n**Streaming**:\n```typescript\nconst stream = await run(agent, 'Tell me a story', { stream: true });\nfor await (const event of stream) {\n  if (event.type === 'raw_model_stream_event') process.stdout.write(event.data?.choices?.[0]?.delta?.content || '');\n}\n```\n\n---\n\n## Multi-Agent Handoffs\n\n```typescript\nconst billingAgent = new Agent({ name: 'Billing', handoffDescription: 'For billing questions', tools: [refundTool] });\nconst techAgent = new Agent({ name: 'Technical', handoffDescription: 'For tech issues', tools: [ticketTool] });\nconst triageAgent = Agent.create({ name: 'Triage', handoffs: [billingAgent, techAgent] });\n```\n\n**Agent-as-Tool Context Isolation**: When using `agent.asTool()`, sub-agents do NOT share parent conversation history (intentional design to simplify debugging).\n\n**Workaround**: Pass context via tool parameters:\n\n```typescript\nconst helperTool = tool({\n  name: 'use_helper',\n  parameters: z.object({\n    query: z.string(),\n    context: z.string().optional(),\n  }),\n  execute: async ({ query, context }) => {\n    return await run(subAgent, `${context}\\n\\n${query}`);\n  },\n});\n```\n\n**Source**: [Issue #806](https://github.com/openai/openai-agents-js/issues/806)\n\n---\n\n## Guardrails\n\n**Input**: Validate before processing\n```typescript\nconst guardrail: InputGuardrail = {\n  execute: async ({ input }) => ({ tripwireTriggered: detectHomework(input) })\n};\nconst agent = new Agent({ inputGuardrails: [guardrail] });\n```\n\n**Output**: Filter responses (PII detection, content safety)\n\n---\n\n## Human-in-the-Loop\n\n```typescript\nconst refundTool = tool({ name: 'process_refund', requiresApproval: true, execute: async ({ amount }) => `Refunded $${amount}` });\n\nlet result = await runner.run(input);\nwhile (result.interruption?.type === 'tool_approval') {\n  result = await promptUser(result.interruption) ? result.state.approve(result.interruption) : result.state.reject(result.interruption);\n}\n```\n\n**Streaming HITL**: When using `stream: true` with `requiresApproval`, must explicitly check interruptions:\n\n```typescript\nconst stream = await run(agent, input, { stream: true });\nlet result = await stream.finalResult();\nwhile (result.interruption?.type === 'tool_approval') {\n  const approved = await promptUser(result.interruption);\n  result = approved\n    ? await result.state.approve(result.interruption)\n    : await result.state.reject(result.interruption);\n}\n```\n\n**Example**: [human-in-the-loop-stream.ts](https://github.com/openai/openai-agents-js/blob/main/examples/agent-patterns/human-in-the-loop-stream.ts)\n\n---\n\n## Realtime Voice Agents\n\n**Create**:\n```typescript\nimport { RealtimeAgent } from '@openai/agents-realtime';\nconst voiceAgent = new RealtimeAgent({\n  voice: 'alloy', // alloy, echo, fable, onyx, nova, shimmer\n  model: 'gpt-5-realtime',\n  tools: [weatherTool],\n});\n```\n\n**Browser Session**:\n```typescript\nimport { RealtimeSession } from '@openai/agents-realtime';\nconst session = new RealtimeSession(voiceAgent, { apiKey: sessionApiKey, transport: 'webrtc' });\nawait session.connect();\n```\n\n**CRITICAL**: Never send OPENAI_API_KEY to browser! Generate ephemeral session tokens server-side.\n\n**Voice Handoffs**: Voice/model must match across agents (cannot change during handoff)\n\n**Limitations**:\n- **Video streaming NOT supported**: Despite camera examples, realtime video streaming is not natively supported. Model may not proactively speak based on video events. ([Issue #694](https://github.com/openai/openai-agents-js/issues/694))\n\n**Templates**:\n- `templates/realtime-agents/realtime-agent-basic.ts`\n- `templates/realtime-agents/realtime-session-browser.tsx`\n- `templates/realtime-agents/realtime-handoffs.ts`\n\n**References**:\n- `references/realtime-transports.md` - WebRTC vs WebSocket\n\n---\n\n## Framework Integration\n\n**Cloudflare Workers** (experimental):\n```typescript\nexport default {\n  async fetch(request: Request, env: Env) {\n    // Disable tracing or use startTracingExportLoop()\n    process.env.OTEL_SDK_DISABLED = 'true';\n\n    process.env.OPENAI_API_KEY = env.OPENAI_API_KEY;\n    const agent = new Agent({ name: 'Assistant', model: 'gpt-5-mini' });\n    const result = await run(agent, (await request.json()).message);\n    return Response.json({ response: result.finalOutput, tokens: result.usage.totalTokens });\n  }\n};\n```\n**Limitations**:\n- No voice agents\n- 30s CPU limit, 128MB memory\n- **Tracing requires manual setup** - set `OTEL_SDK_DISABLED=true` or call `startTracingExportLoop()` ([Issue #16](https://github.com/openai/openai-agents-js/issues/16))\n\n**Next.js**: `app/api/agent/route.ts` → `POST` handler with `run(agent, message)`\n\n**Templates**: `cloudflare-workers/`, `nextjs/`\n\n---\n\n## Error Handling (11+ Errors Prevented)\n\n### 1. Zod Schema Type Errors\n\n**Error**: Type errors with tool parameters.\n\n**Workaround**: Define schemas inline.\n\n```typescript\n// ❌ Can cause type errors\nparameters: mySchema\n\n// ✅ Works reliably\nparameters: z.object({ field: z.string() })\n```\n\n**Note**: As of v0.4.1, invalid JSON in tool call arguments is handled gracefully (previously caused SyntaxError crashes). ([PR #887](https://github.com/openai/openai-agents-js/pull/887))\n\n**Source**: [GitHub #188](https://github.com/openai/openai-agents-js/issues/188)\n\n### 2. MCP Tracing Errors\n\n**Error**: \"No existing trace found\" with MCP servers.\n\n**Workaround**:\n```typescript\nimport { initializeTracing } from '@openai/agents/tracing';\nawait initializeTracing();\n```\n\n**Source**: [GitHub #580](https://github.com/openai/openai-agents-js/issues/580)\n\n### 3. MaxTurnsExceededError\n\n**Error**: Agent loops infinitely.\n\n**Solution**: Increase maxTurns or improve instructions:\n\n```typescript\nconst result = await run(agent, input, {\n  maxTurns: 20, // Increase limit\n});\n\n// Or improve instructions\ninstructions: `After using tools, provide a final answer.\nDo not loop endlessly.`\n```\n\n### 4. ToolCallError\n\n**Error**: Tool execution fails.\n\n**Solution**: Retry with exponential backoff:\n\n```typescript\nfor (let attempt = 1; attempt <= 3; attempt++) {\n  try {\n    return await run(agent, input);\n  } catch (error) {\n    if (error instanceof ToolCallError && attempt < 3) {\n      await sleep(1000 * Math.pow(2, attempt - 1));\n      continue;\n    }\n    throw error;\n  }\n}\n```\n\n### 5. Schema Mismatch\n\n**Error**: Output doesn't match `outputType`.\n\n**Solution**: Use stronger model or add validation instructions:\n\n```typescript\nconst agent = new Agent({\n  model: 'gpt-5', // More reliable than gpt-5-mini\n  instructions: 'CRITICAL: Return JSON matching schema exactly',\n  outputType: mySchema,\n});\n```\n\n### 6. Reasoning Effort Defaults Changed (v0.4.0)\n\n**Error**: Unexpected reasoning behavior after upgrading to v0.4.0.\n\n**Why It Happens**: Default reasoning effort for gpt-5.1/5.2 changed from `\"low\"` to `\"none\"` in v0.4.0.\n\n**Prevention**: Explicitly set reasoning effort if you need it.\n\n```typescript\n// v0.4.0+ - default is now \"none\"\nconst agent = new Agent({\n  model: 'gpt-5.1',\n  reasoning: { effort: 'low' }, // Explicitly set if needed: 'low', 'medium', 'high'\n});\n```\n\n**Source**: [Release v0.4.0](https://github.com/openai/openai-agents-js/releases/tag/v0.4.0) | [PR #876](https://github.com/openai/openai-agents-js/pull/876)\n\n### 7. Reasoning Content Leaks into JSON Output\n\n**Error**: `response_reasoning` field appears in structured output unexpectedly.\n\n**Why It Happens**: Model endpoint issue (not SDK bug) when using `outputType` with reasoning models.\n\n**Workaround**: Filter out `response_reasoning` from output.\n\n```typescript\nconst result = await run(agent, input);\nconst { response_reasoning, ...cleanOutput } = result.finalOutput;\nreturn cleanOutput;\n```\n\n**Source**: [Issue #844](https://github.com/openai/openai-agents-js/issues/844)\n**Status**: Model-side issue, coordinating with OpenAI teams\n\n**All Errors**: See `references/common-errors.md`\n\n**Template**: `templates/shared/error-handling.ts`\n\n---\n\n## Orchestration Patterns\n\n**LLM-Based**: Agent decides routing autonomously (adaptive, higher tokens)\n**Code-Based**: Explicit control flow with conditionals (predictable, lower cost)\n**Parallel**: `Promise.all([run(agent1, text), run(agent2, text)])` (concurrent execution)\n\n---\n\n## Debugging\n\n```typescript\nprocess.env.DEBUG = '@openai/agents:*';  // Verbose logging\nconst result = await run(agent, input);\nconsole.log(result.usage.totalTokens, result.history.length, result.currentAgent?.name);\n```\n\n❌ **Don't use when**:\n- Simple OpenAI API calls (use `openai-api` skill instead)\n- Non-OpenAI models exclusively\n- Production voice at massive scale (consider LiveKit Agents)\n\n---\n\n## Production Checklist\n\n- [ ] Set `OPENAI_API_KEY` as environment secret\n- [ ] Implement error handling for all agent calls\n- [ ] Add guardrails for safety-critical applications\n- [ ] Enable tracing for debugging\n- [ ] Set reasonable `maxTurns` to prevent runaway costs\n- [ ] Use `gpt-5-mini` where possible for cost efficiency\n- [ ] Implement rate limiting\n- [ ] Log token usage for cost monitoring\n- [ ] Test handoff flows thoroughly\n- [ ] Never expose API keys to browsers (use session tokens)\n\n---\n\n## Token Efficiency\n\n**Estimated Savings**: ~60%\n\n| Task | Without Skill | With Skill | Savings |\n|------|---------------|------------|---------|\n| Multi-agent setup | ~12k tokens | ~5k tokens | 58% |\n| Voice agent | ~10k tokens | ~4k tokens | 60% |\n| Error debugging | ~8k tokens | ~3k tokens | 63% |\n| **Average** | **~10k** | **~4k** | **~60%** |\n\n**Errors Prevented**: 11 documented issues = 100% error prevention\n\n---\n\n## Templates Index\n\n**Text Agents** (8):\n1. `agent-basic.ts` - Simple agent with tools\n2. `agent-handoffs.ts` - Multi-agent triage\n3. `agent-structured-output.ts` - Zod schemas\n4. `agent-streaming.ts` - Real-time events\n5. `agent-guardrails-input.ts` - Input validation\n6. `agent-guardrails-output.ts` - Output filtering\n7. `agent-human-approval.ts` - HITL pattern\n8. `agent-parallel.ts` - Concurrent execution\n\n**Realtime Agents** (3):\n9. `realtime-agent-basic.ts` - Voice setup\n10. `realtime-session-browser.tsx` - React client\n11. `realtime-handoffs.ts` - Voice delegation\n\n**Framework Integration** (4):\n12. `worker-text-agent.ts` - Cloudflare Workers\n13. `worker-agent-hono.ts` - Hono framework\n14. `api-agent-route.ts` - Next.js API\n15. `api-realtime-route.ts` - Next.js voice\n\n**Utilities** (2):\n16. `error-handling.ts` - Comprehensive errors\n17. `tracing-setup.ts` - Debugging\n\n---\n\n## References\n\n1. `agent-patterns.md` - Orchestration strategies\n2. `common-errors.md` - 9 errors with workarounds\n3. `realtime-transports.md` - WebRTC vs WebSocket\n4. `cloudflare-integration.md` - Workers limitations\n5. `official-links.md` - Documentation links\n\n---\n\n## Official Resources\n\n- **Docs**: https://openai.github.io/openai-agents-js/\n- **GitHub**: https://github.com/openai/openai-agents-js\n- **npm**: https://www.npmjs.com/package/@openai/agents\n- **Issues**: https://github.com/openai/openai-agents-js/issues\n\n---\n\n**Version**: SDK v0.4.1\n**Last Verified**: 2026-01-21\n**Skill Author**: Jeremy Dawes (Jezweb)\n**Production Tested**: Yes\n**Changes**: Added v0.4.0 breaking changes (Zod 4, reasoning defaults), invalid JSON handling (v0.4.1), reasoning output leaks, streaming HITL pattern, agent-as-tool context isolation, video limitations, Cloudflare tracing setup","tags":["openai","agents","coco","rkz91","agent-skills","agents-md","ai-agents","claude-code","codex","cursor","developer-tools","llm-tools"],"capabilities":["skill","source-rkz91","skill-openai-agents","topic-agent-skills","topic-agents-md","topic-ai-agents","topic-claude-code","topic-codex","topic-cursor","topic-developer-tools","topic-llm-tools","topic-mcp","topic-pm-tools","topic-product-management","topic-productivity"],"categories":["coco"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/rkz91/coco/openai-agents","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add rkz91/coco","source_repo":"https://github.com/rkz91/coco","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (12,789 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:07.814Z","embedding":null,"createdAt":"2026-05-18T13:21:40.387Z","updatedAt":"2026-05-18T19:14:07.814Z","lastSeenAt":"2026-05-18T19:14:07.814Z","tsv":"'+2':224 '-01':1345 '-21':1346 '-5':139,490,613,860,865,1136 '-5.1':898,928 '/5.2':899 '/openai-agents-js/':1326 '/openai/openai-agents-js':1330 '/openai/openai-agents-js/blob/main/examples/agent-patterns/human-in-the-loop-stream.ts)':466 '/openai/openai-agents-js/issues':1338 '/openai/openai-agents-js/issues/16))':654 '/openai/openai-agents-js/issues/188)':728 '/openai/openai-agents-js/issues/580)':754 '/openai/openai-agents-js/issues/694))':566 '/openai/openai-agents-js/issues/806)':353 '/openai/openai-agents-js/issues/844)':1007 '/openai/openai-agents-js/pull/876)':949 '/openai/openai-agents-js/pull/887))':722 '/openai/openai-agents-js/releases/tag/v0.4.0)':944 '/package/@openai/agents':1334 '0':253 '1':673,808,832,1216,1298 '10':1261 '100':1208 '1000':828 '10k':1187,1200 '11':27,670,1205,1265 '12':1272 '128mb':636 '12k':1180 '13':1276 '14':1280 '15':1284 '16':651,1290 '17':1294 '188':725 '2':223,729,830,1222,1289,1302 '20':775 '2026':1344 '22':111 '3':101,755,810,825,1228,1256,1308 '30s':633 '3k':1196 '4':78,82,108,793,1232,1271,1313,1361 '4k':1189,1201 '5':836,1238,1317 '58':1184 '580':751 '5k':1182 '6':876,1242 '60':1169,1191,1202 '63':1198 '694':563 '7':950,1246 '8':1215,1250 '806':350 '844':1004 '876':946 '887':719 '8k':1194 '9':1257,1304 'across':532 'ad':1356 'adapt':1032 'add':850,1116 'agent':3,9,12,14,17,33,37,42,47,54,56,60,89,119,126,130,132,175,189,191,204,206,214,220,231,258,264,276,294,304,370,372,436,469,533,606,608,619,632,661,758,772,816,855,857,923,925,993,1028,1066,1099,1114,1178,1186,1214,1219,1226,1255,1375 'agent-as-tool':293,1374 'agent-basic.ts':1217 'agent-guardrails-input.ts':1239 'agent-guardrails-output.ts':1243 'agent-handoffs.ts':1223 'agent-human-approval.ts':1247 'agent-parallel.ts':1251 'agent-patterns.md':1299 'agent-streaming.ts':1233 'agent-structured-output.ts':1229 'agent.astool':301 'agent.create':180,287 'agent1':1049 'agent2':1052 'ai':5,50 'alloy':481,482 'amount':398,400 'answer':788 'api':92,516,600,603,1079,1084,1104,1158,1283 'api-agent-route.ts':1281 'api-realtime-route.ts':1285 'apikey':506 'app/api/agent/route.ts':656 'appear':961 'applic':6,51,1122 'approv':410,448,450,455 'argument':710 'assist':134,610 'async':166,337,364,397,584 'attempt':807,809,811,824,831 'author':1348 'autonom':1031 'averag':1199 'await':218,229,239,341,403,412,434,442,451,456,459,510,617,620,747,770,814,826,991,1064 'backoff':803 'base':558,1027,1037 'bash':73 'basic':215 'behavior':885 'bill':266,269 'billingag':262,291 'break':83,97,1358 'browser':494,519,1161 'bug':974 'build':4,32,49 'bun':113 'call':648,709,1080,1115 'camera':544 'cannot':534 'catch':818 'caus':690,715 'chang':84,98,535,880,900,1355,1359 'check':429 'checklist':1101 'choic':252 'citi':163,167,170 'cleanoutput':998,1001 'client':1264 'cloudflar':114,578,665,1274,1382 'cloudflare-integration.md':1314 'cloudflare-work':664 'code':1036 'code-bas':1035 'common-errors.md':1303 'comprehens':1292 'concept':118 'concurr':1054,1252 'condit':1042 'consid':1097 'console.log':1068 'const':129,155,178,188,203,216,227,240,261,273,285,323,360,369,388,432,449,476,501,605,615,768,854,922,989,995,1062 'content':255,380,952 'context':297,318,333,339,344,1378 'continu':833 'control':1039 'convers':309 'coordin':1013 'core':117 'cost':1045,1133,1141,1150 'cpu':634 'crash':717 'creat':470 'critic':512,868,1121 'daw':1350 'debug':315,1056,1126,1193,1296 'decid':1029 'default':583,879,893,918,1363 'defin':685 'deleg':176,1268 'delta':254 'deno':112 'design':312 'despit':543 'detect':379 'detecthomework':367 'detector':193 'disabl':590,597,645 'doc':1323 'document':28,1206,1319 'doesn':841 'echo':483 'effici':1142,1166 'effort':878,895,911,930 'enabl':1123 'endless':792 'endpoint':970 'env':588,589 'env.openai':602 'environ':1107 'ephemer':521 'error':29,668,671,677,678,680,692,732,733,757,795,819,821,835,839,882,957,1018,1110,1192,1203,1209,1293,1305 'error-handling.ts':1291 'estim':1167 'event':241,249,561,1237 'event.data':251 'event.type':245 'exact':873 'exampl':462,545 'exclus':1091 'execut':165,336,363,396,797,1055,1253 'exist':735 'experiment':116,580 'explicit':428,908,932,1038 'exponenti':802 'export':90,582 'expos':1157 'fabl':484 'fail':798 'fetch':585 'field':699,960 'filter':195,376,982,1245 'final':787 'flow':1040,1154 'found':737 'framework':576,1269,1279 'function':142 'generat':520 'get':159 'github':724,750,1327 'github.com':352,465,565,653,721,727,753,943,948,1006,1329,1337 'github.com/openai/openai-agents-js':1328 'github.com/openai/openai-agents-js/blob/main/examples/agent-patterns/human-in-the-loop-stream.ts)':464 'github.com/openai/openai-agents-js/issues':1336 'github.com/openai/openai-agents-js/issues/16))':652 'github.com/openai/openai-agents-js/issues/188)':726 'github.com/openai/openai-agents-js/issues/580)':752 'github.com/openai/openai-agents-js/issues/694))':564 'github.com/openai/openai-agents-js/issues/806)':351 'github.com/openai/openai-agents-js/issues/844)':1005 'github.com/openai/openai-agents-js/pull/876)':947 'github.com/openai/openai-agents-js/pull/887))':720 'github.com/openai/openai-agents-js/releases/tag/v0.4.0)':942 'gpt':138,489,612,859,864,897,927,1135 'grace':713 'guardrail':23,63,184,354,361,374,1117 'handl':669,712,1111,1366 'handler':658 'handoff':18,172,181,259,290,528,537,1153 'handoffdescript':267,279 'happen':892,968 'helper':328 'helpertool':324 'high':938 'higher':1033 'histori':310 'hitl':420,1248,1372 'hono':1278 'human':66,383 'human-in-the-loop':65,382 'human-in-the-loop-stream.ts':463 'implement':1109,1143 'import':125,147,151,472,497,743 'improv':765,779 'increas':762,776 'index':1212 'infinit':760 'initializetrac':744,748 'inlin':687 'input':355,365,368,405,437,773,817,994,1067,1240 'input/output':185 'inputguardrail':192,362,373 'instal':75,86 'instanceof':822 'instead':1086 'instruct':122,766,780,781,852,867 'integr':577,1270 'intent':311 'interrupt':430 'invalid':705,1364 'isol':298,1379 'issu':282,349,562,650,971,1003,1012,1207,1335 'jeremi':1349 'jezweb':1351 'json':706,870,955,1365 'key':93,96,517,601,604,1105,1159 'last':1342 'leak':953,1370 'let':401,440,806 'limit':538,629,635,777,1145,1316,1381 'link':1320 'livekit':1098 'llm':1026 'llm-base':1025 'llms':120 'log':1061,1146 'longer':103 'loop':69,386,759,791 'low':902,931,936 'lower':1044 'manual':640 'massiv':1095 'match':531,843,871 'math.pow':829 'maxturn':763,774,1129 'maxturnsexceedederror':756 'may':554 'mcp':730,739 'medium':937 'memori':637 'messag':622,662 'mini':140,614,866,1137 'mismatch':838 'model':137,247,488,553,611,848,858,926,969,980,1010,1090 'model-sid':1009 'monitor':1151 'multi':16,41,59,174,257,1177,1225 'multi-ag':15,40,58,173,256,1176,1224 'must':427,530 'myschema':694,875 'mytool':136 'n':345,346 'name':133,158,265,277,288,326,391,609,1072 'nativ':551 'need':914,935 'negat':212 'never':513,1156 'new':131,190,205,263,275,371,478,503,607,856,924 'next.js':655,1282,1286 'nextj':667 'node.js':110 'non':1088 'non-openai':1087 'none':904,921 'note':701 'nova':486 'npm':74,85,1331 'offici':1321 'official-links.md':1318 'onyx':485 'openai':2,8,46,91,515,1015,1078,1083,1089,1103 'openai-ag':1 'openai-api':1082 'openai.github.io':1325 'openai.github.io/openai-agents-js/':1324 'openai/agents':76,128,150,1059 'openai/agents-realtime':87,475,500 'openai/agents/tracing':746 'option':335 'orchestr':1023,1300 'otel':643 'output':197,375,840,956,964,987,1244,1369 'outputguardrail':194 'outputtyp':207,844,874,977 'parallel':1046 'paramet':161,321,329,683,693,697 'parent':308 'pass':317 'pattern':70,1024,1249,1373 'pii':378 'posit':211 'possibl':1139 'post':657 'pr':718,945 'predict':1043 'prevent':26,672,907,1131,1204,1210 'previous':714 'proactiv':556 'process':358,392 'process.env.debug':1058 'process.env.openai':599 'process.env.otel':595 'process.stdout.write':250 'product':1092,1100,1352 'promise.all':1047 'promptus':413,452 'provid':785 'queri':331,338,347 'question':270 'quick':71 'rate':1144 'raw':246 'react':1263 'real':1235 'real-tim':1234 'realtim':57,467,491,546,1254 'realtime-agent-basic.ts':1258 'realtime-handoffs.ts':1266 'realtime-session-browser.tsx':1262 'realtime-transports.md':1309 'realtimeag':473,479 'realtimesess':498,504 'reason':877,884,894,910,929,951,959,979,985,997,1128,1362,1368 'refer':571,1297 'references/common-errors.md':1020 'references/realtime-transports.md':572 'refund':393,399 'refundtool':272,389 'releas':940 'reliabl':696,862 'request':586,587 'request.json':621 'requir':80,639 'requiresapprov':394,426 'resourc':1322 'respons':201,377,625,958,984,996 'response.json':624 'result':217,402,411,441,454,616,769,990,1063 'result.currentagent':1071 'result.finaloutput':626,999 'result.history.length':1070 'result.interruption':407,414,416,418,445,453,458,461 'result.state.approve':415,457 'result.state.reject':417,460 'result.usage.totaltokens':628,1069 'retri':800 'return':340,623,813,869,1000 'rout':1030 'run':219,230,342,435,618,660,771,815,992,1048,1051,1065 'runaway':1132 'runner.run':404 'runtim':109 'safe':200 'safeti':381,1120 'safety-crit':1119 'save':1168,1175 'scale':1096 'schema':22,145,675,686,837,872,1231 'sdk':10,48,596,644,973,1340 'secret':1108 'see':1019 'send':514 'sentiment':209 'server':525,740 'server-sid':524 'session':495,502,522,1163 'session.connect':511 'sessionapikey':507 'set':642,909,933,1102,1127 'setup':641,1179,1260,1384 'share':307 'shimmer':487 'side':526,1011 'simpl':1077,1218 'simplifi':314 'skill':1085,1172,1174,1347 'skill-openai-agents' 'sleep':827 'solut':761,799,845 'sourc':348,723,749,939,1002 'source-rkz91' 'speak':557 'specialist1':182 'specialist2':183 'start':72 'starttracingexportloop':594,649 'status':1008 'stori':235 'strategi':1301 'stream':25,225,228,236,243,248,419,423,433,438,540,548,1371 'stream.finalresult':443 'stronger':847 'structur':196,963 'sub':303 'sub-ag':302 'subag':343 'sunni':171 'support':104,542,552 'syntaxerror':716 'task':1170 'team':1016 'tech':281 'techag':274,292 'technic':278 'tell':232 'templat':567,663,1021,1211 'templates/realtime-agents/realtime-agent-basic.ts':568 'templates/realtime-agents/realtime-handoffs.ts':570 'templates/realtime-agents/realtime-session-browser.tsx':569 'templates/shared/error-handling.ts':1022 'test':1152,1353 'text':11,53,213,1050,1053,1213 'thorough':1155 'throw':834 'tickettool':284 'time':1236 'token':523,627,1034,1147,1164,1165,1181,1183,1188,1190,1195,1197 'tool':19,35,62,123,135,141,148,157,271,283,296,320,325,390,409,447,492,682,708,784,796,1221,1377 'toolcallerror':794,823 'topic-agent-skills' 'topic-agents-md' 'topic-ai-agents' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-developer-tools' 'topic-llm-tools' 'topic-mcp' 'topic-pm-tools' 'topic-product-management' 'topic-productivity' 'trace':591,638,731,736,1124,1383 'tracing-setup.ts':1295 'transport':508 'tri':812 'triag':289,1227 'triageag':179,286 'tripwiretrigg':366 'troubleshoo':45 'true':237,395,424,439,598,646 'type':199,408,446,676,679,691 'type-saf':198 'typescript':124,146,177,187,202,226,260,322,359,387,431,471,496,581,688,742,767,804,853,916,988,1057 'unexpect':883,965 'upgrad':105,887 'usag':1148 'use':30,300,327,422,593,783,846,976,1075,1081,1134,1162 'util':1288 'v0.4.0':79,99,881,889,906,917,941,1357 'v0.4.1':704,1341,1367 'valid':186,356,851,1241 'verbos':1060 'verifi':1343 'version':1339 'via':319 'video':539,547,560,1380 'voic':13,36,55,88,468,480,527,631,1093,1185,1259,1267,1287 'voice/model':529 'voiceag':477,505 'vs':574,1311 'weather':160,168 'weathertool':156,493 'webrtc':39,509,573,1310 'websocket':575,1312 'without':1171 'work':695 'workaround':316,684,741,981,1307 'worker':115,579,666,1275,1315 'worker-agent-hono.ts':1277 'worker-text-agent.ts':1273 'workflow':43,61 'www.npmjs.com':1333 'www.npmjs.com/package/@openai/agents':1332 'yes':1354 'your-key':94 'z':152 'z.enum':210 'z.object':162,208,330,698 'z.string':164,332,334,700 'zod':21,77,81,100,107,144,154,674,1230,1360","prices":[{"id":"3fe5e1d2-6b74-4d57-9e2a-25fc2ad558e0","listingId":"b7efeada-9ec5-43d5-b318-3254c97e7f72","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"rkz91","category":"coco","install_from":"skills.sh"},"createdAt":"2026-05-18T13:21:40.387Z"}],"sources":[{"listingId":"b7efeada-9ec5-43d5-b318-3254c97e7f72","source":"github","sourceId":"rkz91/coco/openai-agents","sourceUrl":"https://github.com/rkz91/coco/tree/main/skills/openai-agents","isPrimary":false,"firstSeenAt":"2026-05-18T13:21:40.387Z","lastSeenAt":"2026-05-18T19:14:07.814Z"}],"details":{"listingId":"b7efeada-9ec5-43d5-b318-3254c97e7f72","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"rkz91","slug":"openai-agents","github":{"repo":"rkz91/coco","stars":7,"topics":["agent-skills","agents-md","ai","ai-agents","claude-code","codex","cursor","developer-tools","llm-tools","mcp","pm-tools","product-management","productivity","prompt-engineering","workflow-automation"],"license":"mit","html_url":"https://github.com/rkz91/coco","pushed_at":"2026-04-26T01:51:27Z","description":"Open-source library of AI superpowers — 59 skills, 34 commands, 10 agents + 24 GSD subagents, 3 system bundles. An entire team, wherever your AI lives. Vendor-neutral across Claude Code, Cursor, Codex, and any AGENTS.md tool.","skill_md_sha":"67d0aa547c58933d158a1562fc07fb3ab619e0c9","skill_md_path":"skills/openai-agents/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/rkz91/coco/tree/main/skills/openai-agents"},"layout":"multi","source":"github","category":"coco","frontmatter":{"name":"openai-agents","description":"Build AI applications with OpenAI Agents SDK - text agents, voice agents, multi-agent handoffs, tools with Zod schemas, guardrails, and streaming. Prevents 11 documented errors.\n\nUse when: building agents with tools, voice agents with WebRTC, multi-agent workflows, or troubleshooting MaxTurnsExceededError, tool call failures, reasoning defaults, JSON output leaks."},"skills_sh_url":"https://skills.sh/rkz91/coco/openai-agents"},"updatedAt":"2026-05-18T19:14:07.814Z"}}