LemonSlice
Updated
Integrate LemonSlice AI avatars into Conversational AI Engine.
LemonSlice provides AI-powered avatar agents that generate synchronized video and audio responses in real time, enabling natural video conversations with your AI agents.
Sample configuration
The following examples show how to configure a LemonSlice avatar when starting a conversational AI agent.
from agora_agent import Agent
from agora_agent.agentkit.vendors import LemonSlice
# client is your configured Agora client
agent = (
Agent(client)
.with_stt(...) # configure your STT vendor
.with_llm(...) # configure your LLM vendor
.with_tts(...) # configure your TTS vendor
.with_avatar(LemonSlice(
api_key='<LEMONSLICE_API_KEY>',
agora_uid='<AGORA_UID>',
additional_params={
'agent_image_url': '<IMAGE_URL>', # or agent_id, or agent_image_base64
'aspect_ratio': '2x3',
},
))
)import { Agent, LemonSlice } from 'agora-agents';
// client is your configured Agora client
const agent = new Agent({ client })
.withStt(/* configure your STT vendor */)
.withLlm(/* configure your LLM vendor */)
.withTts(/* configure your TTS vendor */)
.withAvatar(new LemonSlice({
apiKey: '<LEMONSLICE_API_KEY>',
agoraUid: '<AGORA_UID>',
additionalParams: {
agent_image_url: '<IMAGE_URL>', // or agent_id, or agent_image_base64
aspect_ratio: '2x3',
},
}));import (
"github.com/AgoraIO/agora-agents-go/v2/agentkit"
"github.com/AgoraIO/agora-agents-go/v2/agentkit/vendors"
)
// client is your configured Agora client
agent := agentkit.NewAgent(client).WithStt(/* configure your STT vendor */).
WithLlm(/* configure your LLM vendor */).
WithTts(/* configure your TTS vendor */).
WithAvatar(
vendors.NewLemonSlice(vendors.LemonSliceOptions{
APIKey: "<LEMONSLICE_API_KEY>",
AgoraUID: "<AGORA_UID>",
AdditionalParams: map[string]interface{}{
"agent_image_url": "<IMAGE_URL>", // or agent_id, or agent_image_base64
"aspect_ratio": "2x3",
},
}),
)Set vendor to generic and use the following avatar configuration in your request:
"avatar": {
"vendor": "generic",
"params": {
"api_key": "<LEMONSLICE_API_KEY>",
"api_base_url": "https://lemonslice.com/api/liveai/agora",
"avatar_id": "lemonslice",
"agent_image_url": "<IMAGE_URL>",
"agora_token": "<AGORA_TOKEN>",
"agora_uid": "<AGORA_UID>",
"aspect_ratio": "2x3"
}
}Key parameters
| Parameter | Description |
|---|---|
api_keystring | The API key used for authentication with LemonSlice. Get your API key from your LemonSlice account. |
api_base_urlstring | The base URL of the LemonSlice API endpoint. Set to |
avatar_idstring | Fixed value that identifies the vendor integration. Always set to |
agent_image_urlstring | A publicly accessible URL to the avatar image. Provide exactly one of |
agent_idstring | The ID of a LemonSlice agent to use as the avatar. Provide exactly one of |
agent_image_base64string | A base64-encoded avatar image. Provide exactly one of |
aspect_ratiostring | The output aspect ratio for the avatar video. One of |
agora_tokenstring | The RTC token that authorizes the avatar to join the video channel. Generate this token using your Agora project credentials. |
agora_uidstring | The unique identifier for the avatar's RTC connection. This must be different from other participants in the channel. |
For advanced configuration options, refer to the LemonSlice Agora integration page or the LemonSlice API documentation.
This integration is fully supported for use with Conversational AI Engine. While it has completed functional validation, it is newer to the platform, and additional provider-specific edge cases may be identified as usage scales across a broader range of applications and workloads.
