Protoface
Updated
Use a Protoface avatar to represent your agent on video in a Conversational AI Platform agent.
Preview documentation
Protoface provides real-time AI avatars that add a talking, lip-synced face to your voice agents, enabling natural video conversations with your AI agents.
Sample configuration
The following example shows how to configure Protoface as the agent's avatar when you create or update an agent. For a complete example, see Create an agent and start a session.
Protoface supports BYOK only. It isn't available in managed mode. Store your Protoface API key in a secret set, and refer to it from the agent. For details, see Use your own provider keys.
from agora_agent import Agent, Protoface, secret_ref
# client is your configured Agora client
agent = (
Agent(client=client)
.with_stt(...) # configure your ASR vendor
.with_llm(...) # configure your LLM vendor
.with_tts(...) # configure your TTS vendor
.with_avatar(
Protoface(
api_key=secret_ref("support_prod", "protoface"),
api_base_url="https://api.protoface.com/v1/agora",
avatar_id="<protoface_avatar_id>",
agora_uid="<avatar_rtc_uid>",
agora_token="<avatar_rtc_token>",
)
)
)import { Agent, Protoface, secretRef } from 'agora-agents';
// client is your configured Agora client
const agent = new Agent({ client })
.withStt(/* configure your ASR vendor */)
.withLlm(/* configure your LLM vendor */)
.withTts(/* configure your TTS vendor */)
.withAvatar(
new Protoface({
apiKey: secretRef('support_prod', 'protoface'),
apiBaseUrl: 'https://api.protoface.com/v1/agora',
avatarId: '<protoface_avatar_id>',
agoraUid: '<avatar_rtc_uid>',
agoraToken: '<avatar_rtc_token>',
}),
);// client is your configured Agora client
agent := agentkit.NewAgent(client).
WithStt( /* configure your ASR vendor */ ).
WithLlm( /* configure your LLM vendor */ ).
WithTts( /* configure your TTS vendor */ ).
WithAvatar(vendors.NewProtoface(vendors.ProtofaceOptions{
APIKey: agentkit.SecretRef("support_prod", "protoface"),
APIBaseURL: "https://api.protoface.com/v1/agora",
AvatarID: "<protoface_avatar_id>",
AgoraUID: "<avatar_rtc_uid>",
AgoraToken: "<avatar_rtc_token>",
}))Add an avatar block to the pipeline. Protoface uses the generic avatar vendor. Set credential.mode to byok and credential.fields.api_key to the reference. In the following example, the key is stored as protoface in the support_prod set:
"avatar": {
"enabled": true,
"credential": {
"mode": "byok",
"fields": {
"api_key": "$secrets.support_prod.protoface"
}
},
"vendor": "generic",
"params": {
"api_base_url": "https://api.protoface.com/v1/agora",
"avatar_id": "<protoface_avatar_id>",
"agora_token": "<avatar_rtc_token>",
"agora_uid": "<avatar_rtc_uid>"
}
}Key parameters
The avatar block takes the following fields. In the SDKs, Protoface sets them from its options, and passes any other parameters from its additional parameters option to params.
enabledbooleanSet to true to show the avatar.
vendorstringSet to generic.
credentialobjectSet mode to byok and fields.api_key to a $secrets.<set>.<key> reference to your Protoface API key. Get your API key from the Protoface dashboard.
paramsobjectapi_base_urlstringThe base URL of the Protoface API endpoint. Set to https://api.protoface.com/v1/agora.
avatar_idstringThe ID of the Protoface avatar to use, for example, av_stock_001. Find a stock avatar or create your own in the Protoface dashboard.
agora_tokenstringThe RTC token that authorizes the avatar to join the video channel. Generate this token using your Agora project credentials.
agora_uidstringThe unique identifier for the avatar's RTC connection. This must be different from other participants in the channel.
For more information about avatars, refer to the Protoface avatar documentation. For a complete working project, see the Protoface Agora quickstart.
This integration is fully supported for use with the Conversational AI Platform. 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.
