openai/openai-agents-js

A lightweight, powerful framework for multi-agent workflows and voice agents

What it solves

This SDK provides a structured framework for building complex multi-agent workflows in JavaScript and TypeScript. It simplifies the process of creating agents that can hand off tasks to one another, use tools, and maintain state across sessions, reducing the boilerplate required to orchestrate complex AI interactions.

How it works

The framework introduces several specialized agent types:

  • Text Agents: Standard LLM-based assistants for text-based tasks.
  • Sandbox Agents: Agents equipped with a filesystem workspace and sandbox environment, allowing them to run commands and maintain state over long-running tasks.
  • Realtime Agents: Optimized for low-latency spoken interactions via WebRTC in the browser.

The system supports provider-agnostic orchestration, meaning it can work with OpenAI APIs and other providers. It includes built-in mechanisms for session management (conversation history), guardrails for safety validation, and tracing for debugging and optimize workflows.

Who it’s for

Developers using Node.js, Deno, Bun, or Cloudflare Workers who want to build agentic applications that require tool use, multi-agent delegation, or specialized environments like sandboxes or voice interfaces.

Highlights

  • Multi-agent orchestration: Support for handoffs and treating agents as tools to delegate tasks.
  • Sandbox environments: Integrated support for local or Docker-based filesystem workspaces.
  • Realtime voice: Low-latency spoken interaction capabilities for browser applications.
  • Integrated safety: Built-in guardrails for input and output validation.
  • Integrated tracing: Native tracking of agent runs for debugging and optimization.
  • Human-in-the-loop: Built-in mechanisms to involve humans in the agent's execution flow.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Dispatch