OpenAI Agents SDK (JavaScript/TypeScript)

A lightweight yet powerful framework for multi-agent workflows and voice agents in JavaScript/TypeScript.

Stars
★ 4.1k
Last updated
today @openai/[email protected]
FARS reviewed
Nov 08, 2026 +15 new
License
MIT
Primary language
TypeScript

At a glance

How it runs
Library / SDKFramework
Works with
Platform-specificOpenAI API
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Node.js 22 or laternpmzodShell / CLINetwork accessLocal filesystem
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)
Maintenance
Commits in the last 30 dayslast commit 2026-12-02latest release @openai/[email protected] (2026-12-01)+3.4 ★/day over 7 days

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.

  1. Developers building complex workflows that require multi-step, multi-agent collaboration, such as code review, data analysis, or automated report generation.
  2. Teams needing to run code or commands in an isolated sandbox, allowing agents to safely operate on filesystems and execute commands.
  3. Products requiring voice interaction, such as voice assistants, customer support bots, or real-time voice translation, using RealtimeAgent.
  4. 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.
  5. 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?

  1. 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)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • 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.
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Major gaps
52/ 100 5-point scale 2.6 / 5
This review covers the source as of Nov 08, 2026. The project has shipped 15 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 13/29
Reliability 6/14
Adaptability 10/18
Convention 11/18
Effectiveness 7/13
Verifiability 5/8
Why each dimension lost points
Trust13 / 29 · 2.2/5

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.

Reliability6 / 14 · 2.1/5

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.

Adaptability10 / 18 · 2.8/5

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.

Convention11 / 18 · 3.1/5

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.

Effectiveness7 / 13 · 2.7/5

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.

Verifiability5 / 8 · 3.1/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 252236c32d30 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/openai-agents-js.svg)](https://followagents.com/en/agents/openai-agents-js)
<a href="https://followagents.com/en/agents/openai-agents-js"><img src="https://followagents.com/badge/openai-agents-js.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. 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 ↗
  2. 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 ↗
  3. 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?
Primarily OpenAI API, but the framework is provider-agnostic; theoretically you can integrate other models, but you'd need to implement adapters yourself.
What environment does the sandbox agent require?
Sandbox agents support macOS and Linux (using UnixLocalSandboxClient); on Windows, use DockerSandboxClient or a hosted sandbox client.
How do I get an API key?
Sign up for an OpenAI API key and set it as the OPENAI_API_KEY environment variable. For realtime agents, generate ephemeral tokens on the server and pass them to the client.
Can this SDK be used in production?
Text and realtime agents are relatively stable, but sandbox agents are in beta and should be used with caution. Tracing helps monitor and debug.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts