Our take
- Activity
- 88
- Community
- 72
- Issues
- 79
- Pull requests
- 80
+47 stars in the last 18 days
- Releases more often than 91% of the projects we track
- Merges more pull requests than 88% of the projects we track
- Closes issues faster than 82% of the projects we track
Overview
OpenAI Agents SDK for JavaScript and TypeScript helps developers build workflows where LLM agents can use tools, hand off tasks to other agents, and retain conversation history. It provides a shared framework for text-based, sandboxed, and realtime voice interactions rather than requiring each workflow to be assembled from separate pieces.
It is intended for developers building agent features in JavaScript or TypeScript applications. Use it when you need orchestration, safety checks, human involvement, or tracing around agent runs. For a simple request and response, a full agent workflow may be more than you need.
Key Features
- Define agents with instructions, tools, guardrails, and handoffs.
- Delegate specific tasks using agents as tools or handoffs between agents.
- Add function, MCP, and hosted tools for agents to take actions.
- Use sandbox agents with filesystem workspaces for longer-running tasks.
- Build browser-based realtime voice interactions with conversation history.
- Configure input and output validation with guardrails, and involve humans during runs.
- Manage conversation history across runs with sessions and inspect workflows with tracing.
- Use the SDK with OpenAI APIs and other providers.
Use Cases
- TypeScript application developers can build assistants that call application functions or delegate specialized subtasks.
- Teams working on multi-step coding or research tasks can give agents a sandbox workspace to inspect files and run commands.
- Product teams can add low-latency spoken interactions to browser applications with realtime agents.
- Developers building user-facing agent features can apply guardrails and human review where automated actions need oversight.
- Teams debugging agent workflows can use tracing to inspect and optimize runs.
Getting Started
Requires Node.js 22 or later, Deno, or Bun. Install the SDK and Zod:
npm install @openai/agents zod
Set OPENAI_API_KEY in the server environment for text and sandbox agents. For browser-based realtime agents, create an ephemeral client token on your server. See the README and documentation for setup details and examples.
Alternatives
- fast-agent: fast-agent is a Python framework for declarative, multimodal agents and MCP workflows, while openai-agents-js is a TypeScript SDK with voice and handoff features.
- Strands Agents SDK-Python: Strands is a Python, model-driven agent SDK with broad provider support, while openai-agents-js is TypeScript and includes voice-agent capabilities.
| Project | Language | License | Stars | Status |
|---|---|---|---|---|
| openai-agents-js | TypeScript | MIT | 3.9k | Not checked yet |
| fast-agent | Python | Apache-2.0 | 3.9k | Active |
| harness-sdk | Python | Apache-2.0 | 8.6k | Active |
Considerations
- Node.js 22 or later is required for the documented Node.js environment; Deno and Bun are also supported.
- Cloudflare Workers support is experimental and requires
nodejs_compat. - Browser realtime sessions should use a short-lived ephemeral client token, not a server API key.
- The local Unix sandbox client is supported on macOS and Linux. The README recommends Docker or a hosted sandbox client on Windows.
- Pull requests are limited to repository collaborators, according to the contribution policy.
Found this useful?
Share it with someone who would like openai-agents-js.