# OpenAI Realtime Agents — Voice AI Agent Patterns > Advanced agentic patterns for voice AI built on OpenAI Realtime API. Chat-supervisor and sequential handoff patterns with WebRTC streaming. MIT, 6,800+ stars. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use 1. Clone and install: ```bash git clone https://github.com/openai/openai-realtime-agents.git cd openai-realtime-agents npm i ``` 2. Set your API key: ```bash export OPENAI_API_KEY=sk-your-key-here ``` 3. Run the demo: ```bash npm run dev # Open http://localhost:3000 ``` --- ## Intro OpenAI Realtime Agents is an official OpenAI demo showcasing advanced agentic patterns for voice AI with 6,800+ GitHub stars. It demonstrates two key patterns: Chat-Supervisor (a realtime voice agent delegates complex tasks to a smarter text model like GPT-4.1) and Sequential Handoff (specialized agents transfer users between each other based on intent). Built with the OpenAI Agents SDK and WebRTC voice streaming. Best for developers building voice-enabled AI applications, customer service bots, or multi-agent voice systems. See more agent frameworks on [TokRepo Agent Toolkit](https://tokrepo.com/en/@Agent%20Toolkit). --- ## OpenAI Realtime Agents — Voice AI Agent Architecture ### Two Agent Patterns #### 1. Chat-Supervisor Pattern A realtime voice agent handles user conversation and basic tasks, while a more intelligent text-based supervisor model (GPT-4.1) handles complex tool calls and decision-making. ``` User ←→ [Voice Agent (realtime)] ←→ [Supervisor (GPT-4.1)] ↓ ↓ Basic tasks Complex reasoning Voice I/O Tool calls ``` **When to use**: When you need natural voice interaction but also complex reasoning that requires a more capable model. #### 2. Sequential Handoff Pattern Specialized agents transfer users between them based on detected intent. Inspired by the OpenAI Swarm pattern. ``` User → [Greeter Agent] → [Sales Agent] → [Support Agent] ↓ ↓ ↓ Route intent Handle sales Handle support ``` **When to use**: When different conversation stages require different expertise (e.g., routing → sales → support). ### Key Technologies | Technology | Purpose | |------------|---------| | OpenAI Realtime API | Low-latency voice streaming | | OpenAI Agents SDK | Multi-agent orchestration | | WebRTC | Browser-based voice I/O | | GPT-4.1 | Text-based supervisor reasoning | ### Setup ```bash git clone https://github.com/openai/openai-realtime-agents.git cd openai-realtime-agents npm i export OPENAI_API_KEY=sk-your-key npm run dev ``` ### FAQ **Q: What is OpenAI Realtime Agents?** A: An official OpenAI demo showing how to build sophisticated voice AI agents using the Realtime API and Agents SDK, with patterns like chat-supervisor hierarchies and sequential handoffs. **Q: Is it free to use?** A: The code is MIT licensed. You pay for OpenAI API usage (Realtime API pricing applies). **Q: Can I use this in production?** A: It's a demo/reference implementation. Use the patterns and architecture in your own production applications. --- ## Source & Thanks > Created by [OpenAI](https://github.com/openai). Licensed under MIT. > > [openai-realtime-agents](https://github.com/openai/openai-realtime-agents) — ⭐ 6,800+ Thanks to Noah MacCallum, Ilan Bigio, and the OpenAI team for demonstrating production voice AI patterns. --- ## Quick Use 1. Clone and install: ```bash git clone https://github.com/openai/openai-realtime-agents.git cd openai-realtime-agents npm i ``` 2. Set your API key and run: ```bash export OPENAI_API_KEY=sk-your-key npm run dev ``` --- ## Introduction OpenAI Realtime Agents is OpenAI's official demo of advanced voice AI agent patterns, with 6,800+ GitHub stars. It showcases two key patterns: Chat-Supervisor (voice agent + smart text model collaboration) and Sequential Handoff (transfer users between specialized agents based on intent). Built on the OpenAI Agents SDK and WebRTC voice streaming. Ideal for developers building voice AI apps, customer-service bots, or multi-agent voice systems. --- ## OpenAI Realtime Agents — Voice AI Agent Architectures ### Two Agent Patterns #### 1. Chat-Supervisor Pattern A voice agent handles user dialog and basic tasks; a smart text model (GPT-4.1) handles complex reasoning and tool calls. #### 2. Sequential Handoff Pattern Specialized agents transfer users between one another based on detected intent (greeting → sales → support). ### FAQ **Q: What is OpenAI Realtime Agents?** A: OpenAI's official demo showing how to build sophisticated voice AI agents using the Realtime API and Agents SDK. **Q: Is it production-ready?** A: It's a reference implementation — apply the patterns and architecture to your own production apps. --- ## Source & Thanks > Created by [OpenAI](https://github.com/openai). Licensed under MIT. > > [openai-realtime-agents](https://github.com/openai/openai-realtime-agents) — ⭐ 6,800+ --- Source: https://tokrepo.com/en/workflows/openai-realtime-agents-voice-ai-agent-patterns-0d228731 Author: OpenAI