
An Open-source Realtime AI Voice Agent Built With Next.js, and OpenAI.
- Sequential agent handoffs according to a defined agent graph (inspiration from OpenAI Swarm)
- Background escalation for high-stakes decisions
- Prompting models to follow a state machine, for example to accurately collect things like names and phone numbers with confirmation character by character to authenticate a user
Features · Model Provider · Deploy Your Own · Running locally
- Next.js App Router
- Advanced routing for seamless navigation and performance
- React Server Components (RSCs) for server-side rendering and increased performance
- OpenAI Integration
- Leverages OpenAI's powerful models for chat generation.
- Direct API calls for text generation and other AI features.
- Web search capabilities through OpenAI's Response API for real-time information retrieval
- Jina Reader Integration
- Advanced web scraping capabilities for extracting structured data from websites
- Enhances the AI's ability to process and understand web content
- Shadcn/ui
- Styling with Tailwind CSS
- Component primitives from Radix UI for accessibility and flexibility
This app utilizes the OpenAI API for its AI capabilities. It is configured to use OpenAI models for generating responses.
- Realtime Model (
gpt-4o-mini-realtime-preview
): Higher quality conversational model with higher latency - Realtime Mini Model (
gpt-4o-realtime-preview
): Optimized for low-latency conversational responses - Chat Model (
gpt-4.1
): General purpose GPT-4.1 model - Chat Mini Model (
gpt-4.1-mini
): Smaller variant of GPT-4.1 - Transcribe Model (
gpt-4o-transcribe
): Optimized for speech-to-text transcription - Transcribe Mini Model (
gpt-4o-mini-transcribe
): Optimized for low-latency speech-to-text transcription
You can deploy your own version of the OpenChat to Vercel with one click:
You will need to use the environment variables defined in .env.example
to run OpenChat. It's recommended you use Vercel Environment Variables for this, but a .env
file is all that is necessary.
Note: You should not commit your
.env
file or it will expose secrets that will allow others to control access to your various OpenAI and authentication provider accounts.
- Install Vercel CLI:
npm i -g vercel
- Link local instance with Vercel and GitHub accounts (creates
.vercel
directory):vercel link
- Download your environment variables:
vercel env pull
bun install
bun dev
Your app should now be running on localhost:3000.