MCPcopy Index your code
hub / github.com/openai/openai-realtime-console

github.com/openai/openai-realtime-console @main sqlite

repository ↗ · DeepWiki ↗
17 symbols 42 edges 13 files 0 documented · 0%
README

OpenAI Realtime Console

This is an example application showing how to use the OpenAI Realtime API with WebRTC.

Installation and usage

Before you begin, you'll need an OpenAI API key - create one in the dashboard here. Create a .env file from the example file and set your API key in there:

cp .env.example .env

Running this application locally requires Node.js to be installed. Install dependencies for the application with:

npm install

Start the application server with:

npm run dev

This should start the console application on http://localhost:3000.

This application is a minimal template that uses express to serve the React frontend contained in the /client folder. The server is configured to use vite to build the React frontend.

This application shows how to send and receive Realtime API events over the WebRTC data channel and configure client-side function calling. You can also view the JSON payloads for client and server events using the logging panel in the UI.

For a more comprehensive example, see the OpenAI Realtime Agents demo built with Next.js, using an agentic architecture inspired by OpenAI Swarm.

Previous WebSockets version

The previous version of this application that used WebSockets on the client (not recommended in browsers) can be found here.

License

MIT

Core symbols most depended-on inside this repo

sendClientEvent
called by 4
client/components/App.jsx
handleSendClientEvent
called by 2
client/components/SessionControls.jsx
render
called by 1
client/entry-server.jsx
startSession
called by 1
client/components/App.jsx
sendTextMessage
called by 1
client/components/App.jsx
Button
called by 0
client/components/Button.jsx
SessionStopped
called by 0
client/components/SessionControls.jsx
handleStartSession
called by 0
client/components/SessionControls.jsx

Shape

Function 17

Languages

TypeScript100%

Modules by API surface

client/components/SessionControls.jsx5 symbols
client/components/App.jsx5 symbols
client/components/ToolPanel.jsx2 symbols
client/components/EventLog.jsx2 symbols
client/pages/index.jsx1 symbols
client/entry-server.jsx1 symbols
client/components/Button.jsx1 symbols

Dependencies from manifests, versioned

@vitejs/plugin-react4.3.4 · 1×
dotenv16.4.7 · 1×
express4.21.2 · 1×
history5.3.0 · 1×
minipass7.0.4 · 1×
nodemon3.1.10 · 1×
postcss8.4.31 · 1×
postcss-nesting12.0.2 · 1×
postcss-preset-env7.7.1 · 1×
react18.2.0 · 1×
react-dom18.2.0 · 1×
react-feather2.0.10 · 1×

For agents

$ claude mcp add openai-realtime-console \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact