
openai / openai-agents-js
✓ Official★ 3,300A skill package that teaches your agent 13 capabilities — every one documented and browsable below, no GitHub required · by openai.
Each skill below is one capability this package teaches your agent. Install the whole package, or open a skill to install just that one.
Validate changesets in openai-agents-js using LLM judgment against git diffs (including uncommitted local changes). Use when packages/ or .changeset/ are…
10 files — installable on its own
Run the mandatory verification stack when changes affect runtime code, tests, or build/test behavior in the OpenAI Agents JS monorepo.
7 files — installable on its own
Analyze CSV files in /mnt/data and return concise numeric summaries.
2 files — installable on its own
Analyze main branch implementation and configuration to find missing, incorrect, or outdated documentation in docs/. Use when asked to audit doc coverage, sync…
5 files — installable on its own
Run examples:start-all in auto mode with parallel execution, per-script logs, and start/stop helpers.
5 files — installable on its own
Perform a release-readiness review by locating the previous release tag from remote tags and auditing the diff (e.g., v1.2.3...<commit>) for breaking changes,…
7 files — installable on its own
Decide how to implement runtime and API changes in openai-agents-js before editing code. Use when a task changes exported APIs, runtime behavior, schemas,…
3 files — installable on its own
Run the integration-tests pipeline that depends on a local npm registry (Verdaccio). Use when asked to execute integration tests or local publish workflows in…
50 files — installable on its own
Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need…
3 files — installable on its own
Keep pnpm current: run pnpm self-update/corepack prepare, align packageManager in package.json, and bump pnpm/action-setup + pinned pnpm versions in…
3 files — installable on its own
Create the required PR-ready summary block, branch suggestion, title, and draft description for openai-agents-js. Use in the final handoff after…
3 files — installable on its own
Plan and execute runtime-behavior investigations with temporary TypeScript probe scripts, validation matrices, state controls, and findings-first reports. Use…
11 files — installable on its own
Improve test coverage in the OpenAI Agents JS monorepo: run `pnpm test:coverage`, inspect coverage artifacts, identify low-coverage files and branches, propose…
3 files — installable on its own
OpenAI Agents SDK (JavaScript/TypeScript)
The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows in JavaScript/TypeScript. It is provider-agnostic, supporting OpenAI APIs and more.
<img src="https://cdn.openai.com/API/docs/images/orchestration.png" alt="Image of the Agents Tracing UI" style="max-height: 803px;">[!NOTE] Looking for the Python version? Check out OpenAI Agents SDK Python.
Core concepts
- Agents: LLMs configured with instructions, tools, guardrails, and handoffs
- Sandbox Agents: Agents paired with a filesystem workspace and sandbox environment for longer-running work
- Agents as tools / Handoffs: Delegating to other agents for specific tasks
- Tools: Various Tools let agents take actions (functions, MCP, hosted tools)
- Guardrails: Configurable safety checks for input and output validation
- Human in the loop: Built-in mechanisms for involving humans across agent runs
- Sessions: Automatic conversation history management across agent runs
- Tracing: Built-in tracking of agent runs, allowing you to view, debug and optimize your workflows
- Realtime Agents: Build powerful voice agents with full features
Explore the examples/ directory to see the SDK in action.
Get started
Supported environments
- Node.js 22 or later
- Deno
- Bun
Experimental support:
- Cloudflare Workers with
nodejs_compatenabled
Check out the documentation for more detailed information.
Installation
npm install @openai/agents zodRun your first Sandbox Agent
Sandbox Agents are in beta. A sandbox agent can inspect files, run commands, apply patches, and carry workspace state across longer tasks.
import { run } from '@openai/agents';
import { gitRepo, SandboxAgent } from '@openai/agents/sandbox';
import { UnixLocalSandboxClient } from '@openai/agents/sandbox/local';
const agent = new SandboxAgent({
name: 'Workspace Assistant',
instructions: 'Inspect the sandbox workspace before answering.',
defaultManifest: {
entries: {
repo: gitRepo({
repo: 'openai/openai-agents-js',
ref: 'main',
}),
},
},
});
const result = await run(
agent,
'Inspect repo/README.md and summarize what this project does.',
{
sandbox: {
client: new UnixLocalSandboxClient(),
},
},
);
console.log(result.finalOutput);
// This project provides a JavaScript/TypeScript SDK for building agent workflows.(If running this, ensure you set the OPENAI_API_KEY environment variable)
Run an agent without a sandbox
You can still use a regular Agent when your workflow does not need a filesystem workspace or sandbox lifecycle.
import { Agent, run } from '@openai/agents';
const agent = new Agent({
name: 'Assistant',
instructions: 'You are a helpful assistant',
});
const result = await run(
agent,
'Write a haiku about recursion in programming.',
);
console.log(result.finalOutput);
// Code within the code,
// Functions calling themselves,
// Infinite loop's dance.Explore the examples/ directory to see the SDK in action.
Acknowledgements
We'd like to acknowledge the excellent work of the open-source community, especially:
We're committed to building the Agents SDK as an open source framework so others in the community can expand on our approach.
For more details, see the documentation or explore the examples/ directory.
Install the whole package (13 skills):
npx skills add https://github.com/openai/openai-agents-jsOr install a single skill:
npx skills add https://github.com/openai/openai-agents-js --skill <name>Pick the skill name from the Skills tab — each entry there installs independently.