For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

ElevenLabs Integration for TestMu AI Agent Testing

The ElevenLabs integration connects an agent built on the ElevenLabs Agents Platform to a Phone Caller agent in the TestMu AI Agent Testing Platform. TestMu AI imports the agent's prompt and tool catalog, and after every test call it checks which tools the agent actually called. A transcript shows what the agent said. The integration shows what it did behind the call.

Without the integration, TestMu AI still tests any ElevenLabs agent that answers a phone number, with transcripts, recordings, grading, and call quality metrics. Connect it when you also want the prompt imported and the tool calls checked.

Integration at a Glance​


ItemDetails
Agent typePhone Caller, inbound. TestMu AI calls your ElevenLabs agent's phone number.
Where you connectThe agent's Integrations tab, on the ElevenLabs card.
What you needAn ElevenLabs API key and the agent's ID.
What is importedThe agent's prompt and tool catalog.
What is checkedWhether the agent called each tool a scenario expects, with the arguments and result of every call.

Prerequisites​


In ElevenLabs​

  • A published agent with a phone number imported under Phone Numbers, over native telephony, Twilio, or a SIP trunk.
  • An ElevenLabs API key and the agent's ID, obtained through your organization's approved credential process.

In TestMu AI​

  • A Phone Caller agent with the call type Inbound (Bot receives calls), with the ElevenLabs agent's phone number added on its Phone Numbers tab. See Test an Inbound Phone Agent.
warning

API keys are secrets. Enter them only in the integration form, never in a scenario, prompt, test data file, or source code.

Connect ElevenLabs​


  1. Open the Phone Caller agent and select Integrations.
  2. Select Connect on the ElevenLabs card.
Integrations tab of a Phone Caller Inbound agent, with Connect buttons on the ElevenLabs, Retell, VAPI, Agentforce, Cartesia, and Amazon Connect cards
  1. Fill in the fields, then select Save.
FieldRequiredWhat to enter
ElevenLabs API KeyYesYour ElevenLabs API key.
ElevenLabs Agent IDYesThe ID of the ElevenLabs agent you want to test.

The connection works when the card shows Connected and a Re-sync button. TestMu AI stores the credentials as HyperExecute secrets, scoped to this agent. One provider can be connected per agent, so use a separate TestMu AI agent to test another ElevenLabs agent or provider.

Sync the Prompt and Tools​


On the Prompt tab, select Sync from ElevenLabs. TestMu AI imports the agent's prompt and refreshes its tool catalog: the actions the agent can take, such as booking an appointment or transferring to a human. Generate your scenarios from the imported prompt.

Sync again after you change the agent in ElevenLabs, so the prompt and tools match what is deployed.

Select the Expected Tools for Each Scenario​


Open a scenario and, in the scenario editor, select each tool from the synced catalog that the scenario expects the agent to call.

Example scenarioExpected tools
Bookingcheck_availability, book_appointment
Cancellationcancel_appointment
  • Select only the tools the scenario must check. The tool check passes only if the agent called all of them.
  • Scenarios with no tools selected still run, without a tool check.
  • If the catalog changes in ElevenLabs, sync again. The scenario editor warns you when a selected tool no longer exists.

Run a Test and Read the Tool Calls​


Start with one short scenario and one expected tool in a small suite, to confirm that the right agent answers and the tool check works. Then run your suites as for any inbound phone agent.

Open a call and select the Tool Calls tab.

SectionWhat it shows
Expected Tool ValidationEach tool selected on the scenario, marked Called or Not Called.
Selected AUT Tool CallsEach call the agent made to a selected tool, with its status, arguments, and result.
AUT Tool CallsEvery tool the agent called, including tools you didn't select, so unexpected calls are visible.
  • Read the transcript and the tool calls together. If the agent says it booked or transferred while the tool shows Not Called, it claimed an action it didn't take.
  • A tool that ran but returned an error still shows Called, so check the result of each call.
  • Not Called can be the right outcome, for example when the caller never gave the agent the details it needed.

Troubleshooting​


ProblemWhat to do
The API key is rejectedCreate or copy a valid key in ElevenLabs, then save it again.
The agent isn't foundCheck that the agent ID is an ElevenLabs agent ID, copied in full.
The wrong agent answersCheck the saved agent ID and the number on the Phone Numbers tab, then run the short test again.
No tools appear in the scenario editorConfirm the agent has tools in ElevenLabs, then select Re-sync.
The scenario editor warns that selected tools no longer matchThe catalog changed in ElevenLabs. Sync again and review the scenario's tools.
A call shows no expected tools mappedThe scenario has no tools selected, so only the call itself was graded. Select its expected tools.
Calls sound distorted or fail audio quality checksSIP calls run at G711 8 kHz or G722 16 kHz, whatever audio format the agent uses for WebSocket connections. Check the codec before treating it as an agent problem.
A key may have been exposedRotate it in ElevenLabs and save the new key.

Security and Credentials​


  • Saved credentials are stored as HyperExecute secrets, scoped to the agent where you save them.
  • TestMu AI uses them only to read the agent's configuration and check its activity during your test calls. It never modifies your agent.
  • Use separate keys for test and production, rotate them on your usual schedule, and disconnect the integration when you no longer need it.

Testing Tips for ElevenLabs Agents​


  • Fixed SIP codecs. SIP audio runs at G711 8 kHz or G722 16 kHz regardless of the agent's WebSocket audio format, so a codec mismatch can look like an audio quality failure.
  • Other surfaces. The integration works on phone calls. To test the same agent without a phone line, connect it as a voice agent over WebRTC or WebSocket, or as a chat agent in text-only mode over WebSocket.
  • Private agents. Over WebSocket, a private agent needs a signed link, and over WebRTC a conversation token. A public agent needs only its ID.
  • Text-only mode. Text-only conversations depend on the agent response event firing, so a silent failure shows up as a timeout.

Other Integrations​


Help and Support

Related Articles