openai realtime agents

Report Abuse

Basic Information

This repository is a demonstration and starter kit for building realtime, voice-enabled AI agents using the OpenAI Realtime API together with the OpenAI Agents SDK. It is a Next.js TypeScript app that provides example agent configurations, UI flows, and code showing how to create, orchestrate, and hand off between agents in realtime. The README highlights two primary agentic patterns: a Chat-Supervisor pattern where a low-latency realtime chat agent defers complex tool calls and reasoning to a higher-capability text supervisor model, and a Sequential Handoffs pattern where specialized agents transfer sessions among each other via an explicit agent graph. The repo includes example scenarios such as a simple greeter-to-haiku flow and a CustomerServiceRetail flow with authentication, returns, sales agents, and an escalation to a reasoning model. It also shows session creation, WebRTC handshake, ephemeral tokens, and event handling used to prototype multi-agent voice applications.

Links

App Details

Features
Provides templates and example agent configurations for two main realtime patterns: Chat-Supervisor and Sequential Handoffs. Integrates with the OpenAI Agents SDK to define agents, tools, handoffs, and agent graphs. Demonstrates tool integration and configurable toolLogic where tool calls can return mocked or real responses. Includes a Next.js TypeScript demo app with UI controls to select scenarios and agents, a conversation transcript, and an event log surface. Shows realtime session management including ephemeral session tokens, WebRTC offer/answer flow, and a client data channel for oai-events. Includes guardrail checks for assistant messages, examples of escalating to higher-capability models for high-stakes decisions, and a metaprompt and sample configs for building state-machine style prompts and authentication flows.
Use Cases
This repo helps developers prototype and learn multi-agent realtime voice applications quickly by providing working examples, reusable agent patterns, and configuration files to copy into new projects. The Chat-Supervisor pattern provides a practical way to lower latency while preserving high-quality tool calls and reasoning by deferring complex work to a supervisor model. The Sequential Handoffs pattern demonstrates how to route users between specialist agents, manage handoffs, and escalate to stronger models for critical tasks. The demo app exposes session creation, event logging, UI elements for scenario selection and agent switching, and built-in guardrail logic so developers can test safety flows. Documentation and examples make it easier to adapt prompts, tools, and decision boundaries, and to experiment with cost and latency tradeoffs in voice agent deployments.

Please fill the required fields*