The browser joins an Agora RTC channel directly. ConvoAI or an AI Studio pipeline joins the same channel as the agent.
AI SDK-compatible WebRTC voice, shipped as a Vercel app
Build Agora Voice Agents for Vercel.
Agora handles the live WebRTC channel and ConvoAI agent. Vercel hosts the React app, server routes, and deployment flow. This repo gives AI SDK-shaped hooks, a deployable template, and voice UI to connect both sides.
useAgoraRealtime follows the AI SDK realtime hook shape for status, messages, events, controls, and session config while Agora RTC remains the media path.
Next.js routes on Vercel mint the RTC token, start the agent, and keep the Agora App Certificate on the server.
Use the npm package for the full runtime, or install the voice ring through shadcn when you only need the UI.
NPM package
React runtime for AI SDK-compatible Agora agents in Vercel apps.
agora-realtime-react gives the browser a clean React API for Agora RTC with AI SDK Realtime-compatible types. Your Vercel route owns credentials, token generation, and ConvoAI startup.
- useAgoraRealtime for Agora RTC session state in React
- AI SDK Realtime-compatible status, UIMessage, and sessionConfig types
- typed setup responses for Vercel server routes
- useVoiceMeter for microphone and remote audio levels
- VoiceRingButton for human and AI voice activity
Deploy path
Run an Agora agent from Vercel.
Publish a pipeline in Agora AI Studio, add the credentials to Vercel, and deploy the template. The browser gets only a scoped RTC token. The App Certificate stays server-side.
- Create an Agora project and copy the App ID plus App Certificate.
- Publish an AI Studio pipeline and copy its pipeline ID.
- Deploy the Vercel template with AGORA_APP_ID, AGORA_APP_CERTIFICATE, and AGORA_CONVOAI_PIPELINE_ID.
AGORA_APP_ID=...
AGORA_APP_CERTIFICATE=...
AGORA_CONVOAI_PIPELINE_ID=...UI path
Add the Agora voice ring to any React app.
The shadcn registry serves the voice ring and meter hook from the same SDK source. Use it in a Vercel app, a prototype, or an existing design system without adopting the full template.
- Install the registry item with shadcn.
- Render VoiceRingButton from your shadcn UI alias.
- Feed human and AI levels from useVoiceMeter or your own audio analysis.
npx shadcn@latest add \
https://agora-realtime-agent.vercel.app/r/voice-ring-button.jsonRead shadcn guideOfficial references
Build against Agora's English docs.
This project packages the Vercel and React path. Use Agora's official site and English documentation for product setup, RTC behavior, and AI agent configuration details.
Official Agora homepage for realtime engagement and AI products.
Agora DocsEnglish documentation hub for Agora product setup, SDKs, and APIs.
Realtime voice docsVoice calling docs for the RTC media layer used by browser sessions.
AI and Conversational AI docsAgora AI docs for agent pipelines, model configuration, and runtime concepts.