Use ElevenLabs with SmythOS
This tutorial shows you how to connect a SmythOS Agent to ElevenLabs as a custom voice-activated tool. Once set up, you can speak to your ElevenLabs Agent and trigger complex SmythOS workflows using just your voice.
Prerequisites
Before you begin, you will need:
- An ElevenLabs account with access to the Agents feature.
- A deployed SmythOS Agent that is ready to receive API calls.
- Your Agent’s specific API Endpoint URL, which is the target for your voice commands.
1. Create a New Agent in ElevenLabs
First, set up the agent that will listen for your voice commands.
- Go to the Agents section in your ElevenLabs dashboard.
- Click Create New Agent.
- Assign a name and personality. This Agent will act as your primary voice interface.
2. Add a Custom Tool
Next, you'll teach your new agent about the SmythOS workflow it can trigger.
- Inside the ElevenLabs Agent’s configuration page, scroll to the Tools section.
- Click Add Tool and choose Custom Tool from the options. This opens the webhook configuration tab.
3. Configure the SmythOS Endpoint
This is the core of the integration. Fill in the fields using the information from your SmythOS agent's Swagger UI documentation.
- Name: A short, descriptive name for the action.
- Example:
smythos_web_search
- Example:
- Description: A clear instruction for the ElevenLabs agent. This is critical for it to understand when to use this tool.
- Example:
"Triggers the SmythOS Agent to perform a web search based on the user's spoken input."
- Example:
API Request Details
- Method: Set the HTTP method to match the endpoint's requirement.
- Value:
POST
- Value:
- URL: Paste the full API endpoint URL you copied from your SmythOS agent's Swagger page.
- Example:
https://cmbrxuq2w1c9rembjghyo9h16.agent.a.smyth.ai/api/web_search
- Example:
- Headers: Define the necessary headers for the request.
- Click Add header and set
Content-Type
toapplication/json
. - If your SmythOS endpoint requires authentication, add an
Authorization
header here.
- Click Add header and set
Request Payload
This section defines the JSON data that ElevenLabs will send to your SmythOS agent.
- In the request body section, you need to map the user's voice input to the JSON payload structure that your SmythOS agent expects.
- Use the variable format provided by the ElevenLabs UI (e.g.,
{{user_input}}
) to represent the dynamic spoken phrase. This tells ElevenLabs to insert the user's speech into thesearch_query
field when it calls the API.
{
"search_query": "{{user_input}}"
}
4. Test the Integration
- Save your Custom Tool setup in the ElevenLabs interface.
- Speak a test phrase to your ElevenLabs Agent that matches the tool's purpose, such as:
"Search for the latest Formula 1 updates."
Your ElevenLabs Agent will now:
- Recognize the intent to search and trigger the
smythos_web_search
tool. - Send a
POST
request to your SmythOS Agent's URL. - Include a JSON body like
{ "search_query": "the latest Formula 1 updates" }
. - Your SmythOS agent will then execute the search workflow.
Outcome
You’ve successfully enabled voice-triggered workflows between ElevenLabs and SmythOS. You can now create powerful, hands-free automation flows that connect your spoken commands to your agent's backend logic.
Next Steps
- Add more tools for different SmythOS agent tasks (e.g.,
send_email
,Tasks/Reminders
,update_crm
). - Explore handling responses: Teach your ElevenLabs agent to speak back with the output from the SmythOS workflow.
- Learn more about how to use the Agent API for other types of advanced integrations.