This document guides AI agents working on the Agora Conversational AI demo project.
A real-time voice conversation application with AI agents, built with:
- Frontend: Next.js 16 + React 19 + TypeScript + Agora Web SDK
- Backend: Python FastAPI + Agora Conversational AI Agent SDK
.
├── web-client/ # Frontend application (Next.js + React)
└── server-python/ # Backend service (FastAPI + Agora Agent SDK)
# Install dependencies
bun install
# Start both frontend and backend
bun run dev
# Frontend only (port 3000)
bun run frontend
# Backend only (port 8000)
bun run backend- web-client/AGENTS.md — AI assistant guide for frontend development
- web-client/ARCHITECTURE.md — Detailed frontend architecture
- server-python/AGENTS.md — AI assistant guide for backend development
- server-python/ARCHITECTURE.md — Backend architecture details
- server-python/README.md — Backend API documentation
- ARCHITECTURE.md — Overall system architecture and data flow
| Layer | Technologies |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, Agora Web SDK (RTC + RTM), agora-agent-client-toolkit, Zustand, Tailwind CSS |
| Backend | Python 3.8+, FastAPI, agora-agent-server-sdk, uvicorn |
| Auth | Token007 (AccessToken2) — auto-generated from APP_ID + APP_CERTIFICATE |
| Real-time | Agora RTC (audio) + RTM (messaging/transcription) |
| AI Providers | Deepgram (ASR), OpenAI (LLM), ElevenLabs (TTS) |
See web-client/AGENTS.md for:
- UI component development
- State management patterns (Zustand)
- Agora SDK integration (RTC/RTM)
- API client usage
See server-python/AGENTS.md for:
- API endpoint development
- Agent lifecycle management (start/stop via AgentSession)
- Token generation (
generate_convo_ai_token) - ASR/LLM/TTS provider configuration
- Review ARCHITECTURE.md for system overview and data flow
- Check both module-specific AGENTS.md files
- Verify API contracts — frontend calls
/api/*, proxied to backend on port 8000 - Test token flow: backend generates Token007, frontend uses it for RTC/RTM
- Never commit
.env.localor credentials - Frontend proxies
/api/*requests to backend viaweb-client/proxy.ts - Agent lifecycle is managed by backend (AgentSession), not frontend
- All Agora SDK calls go through
useAgoraConnection.tshook on the frontend - Authentication uses Token007 (AccessToken2) — only
APP_IDandAPP_CERTIFICATEare needed - Backend uses
Agora(area=Area.US, ...)client with auto Token007 auth