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
- A voice created (and, if cloned, trained) in ElevenLabs
- 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:
ElevenLabs includes this value as the
model parameter on every request. Note that the Digital Twin that actually serves the request is resolved from the user’s x_access_token — or the x-praxis-institution-public-id header when targeting a specific Twin — as described in the Chat Completions API docs.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
Pria reads the context exclusively from the
x-praxis-* HTTP headers, so configure the custom-header mapping shown above. ElevenLabs’ Extra Body option (which copies dynamic variables into the request body under elevenlabs_extra_body) is not read by Pria — headers are the required channel.Step 4: Configure Your Digital Twin
Now set the Praxis side up, in the Admin dashboard with your Digital Twin open.
1
Turn on the Chat Completions endpoint
On Configuration and Integrations, in the Chat Completion section, tick Enable Chat Completion endpoint.
2
Turn on Convo
Still on Configuration and Integrations, under Realtime / Convo, tick Enable Convo (Speech-to-Speech).
3
Choose ElevenLabs as the voice
On Personalization and AI Models, set Speech-to-Speech Model to an ElevenLabs model.

4
Enter the credentials
Return to Configuration and Integrations, where an ElevenLabs Voice Cloning section has now appeared:
- ElevenLabs Agent ID (for Digital Twin Voice) — the
agent_…identifier from your ElevenLabs dashboard - ElevenLabs API Key — the same key from Step 2. Pria uses it server-side to start each conversation with your agent; it is never exposed to the browser
- ElevenLabs Connection Method — see below
5
Start a conversation
Users can now press the Convo button and speak to the Digital Twin.
See Configuration — ElevenLabs for full details on the credential fields.
You don’t pick the voice in Praxis. The voice is whichever one your ElevenLabs agent is set to — change it in your ElevenLabs agent configuration.
Connection Method
ElevenLabs Connection Method decides how the audio travels between the listener’s browser and ElevenLabs:
Start on the default and only try WebRTC if you want to shave latency and your users aren’t behind restrictive networks. If you switched to WebRTC and people report connection failures, switch back.
Step 5: 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
On a live site, 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