Skip to main content

Overview

The Agora Conversational AI Engine provides realtime voice agents over Agora RTC. LemonSlice plugs in as the avatar layer through Agora’s generic avatar vendor.

Prerequisites

  1. A LemonSlice account and API key associated with an active subscription. Create a key at lemonslice.com/developers.
  2. A reference image for your avatar. See our guide for recommendations on how to design your avatar image to achieve the best quality possible.
  3. Agora Conversational AI setup
    • An Agora project with Conversational AI Engine enabled, plus an App ID and Basic Auth credentials for the REST API
    • A way to mint Agora RTC tokens for the end user, the Agora agent, and the LemonSlice avatar (three distinct UIDs). The agent and avatar tokens need publish permission; the user token needs publish (microphone) and subscribe.
If you are not already using the Agora Conversational AI Engine, start with their voice agent quickstart, or explore other LemonSlice integration paths.

How to use

1

Add LemonSlice to the Agora join request

When you call Agora’s Conversational AI join endpoint, add an avatar block under properties. Use Agora’s generic vendor pointed at LemonSlice:
2

Start the Agora agent

POST to Agora’s join endpoint with your usual asr, llm, and tts configuration plus the avatar block above:
Store the agent_id returned by Agora — you will need it to stop the session. agent_rtc_uid, the user UID in remote_rtc_uids, and avatar.params.agora_uid must all be different.
3

Subscribe to the avatar in your frontend

The end user joins the same Agora channel and subscribes to the LemonSlice avatar UID (agora_uid) for audio and video. Agora’s agent handles ASR → LLM → TTS; LemonSlice lip-syncs the TTS audio and publishes the avatar tracks.
4

Shutdown the session

Stop the Agora agent with Agora’s /leave API. Agora tears down the LemonSlice session together with the agent:
If the LemonSlice session is not shut down, it will remain active until the configured idle timeout is reached.