openai-agents

openai-agents is a skill for Claude Code from coco-research/coco. It costs 80 tokens per session (3,456 once invoked), scanned A, original, Apache-2.0.

A toolkit for building AI applications that can use tools, speak, stream responses, and pass work between specialised agents. It uses OpenAI's Agents SDK and can describe tool inputs with Zod, a TypeScript validation library.

In plain words
What is it for?
Use it to build text or voice agents, add tool calls, coordinate handoffs between agents, and diagnose documented agent errors.
Why use it?
It helps avoid common setup and runtime mistakes when connecting agents, tools, voice calls, and multi-agent workflows.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Good fit Use it to build text or voice agents, add tool calls, coordinate handoffs between agents, and diagnose documented agent errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/coco-research/coco/openai-agents
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add coco-research/coco --skill openai-agents
Clone the repo
git clone --depth 1 https://github.com/coco-research/coco

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openai-agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/coco-research/coco/openai-agents/github.svg)](https://agentmods.dev/skills/coco-research/coco/openai-agents)
Your own site
<a href="https://agentmods.dev/skills/coco-research/coco/openai-agents"><img src="https://agentmods.dev/badge/skills/coco-research/coco/openai-agents/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openai-agents

Your own site · 80×15
<a href="https://agentmods.dev/skills/coco-research/coco/openai-agents"><img src="https://agentmods.dev/badge/skills/coco-research/coco/openai-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.03456
Opus 5.5 $0.00032 $0.01382
Sonnet 5.5 $0.00016 $0.00691
Haiku 4.5 $0.00008 $0.00346

Measured 2mo ago against content hash bd543879c6ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

openai-agents scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 17 executable files (scripts/check-versions.sh, templates/cloudflare-workers/worker-agent-hono.ts, templates/cloudflare-workers/worker-text-agent.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request: Request, env: Env) {
skills/openai-agents/SKILL.md · 444 lines

How it starts

The opening of the file, as written. The whole thing — 444 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenAI Agents SDK

Build AI applications with text agents, voice agents (realtime), multi-agent workflows, tools, guardrails, and human-in-the-loop patterns.


Quick Start

npm install @openai/agents zod@4  # v0.4.0+ requires Zod 4 (breaking change)
npm install @openai/agents-realtime  # Voice agents
export OPENAI_API_KEY="your-key"

Breaking Change (v0.4.0): Zod 3 no longer supported. Upgrade to zod@4.

Runtimes: Node.js 22+, Deno, Bun, Cloudflare Workers (experimental)


Core Concepts

Agents: LLMs with instructions + tools

import { Agent } from '@openai/agents';
const agent = new Agent({ name: 'Assistant', tools: [myTool], model: 'gpt-5-mini' });

Tools: Functions with Zod schemas

import { tool } from '@openai/agents';
import { z } from 'zod';
const weatherTool = tool({
  name: 'get_weather',
  parameters: z.object({ city: z.string() }),
  execute: async ({ city }) => `Weather in ${city}: sunny`,
});

Handoffs: Multi-agent delegation

const triageAgent = Agent.create({ handoffs: [specialist1, specialist2] });

Guardrails: Input/output validation

const agent = new Agent({ inputGuardrails: [detector], outputGuardrails: [filter] });

Structured Outputs: Type-safe responses

const agent = new Agent({ outputType: z.object({ sentiment: z.enum(['positive', 'negative']) }) });

Text Agents

Basic: const result = await run(agent, 'What is 2+2?')

Streaming:

const stream = await run(agent, 'Tell me a story', { stream: true });
for await (const event of stream) {
  if (event.type === 'raw_model_stream_event') process.stdout.write(event.data?.choices?.[0]?.delta?.content || '');
}

Multi-Agent Handoffs

const billingAgent = new Agent({ name: 'Billing', handoffDescription: 'For billing questions', tools: [refundTool] });
const techAgent = new Agent({ name: 'Technical', handoffDescription: 'For tech issues', tools: [ticketTool] });
const triageAgent = Agent.create({ name: 'Triage', handoffs: [billingAgent, techAgent] });

Read the full file on GitHub · 444 lines

Files

What ships with it

27 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 444 lines · 80 tokens per session scan A bd543879c6ab

Subscribe to this mod's changes

openai-agents is a skill published in the GitHub repository coco-research/coco (323 stars, last pushed yesterday), licensed Apache-2.0. It adds 80 tokens to every session and 3,456 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

openai-agents compared with skills from other repositories

openai-agents next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
openai-agentscoco-research/cocoSkill323yesterdayApache-2.0A80Claude Code
session-handoffwanshuiyin/HERO-Anti-OverDefenseSkill92912d agoMITA34Claude Code, Codex
proxmox-fullmarcusquinn/aidevopsSkill476todayMITA27Claude Code
a-philosophy-of-software-designciembor/agent-rules-booksSkill3.4k2mo agoMITA33Claude Code, Codex
handoffChemaclass/agnostic-aiSkill31todayMITA14Claude Code, Codex
template-autopoiesisdocxology/templateSkill25todayApache-2.0A51Claude Code, Codex
template-publishdocxology/templateSkill25todayApache-2.0A52Claude Code, Codex