- Android Studio with JDK 17+
- An Android device or emulator with microphone support
- Agora CLI
The easiest path is to let the Agora CLI scaffold the app and write Android credentials to local.properties.
curl -fsSL https://dl.agora.io/cli/install.sh | sh
agora --help
agora login
agora init my-android-demo --template android
cd my-android-demo
JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew :app:assembleDebugagora init clones this starter, selects or creates an Agora project, writes .agora/project.json, and writes Agora credentials to root local.properties.
Use this if you already cloned this repository:
git clone https://github.com/AgoraIO-Conversational-AI/agent-quickstart-android.git
cd agent-quickstart-android
agora login
agora quickstart env write . --template android --project <your-project>
agora project doctor --deep
JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew :app:assembleDebugThe env command writes:
AGORA_APP_ID=...
AGORA_APP_CERTIFICATE=...to root local.properties.
Use this only if you are not using the Agora CLI.
Create or choose an Agora project with Conversational AI enabled.
You need:
App IDApp Certificate- access to RTC and RTM for the project
git clone <your-fork-or-repo-url>
cd agent-quickstart-androidPut the following values in local.properties at the repo root:
AGORA_APP_ID=your_agora_app_id
AGORA_APP_CERTIFICATE=your_agora_app_certificate
AGORA_AGENT_UID=123456Optional values:
AGORA_CONVOAI_BASE_URL=https://api.agora.io/api/conversational-ai-agent/v2/projects
AGORA_AREA=USJAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew :app:assembleDebugOpen the project in Android Studio, or run it from the command line, then launch it on a device or emulator.
Tap Start voice session, allow microphone permission, speak to the agent, and watch transcripts appear in realtime. Use the end-session control to stop the conversation cleanly.
Required in local.properties:
AGORA_APP_IDAGORA_APP_CERTIFICATE
Optional in local.properties:
AGORA_AGENT_UID, defaults to123456AGORA_CONVOAI_BASE_URL, defaults tohttps://api.agora.io/api/conversational-ai-agent/v2/projectsAGORA_AREA, defaults toUS
Notes:
AGORA_APP_IDalso supports the legacy keyagora.app.idAGORA_AREAmaps to the ConvoAI RESTgeofence.areavalue
The demo starts the agent with the default Agora-managed stack:
deepgram_nova_3openai_gpt_4o_miniminimax_speech_2_6_turbo
It also enables:
- RTM event delivery
- RTM data channel transcripts
- RTM pipeline metrics
- agent subscription scoped to the generated requester RTC UID
- chorus audio scenario for the agent and local RTC engine
- start-of-speech interruption
- VAD-based end-of-speech detection
This repo is intentionally a direct REST demo.
It is useful when you want to:
- learn how Agora Conversational AI works end to end
- ship a quick prototype without a backend
- build a reusable Android template for your team
- understand the minimum code needed for a voice AI app
It is not production-safe as-is because the App Certificate is packaged into the Android app and used for local token generation.
For production:
- move token generation to your backend
- move REST
join,interrupt, andleavecalls to your backend - keep the Android app as a thin UI client
- never ship the App Certificate inside the app