How It Works
ElevenLabs Agent
Handles voice input/output, speech-to-text, text-to-speech, and the real-time audio stream.
Chat Completions API
Receives OpenAI-compatible requests from ElevenLabs and routes them to your Digital Twin.
Digital Twin
Generates intelligent responses using its knowledge base, tools, assistants, and conversation memory.
Prerequisites
Before you begin, make sure you have:- An ElevenLabs account with access to Conversational AI Agents
- Created a voice in Eleven Labs and trained it
- A Praxis AI account with at least one Digital Twin configured
- Your Digital Twin’s Public ID (a UUID found in the administration panel)
Step 1: Create an ElevenLabs Agent

1
Go to the ElevenLabs Dashboard
Navigate to Conversational AI in your ElevenLabs account and create a new agent.
2
Choose a voice
Select a stock voice, or use ElevenLabs’ voice cloning to create a custom voice that matches your Digital Twin’s persona.
3
Configure the system prompt
The Digital Twin manages its own system instructions server-side. Use the ElevenLabs system prompt for voice-specific behavior only (e.g., greeting style, conversation pacing).
4
First Message
Type a greeting, for example
Hey there, ready to learn something new together?5
LLM
Select Custom LLM
Step 2: Connect to Custom LLM
This is the core configuration — tell your ElevenLabs agent to use your Digital Twin as its language model.
1
Open LLM settings
In your agent’s settings, go to the LLM section and select Custom LLM.
2
Set the Server URL
Enter your Chat Completions API base URL:
3
Set the Model ID
Enter your Digital Twin’s Public ID as the model:
The Model ID maps directly to the Digital Twin Public ID. ElevenLabs will include this in every request as the
model parameter — exactly how the Chat Completions API expects it.4
API Key
In the API Key section of your ElevenLabs custom-LLM dashboard, select your ElevenLabs API Key or create a new one.

Step 3: Configure Dynamic Variables
Dynamic variables let you pass user identity and conversation context from the client application through ElevenLabs to your Digital Twin. These are mapped to thex-praxis-* request headers that the Chat Completions API forwards to Praxis.
Define Variables in ElevenLabs

This is the example JSON configuration for your Agent’s custom LLM:

How Variables Flow
elevenlabs_extra_body:
Step 4: Configure Your Digital Twin
After setting up the ElevenLabs agent, you must configure your Digital Twin in Praxis to accept requests from ElevenLabs.
1
Open the Admin Dashboard
Navigate to the Admin dashboard and select your Digital Twin instance.
2
Go to Configuration
Open the Configuration tab and locate the ElevenLabs section.
3
Set the ElevenLabs Agent ID
Enter the Agent ID from your ElevenLabs Conversational AI agent. This is the identifier shown in your ElevenLabs dashboard under the agent settings.
4
Set the ElevenLabs API Key
Enter the same API Key you configured in Step 2. This allows the Chat Completions API to validate inbound requests from ElevenLabs.
See Configuration — ElevenLabs for full details on the credential fields (Agent ID and API Key).
Step 5: Use ElevenLabs for Convo Mode
Once the ElevenLabs agent is configured in your Digital Twin, you can select ElevenLabs as the voice provider for Pria’s built-in Convo Mode (speech-to-speech).
1
Open Personalization
In the Admin dashboard, select your Digital Twin instance and navigate to the Personalization tab.
2
Change the Convo Mode model
Under Convo Mode, select ElevenLabs from the list of supported voice providers.
3
Start a conversation
The Convo widget will now use your ElevenLabs agent for real-time speech-to-speech. Users can click the Convo button to speak directly with the Digital Twin.
Voice selection is not available in ElevenLabs Convo Mode. The voice used is the one configured in your agent’s settings on the ElevenLabs dashboard. To change the voice, update it in your ElevenLabs agent configuration.
Connection Method
ElevenLabs supports two connection methods for the audio stream between the browser and ElevenLabs servers:
The connection method can be configured in the Convo Mode settings. If users report connection issues in corporate or campus networks, switching to WebSocket typically resolves the problem.
Step 6: Deploy Client Widgets (optional)
ElevenLabs provides multiple ways to embed a voice agent in your application. Each method supports passing dynamic variables at session start.HTML Widget
The simplest option — add two lines to any web page:React Integration
For React applications, use the@elevenlabs/react package with dynamic variables:
JavaScript SDK (Vanilla)
For non-React applications, use the@elevenlabs/client SDK directly:
Securing Private Agents
For production deployments, use signed URLs to prevent unauthorized access to your ElevenLabs agent.1
Generate a signed URL on your server
2
Use the signed URL on the client
Full Example: Embeddable Support Widget
A complete React component that authenticates with your backend, starts a voice session with a Digital Twin, and displays the conversation transcript:Troubleshooting
Related
- Chat Completions API — Set up the OpenAI-compatible endpoint that powers this integration
- Web SDK — Embed the full Digital Twin UI (text + voice) in your app
- ElevenLabs Custom LLM Docs — Official ElevenLabs configuration reference
- ElevenLabs Dynamic Variables — How variables flow through the agent