The Agent Voice Response (AVR) platform supports integration with ElevenLabs Speech-to-Speech (STS), enabling high-quality, real-time conversational AI. ElevenLabs is well known for its natural and expressive voices, making it an excellent choice for creating human-like conversational agents.
| Variable | Description | Example Value |
|---|---|---|
PORT |
Port on which the ElevenLabs STS service runs | 6035 |
ELEVENLABS_AGENT_ID |
Static ElevenLabs Agent ID | your_agent_id |
ELEVENLABS_AGENT_URL |
HTTP endpoint returning the agent ID dynamically | https://your-api.com/agent |
ELEVENLABS_API_KEY |
API key (only required for private agents) | sk-xxxx |
⚠️ If
ELEVENLABS_AGENT_URLis set, it overridesELEVENLABS_AGENT_ID.
When ELEVENLABS_AGENT_URL is configured, AVR will dynamically resolve the agent to use per call.
X-AVR-UUID: <session-uuid>
{
"system": "your_elevenlabs_agent_id"
}
This enables per-session routing, personalization, and advanced business logic.
When using ELEVENLABS_AGENT_URL, AVR expects an HTTP endpoint that returns the ElevenLabs Agent ID to use for the current session.
This section shows a minimal Node.js + Express example that you can use as a starting point.
ELEVENLABS_AGENT_URLX-AVR-UUID:
system field set to the ElevenLabs Agent IDconst express = require('express');
const app = express();
const port = process.env.PORT || 3000;
app.get('/agent', (req, res) => {
// You can access the AVR session UUID here if needed
const avrUuid = req.headers['x-avr-uuid'];
// Example: return a static agent ID
res.json({
system: 'agent_'
});
});
app.listen(port, () => {
console.log(`Agent resolver listening on port ${port}`);
});
Point AVR to your service using the environment variable:
ELEVENLABS_AGENT_URL=http://your-agent-service:3000/agent
When this variable is set, AVR will ignore ELEVENLABS_AGENT_ID and resolve the agent dynamically for each call.
This approach enables powerful scenarios such as:
You can implement any business logic you want before returning the agent ID.
Before using this integration, configure your ElevenLabs Agent with the correct audio settings.



These settings are mandatory for proper compatibility with AVR.
ElevenLabs STS supports AVR tools, enabling the AI to trigger telephony actions.
avr_transfer — Transfers the call to another extension.avr_hangup — Gracefully ends the call.Custom tools are also supported.
📘 See full documentation:
https://wiki.agentvoiceresponse.com/en/avr-function-calls
Unlike OpenAI or Gemini, tools must be explicitly declared in the ElevenLabs web interface.

Repeat this process for default and custom tools.
avr_transferavr_transfer
avr_hangupavr_hangup
avr-sts-elevenlabs:
image: agentvoiceresponse/avr-sts-elevenlabs
platform: linux/x86_64
container_name: avr-sts-elevenlabs
restart: always
environment:
- PORT=6035
- ELEVENLABS_API_KEY=$ELEVENLABS_API_KEY
- ELEVENLABS_AGENT_ID=$ELEVENLABS_AGENT_ID
# - ELEVENLABS_AGENT_URL=$ELEVENLABS_AGENT_URL
- AMI_URL=${AMI_URL:-http://avr-ami:6006}
# volumes: # uncomment if you want to use the custom tools
# - ./tools:/usr/src/app/tools
networks:
- avr
avr-core:
image: agentvoiceresponse/avr-core
platform: linux/x86_64
container_name: avr-core
restart: always
environment:
- PORT=5001
- STS_URL=ws://avr-sts-elevenlabs:6035
ports:
- 5001:5001
networks:
- avr