OpenAI Agents SDK (JavaScript/TypeScript)
A lightweight yet powerful framework for multi-agent workflows and voice agents in JavaScript/TypeScript.
- Source repo
- openai/openai-agents-js
- Stars
- ★ 4.1k
- Last updated
- today @openai/[email protected]
- FARS reviewed
- Nov 08, 2026 +15 new
- License
- MIT
- Primary language
- TypeScript
- FA score
- 52/100 · Major gaps
At a glance
- How it runs
- Works with
- Platform-specificOpenAI API
- Cost
- Free software; you pay for model usage
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- Developers building complex workflows that require multi-step, multi-agent collaboration, such as code review, data analysis, or automated report generation.
- Not a fit if
- Projects stuck on Node.js versions below 22
- Teams needing production-stable sandbox agents (still beta)
- Website
- openai.github.io/openai-agents-js ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-02latest release @openai/[email protected] (2026-12-01)+3.4 ★/day over 7 days
- Source review
- 52/100 · Major gaps
What does this agent do, and when should you use it?
This SDK is OpenAI's official framework for building multi-agent workflows in JavaScript/TypeScript, offering three agent modes: text, sandbox, and realtime. Core concepts include agents, sandbox agents, realtime agents, agents as tools, handoffs, tools, guardrails, human-in-the-loop, sessions, and tracing. It is provider-agnostic in design but primarily relies on the OpenAI API. Requirements include Node.js 22+, Deno, or Bun, with experimental support for Cloudflare Workers (with nodejs_compat). It includes built-in tracing for debugging and optimization. Licensed under MIT, it comes with an extensive examples directory. Installation is straightforward via npm install @openai/agents zod.
The SDK provides programmatic interfaces to create and run agents. Text agents use the Agent class and run() function to execute tasks, handling instructions and tool calls. Sandbox agents operate within a filesystem workspace, can run commands, manage file state, and support local and Docker clients. Realtime agents enable low-latency voice interactions in the browser via WebRTC. It supports tool definitions (including MCP), guardrails, handoffs, and session management, with built-in tracing of agent runs. Typical flow: define an agent (instructions, tools, guardrails), then call run() or connect a realtime session; the SDK handles scheduling, tracing, and output final results.
- Developers building complex workflows that require multi-step, multi-agent collaboration, such as code review, data analysis, or automated report generation.
- Teams needing to run code or commands in an isolated sandbox, allowing agents to safely operate on filesystems and execute commands.
- Products requiring voice interaction, such as voice assistants, customer support bots, or real-time voice translation, using RealtimeAgent.
- Developers wanting to use agents as tools for other agents, enabling modular task delegation, e.g., one agent for data extraction and another for summarization.
- Ensuring output quality through guardrails for input/output validation or human-in-the-loop mechanisms for approvals.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Environment variables
OPENAI_API_KEY- Runtime
- Node.js 22
- Install notes cover
- Docker
How do you install or deploy this agent?
Requires Node.js 22 or later. Install via npm: npm install @openai/agents zod. For sandbox agents, you may need to install Docker or configure a local client. For realtime agents, browser support for WebRTC is required, and you need to set OPENAI_API_KEY on the server to generate ephemeral tokens.
How do you use this agent?
- Install dependencies:
npm install @openai/agents zod. 2. Set environment variable OPENAI_API_KEY. 3. Create a text agent: import Agent and run, define the agent, and run it. 4. For sandbox agents, import SandboxAgent and a client, configure the workspace. 5. For realtime agents, import RealtimeAgent and RealtimeSession, connect via WebRTC. See the README and examples directory for code samples.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Official OpenAI product, ensuring compatibility and future updates with OpenAI API.
- Offers three agent modes (text, sandbox, realtime) covering different use cases.
- Built-in tracing for debugging and optimizing workflows.
- Supports advanced features like handoffs, guardrails, and tools, simplifying multi-agent orchestration.
- MIT license, open source, community-contributable.
- Reliance on OpenAI API; core features (like sandbox and realtime) may not work with other providers.
- Sandbox agents are in beta, potentially unstable.
- High runtime requirement (Node.js 22+) may limit deployment on older environments.
- Experimental support for Cloudflare Workers requires extra configuration and may have issues.
- Realtime agents require handling WebRTC and ephemeral tokens, adding frontend complexity.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| OpenAI Agents SDK (JavaScript/TypeScript) This agent | 52 · Major gaps | Library / SDKFree + model costs | ★ 4.1k | today | TypeScript | OpenAI API |
| Network-AI Orchestrator | 68 · Some gaps | — | ★ 91 | 2d ago | TypeScript | Codex · Claude Code · OpenAI API · Claude API |
| AgentOS | 64 · Some gaps | Library / SDKFree + model costs | ★ 692 | 1d ago | TypeScript | Claude Code · OpenAI API · Claude API |
| Agor | 68 · Some gaps | CLIFree + model costs | ★ 1.5k | 1d ago | TypeScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The README describes tools, sandboxing, MCP, guardrails, human involvement, and tracing. SECURITY.md explicitly identifies model output, tool responses, remote content, and persisted state as trust-boundary data, and says applications must choose suitable authorization and isolation, supporting the data-flow and sensitive-data scores. Deductions: the local sandbox example can run commands and the realtime example connects a microphone and uses a client key, while the packet does not show default least-privilege controls or per-action confirmation. The reporting policy requires redaction, but the supplied material does not establish handling across all SDK paths. Dependency risk and recovery from external effects are also not adequately shown.
The README's installation and environment guidance broadly matches its examples, and package scripts show maintenance workflows for type builds, tests, lint, and formatting. Deductions: no execution results are supplied, dependency availability lacks lockfile or supply-chain evidence, and only a few implementation/test excerpts illustrate failures rather than a complete user-facing error contract.
The README covers text, multi-agent, voice, and sandbox scenarios; it names Node.js 22+, Deno, Bun, experimental Cloudflare Workers support, and platform-specific sandbox-client guidance. Deductions: the supplied files do not fully define package-level capability boundaries, precise activation conditions, or limits for each environment.
The README organizes concepts, setup, examples, and contribution guidance, with installation instructions and text, sandbox, and realtime examples; the MIT license text is complete. SECURITY.md, contribution guidance, and the supplied OpenAI publisher provenance make responsibility and vulnerability-reporting paths reasonably traceable. Deductions: the packet does not include a complete user-facing limitations list, FAQ, or version history; examples and package names are legible, but the sample is insufficient to establish repository-wide naming and versioning conventions.
The framework combines agents, tools, handoffs, guardrails, sessions, tracing, and voice capabilities in a JS/TS SDK, and examples show usable outputs and common integrations. Deductions: the packet does not compare benefits against direct API use or establish runtime and operational costs, and several value claims remain README-level summaries.
The README's main capability claims receive some corroboration from installation examples, integration-test excerpts, package scripts, the security policy, and the license. The security policy also distinguishes SDK-owned controls from application configuration. Deductions: this is a sample of files rather than a complete implementation or execution record; the review remains static, and publisher identity is not treated as proof of reliability or safety.
- This assessment uses only the supplied static file sample; unseen files were not reviewed, and no code, tests, or examples were executed.
- Before using local sandboxes, tools, or realtime voice, applications should explicitly configure authorization, isolation, and credential flow; the examples do not establish production safety.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Special thanks Thanks to Luca Franco for disclosing the risk of running a previously rejected tool call after a change to the tool's approval default. [Original report](https://github.com/openai/openai-agents-python/issues/6072) · [JavaScript fix](https://github.com/openai/openai-agents-js/pull/2806) Patch Changes - b74effb: fix(extensions): report AI SDK content-filter turns without usable output as refusals after one request. Use errorHandlers.modelRefusal to recover instead of maxTurns or invalidFinalOutput (#2769). - Updated dependencies [5c708cf] …View on GitHub ↗ -
Release notes excerpt
Special thanks Thanks to Luca Franco for disclosing the risk of running a previously rejected tool call after a change to the tool's approval default. [Original report](https://github.com/openai/openai-agents-python/issues/6072) · [JavaScript fix](https://github.com/openai/openai-agents-js/pull/2806) Patch Changes - Updated dependencies [5c708cf] - Updated dependencies [dad5f76] - Updated dependencies [90fc5e5] - Updated dependencies [fb98a1f] - Updated dependencies [d8ecae1] - Updated dependencies [8720442] - Updated dependencies [93f5dc6] - Updated dependencies [a53780b] …View on GitHub ↗ -
Release notes excerpt
Special thanks Thanks to Luca Franco for disclosing the risk of running a previously rejected tool call after a change to the tool's approval default. [Original report](https://github.com/openai/openai-agents-python/issues/6072) · [JavaScript fix](https://github.com/openai/openai-agents-js/pull/2806) Patch Changes - 93f5dc6: fix(realtime): honor OPENAI_AGENTS_DISABLE_TRACING for Realtime API tracing (#2768) - 569f5c7: fix(realtime): Reject updateHistory() edits with a function_call replacement before deleting any items (#645). - Updated dependencies [5c708cf] …View on GitHub ↗
FAQ
Which models does this SDK support?
What environment does the sandbox agent require?
How do I get an API key?
Can this SDK be used in production?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.