This is an official demonstration of advanced patterns for voice agents, using the CometAPI Realtime API and the OpenAI Agents SDK.
CometAPI provides enterprise-grade access to cutting-edge AI models with competitive pricing, low latency, and reliable infrastructure. The CometAPI Realtime API is compatible with the OpenAI Realtime API protocol, making it easy to integrate into your applications.
- Website
- Documentation
- Get an API Key
- Pricing
- Discord Community - Get support and connect with us
- 
Clone this repository: git clone https://github.com/cometapi-dev/cometapi-realtime-agents.git cd cometapi-realtime-agents
- 
Install dependencies: npm install 
- 
Configure your CometAPI credentials: cp .env.sample .env Edit .envand add your CometAPI API key (Get one here):COMETAPI_KEY=your_cometapi_key_here 
- 
Start the development server: npm run dev 
- 
Open your browser to http://localhost:3000. It should default to the chatSupervisorAgent Config.
The following environment variables can be configured in your .env file:
| Variable | Description | Default | 
|---|---|---|
| COMETAPI_KEY | Your CometAPI API key (required) | - | 
| COMETAPI_BASE_URL | CometAPI REST API base URL | https://api.cometapi.com | 
| COMETAPI_REALTIME_URL | CometAPI WebSocket URL for realtime | wss://api.cometapi.com/v1/realtime | 
| COMETAPI_MODEL | Model identifier to use | gpt-4o-realtime-preview-2025-06-03 | 
| https_proxyorHTTPS_PROXY | HTTPS proxy URL (optional) | - |