whatisgithub

What is openai-realtime-agents?

openai/openai-realtime-agents — explained in plain English

Analysis updated 2026-06-24

6,866TypeScriptAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A demo app from OpenAI showing two patterns for building voice AI agents, one where a fast model and a smart model collaborate silently, and one where specialized agents hand off conversations to each other.

Mindmap

mindmap
  root((realtime-agents))
    Patterns
      Chat-Supervisor
      Sequential Handoff
    How it works
      Voice streaming
      Agent handoffs
      Tool calls
    Tech stack
      Next.js TypeScript
      Realtime API
    Audience
      Developers
      AI builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a voice AI agent that answers common questions quickly and quietly consults a smarter model only when needed.

USE CASE 2

Create a multi-agent customer service system where each AI agent handles a specific topic and routes callers onward.

USE CASE 3

Prototype low-latency voice assistants with streaming spoken responses using the OpenAI Realtime API.

USE CASE 4

Learn how to implement agent handoffs so one AI passes a conversation seamlessly to a more specialized AI.

What is it built with?

TypeScriptNext.jsOpenAI Realtime API

How does it compare?

openai/openai-realtime-agentsgoogleapis/release-pleasezsviczian/obsidian-excalidraw-plugin
Stars6,8666,8716,872
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity3/52/51/5
Audiencedeveloperdeveloperwriter

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a paid OpenAI API key with Realtime API access enabled.

So what is it?

This repository is a demonstration app from OpenAI showing two patterns for building voice-based AI agents using their Realtime API. The Realtime API lets a program have a low-latency, streaming spoken conversation with an AI model rather than sending one text message at a time and waiting for a response. The first pattern, called Chat-Supervisor, uses two models working together. A faster, cheaper model handles the conversational side, greeting the user and collecting information through voice. When a question requires a tool call or more careful reasoning, the fast model quietly consults a smarter text model and then delivers that answer back to the user. The result is a voice agent that responds quickly in conversation while still getting high-quality answers on harder questions. The second pattern is called Sequential Handoff. Here, multiple specialized agents each have their own instructions and tools. When the user's request falls outside what the current agent handles, the agent passes the conversation to a more appropriate one. This mirrors how a customer service phone system routes callers to different departments, but the routing is decided by the model rather than by a rigid menu. The project is a Next.js web application, which is a common framework for building websites with TypeScript. You install dependencies, add an OpenAI API key, and run a local server. Opening a browser then shows the demo interface, where you can switch between the two agent configurations using a dropdown. The README includes diagrams explaining how each pattern works, guidance on adapting the code for your own agent, and notes on trading off cost versus response quality. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Using the Chat-Supervisor pattern from openai-realtime-agents, build me a voice assistant that handles FAQs quickly and escalates complex billing questions to a more powerful model.
Prompt 2
Show me how to add a new specialized agent to the Sequential Handoff pattern that handles appointment scheduling and hands off back to the main agent when done.
Prompt 3
Help me adapt the openai-realtime-agents Next.js app to use my own system prompts and tool definitions instead of the demo ones.
Prompt 4
Which pattern, Chat-Supervisor or Sequential Handoff, is better for a customer support bot, and how do I decide based on my use case?
Prompt 5
How do I deploy this openai-realtime-agents Next.js app to Vercel with my own production OpenAI API key?

Frequently asked questions

What is openai-realtime-agents?

A demo app from OpenAI showing two patterns for building voice AI agents, one where a fast model and a smart model collaborate silently, and one where specialized agents hand off conversations to each other.

What language is openai-realtime-agents written in?

Mainly TypeScript. The stack also includes TypeScript, Next.js, OpenAI Realtime API.

How hard is openai-realtime-agents to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is openai-realtime-agents for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.