Elevenlabs conversational AI
Using jambonz to connect custom telephony to Elevenlabs conversational AI
The jambonz application referenced in this article can be found here.
This is an example Jambonz application that connects to the Elevenlabs Realtime API and illustrates how to build a Voice-AI application using Jambonz and Elevenlabs. This application utilizes a weather REST API to enable Elevenlabs to answer callers’ questions about the weather for specified locations.
Authentication
To use this application, you’ll need an Elevenlabs Agent ID that has access to the Realtime API. Set the Agent ID as an environment variable before launching the application, like so:
Replace <agent_id>
with your actual Elevenlabs Agent ID.
If you’re using a private agent, you must also set the ELEVENLABS_API_KEY environment variable when starting the application.
Configuring the Assistant
Elevenlabs requires the assistant to be configured before connecting to the agent.
This application uses the llm
verb with llmOptions
to send the initial configuration to Elevenlabs.
For details, refer to the Elevenlabs documentation:
Elevenlabs Agent Setup.
Client tools
Elevenlabs client tools, setup a tool with promt to get weather.
actionHook properties
Like many Jambonz verbs, the llm
verb sends an actionHook
with a final status when the verb completes.
The payload includes a completion_reason
property indicating why the llm
session ended.
Possible values for completion_reason
are:
- Normal conversation end
- Connection failure
- Disconnect from remote end
- Server failure
- Server error
Ensure all environment variables are properly configured before starting the application. For detailed API references and documentation, visit the Elevenlabs Documentation.