Back to templates

Template details

eve Voice Template

Next.js voice template that lets you talk to an eve agent in the browser via GPT-Live-1 on Vercel AI Gateway.

About this template

eve Voice Template is a Next.js boilerplate for talking to an eve agent in the browser by voice, where OpenAI's GPT-Live-1 (served through Vercel AI Gateway) handles listening, speaking, and turn-taking while the eve agent executes tools, requests approvals, and preserves durable conversation state.

What is eve Voice Template?

eve Voice Template is a voice application template built on Next.js. Its input is the user's speech captured through the browser microphone; its output is spoken replies plus a live on-screen transcript that includes eve's tool calls and approval prompts. The voice layer is GPT-Live-1 via Vercel AI Gateway, the work layer is an eve agent, and the template is published by Vercel in its eve repository.

Key Features

  • Next.js app with eve Web Chat components — the transcript UI reuses the same components as eve Web Chat, rendering tool calls and prompts beside the live transcript.
  • GPT-Live-1 voice via AI Gateway — audio travels directly from the browser to AI Gateway over WebSocket; the server only mints single-use client secrets so the Gateway API key never reaches the browser.
  • Voice delegation to an eve agent — GPT-Live-1 delegates anything beyond small talk; the app forwards the user's words to eve, and one call maps to one durable eve session.
  • Silent progress, spoken answers — the app tells GPT-Live-1 what the agent is doing, then hands it the agent's answer to speak in its own words.
  • Voice or on-screen approvals — say a prompt option's name such as "approve", or click the button; anything unrecognized waits until the prompt is answered.
  • Three deployment modes — Starter (shared EVE_VOICE_PASSWORD plus secure session cookie), Production (Neon, Upstash, Sign in with Vercel via Better Auth), and Local development.
  • Built-in safeguards — a 10-minute call cap enforced in the browser, and in production mode Upstash rate limiting of client-secret minting to 20 calls per user per hour.
  • Customization points — agent/agent.ts, agent/instructions.md, agent/tools/, apps/web/lib/voice-config.ts (voice instructions and call cap), and apps/web/lib/voice-delegate.ts (delegation and approval logic).

Who is it for?

  • Developers prototyping voice agents: start from a working Next.js voice loop with tool execution and approvals instead of wiring WebSocket audio handling from scratch.
  • Teams already using eve: add a browser voice channel in front of an existing eve agent's tools and durable sessions.
  • Solo operators: run Starter mode with one shared password for a single trusted operator identity.
  • Production teams: use scripts/setup.sh to provision Neon and Upstash, register Sign in with Vercel, pull environment variables, and run migrations.

What can you do with eve Voice Template?

  • Ask live questions: try "What's the weather in Paris?" and hear the agent's answer spoken back while the transcript updates.
  • Exercise approval flows: ask "Remind me to call Bob tomorrow", then say "approve" or click the button when the reminder tool asks.
  • Deploy quickly: click Deploy with Vercel, supply AI_GATEWAY_API_KEY and a strong EVE_VOICE_PASSWORD (16+ characters recommended), then start a call.
  • Run locally: use pnpm dev:all to start the web app and agent together (Vercel CLI 59.16.0 or newer), or pnpm dev / pnpm dev:eve separately.

How does eve Voice Template work?

The browser opens a WebSocket to AI Gateway for GPT-Live-1 and calls /eve/v1/session for the agent, while POST /api/live/client-secret supplies a single-use Gateway secret. GPT-Live-1 delegates substantive requests, the app relays the user's words to eve, then feeds the agent's answer back for GPT-Live-1 to speak.

Limitations

  • GPT-Live-1 on AI Gateway supports WebSocket transport with client delegation only; WebRTC, hosted Responses delegation, and live session updates are unavailable.
  • Client secrets can only be minted with an AI Gateway API key; Vercel OIDC is not accepted.
  • Calls are not persisted — reloading the page ends the call, and the next call starts a new eve session.
  • The browser enforces the call cap, so a modified client could hold a session up to GPT-Live-1's own limit; keep the token route behind auth and rate limiting.
  • Voice replies only answer prompts with options such as approvals; free-text questions and connection sign-ins are answered on screen.
  • Voice sessions are billed per second including silence and agent wait time; the agent's own model calls bill separately.

FAQ

Is eve Voice Template free to use?

The template itself is open source in Vercel's eve repository, but running it requires an AI Gateway API key and incurs usage costs: voice sessions are billed per second (including silence and waiting on the agent), and the eve agent's own model calls are billed separately.

How long can a voice call last?

The app ends each call after 10 minutes. That cap is enforced in the browser, so a modified client could keep a session open up to GPT-Live-1's own session limit — which is why the token route should stay behind authentication and rate limiting.

Does it support WebRTC?

No. GPT-Live-1 on AI Gateway supports WebSocket transport with client delegation only; WebRTC, hosted Responses delegation, and live session updates are not available in this template.

How are tool approvals handled?

When eve's tool asks for approval, the user can click an option or say its name, such as "approve" or "cancel it, please". Anything else waits until the prompt is answered, and the voice model's own words never answer a prompt.

Screenshot of eve Voice Template