For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
  • Get started
    • Overview
    • Quickstart
  • Configure
    • Overview
    • Voice & language
    • Knowledge base
    • Tools
    • Personalization
    • Authentication
  • Deploy
    • Overview
    • Environment variables
    • WhatsApp
    • Batch calls
  • Monitor
    • Overview
    • Users
    • Testing
    • Experiments
    • Versioning
    • Conversation Analysis
    • Analytics
    • Real-time monitoring
    • OpenTelemetry traces
    • Privacy
    • Cost optimization
    • CLI
  • Advanced
    • Events
    • Custom models
    • LLM cascading
    • Post-call webhooks
  • Resources
    • UI components
  • Guides
    • Chat Mode
    • Burst pricing
    • ElevenLabs' docs agent
    • Scaling user interviews
    • Simulate Conversations
        • WSSAgent WebSockets
          • GETList tests
          • GETGet test
          • POSTCreate test
          • PUTUpdate test
          • DELDelete test
          • POSTGet test summaries
          • POSTRun tests on agent
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
API referenceTests

Run tests on agent

POST
/v1/convai/agents/:agent_id/run-tests
POST
/v1/convai/agents/:agent_id/run-tests
$curl -X POST https://api.elevenlabs.io/v1/convai/agents/agent_id/run-tests \
> -H "Content-Type: application/json" \
> -d '{
> "tests": [
> {
> "test_id": "string"
> }
> ]
>}'
1{
2 "id": "string",
3 "test_runs": [
4 {
5 "test_run_id": "string",
6 "test_invocation_id": "string",
7 "agent_id": "string",
8 "status": "pending",
9 "test_id": "string",
10 "test_info": {
11 "type": "llm",
12 "chat_history": [
13 {
14 "role": "user",
15 "time_in_call_secs": 1,
16 "agent_metadata": {
17 "agent_id": "string",
18 "branch_id": "string",
19 "workflow_node_id": "string",
20 "version_id": "string"
21 },
22 "message": "string",
23 "multivoice_message": {
24 "parts": [
25 {
26 "text": "string",
27 "voice_label": "string",
28 "time_in_call_secs": 1
29 }
30 ]
31 },
32 "tool_calls": [
33 {
34 "request_id": "string",
35 "tool_name": "string",
36 "params_as_json": "string",
37 "tool_has_been_called": true,
38 "type": "system",
39 "tool_details": {
40 "type": "webhook",
41 "method": "string",
42 "url": "string",
43 "body": "string",
44 "headers": {},
45 "path_params": {},
46 "query_params": {}
47 }
48 }
49 ],
50 "tool_results": [
51 {
52 "request_id": "string",
53 "tool_name": "string",
54 "result_value": "string",
55 "is_error": true,
56 "is_blocked": false,
57 "tool_has_been_called": true,
58 "tool_latency_secs": 0,
59 "error_type": "",
60 "raw_error_message": "",
61 "dynamic_variable_updates": [
62 {
63 "variable_name": "string",
64 "old_value": "string",
65 "new_value": "string",
66 "updated_at": 1.1,
67 "tool_name": "string",
68 "tool_request_id": "string"
69 }
70 ],
71 "type": "client"
72 }
73 ],
74 "feedback": {
75 "score": "like",
76 "time_in_call_secs": 1
77 },
78 "llm_override": "string",
79 "conversation_turn_metrics": {
80 "metrics": {},
81 "convai_asr_provider": "string",
82 "convai_tts_model": "string",
83 "convai_tts_cascade": "string"
84 },
85 "rag_retrieval_info": {
86 "chunks": [
87 {
88 "document_id": "string",
89 "chunk_id": "string",
90 "vector_distance": 1.1
91 }
92 ],
93 "embedding_model": "e5_mistral_7b_instruct",
94 "retrieval_query": "string",
95 "rag_latency_secs": 1.1,
96 "used_chunk_ids": [
97 "string"
98 ]
99 },
100 "llm_usage": {
101 "model_usage": {}
102 },
103 "interrupted": false,
104 "original_message": "string",
105 "source_medium": "audio",
106 "source_event_id": 1,
107 "used_static_kb_document_ids": [
108 "string"
109 ]
110 }
111 ],
112 "conversation_initiation_source": "unknown",
113 "dynamic_variables": {},
114 "failure_examples": [
115 {
116 "response": "string",
117 "type": "string"
118 }
119 ],
120 "from_conversation_metadata": {
121 "conversation_id": "string",
122 "agent_id": "string",
123 "branch_id": "string",
124 "workflow_node_id": "string",
125 "original_agent_reply": [
126 {
127 "role": "user",
128 "time_in_call_secs": 1,
129 "agent_metadata": {
130 "agent_id": "string",
131 "branch_id": "string",
132 "workflow_node_id": "string",
133 "version_id": "string"
134 },
135 "message": "string",
136 "multivoice_message": {
137 "parts": [
138 {
139 "text": "string",
140 "voice_label": "string",
141 "time_in_call_secs": 1
142 }
143 ]
144 },
145 "tool_calls": [
146 {
147 "request_id": "string",
148 "tool_name": "string",
149 "params_as_json": "string",
150 "tool_has_been_called": true,
151 "type": "system",
152 "tool_details": {
153 "type": "api_integration_webhook",
154 "credential_id": "",
155 "integration_connection_id": "",
156 "integration_id": "",
157 "webhook_details": {
158 "method": {},
159 "url": {},
160 "headers": {},
161 "path_params": {},
162 "query_params": {},
163 "body": {},
164 "type": {}
165 }
166 }
167 }
168 ],
169 "tool_results": [
170 {
171 "request_id": "string",
172 "tool_name": "string",
173 "result_value": "string",
174 "is_error": true,
175 "is_blocked": false,
176 "tool_has_been_called": true,
177 "tool_latency_secs": 0,
178 "error_type": "",
179 "raw_error_message": "",
180 "dynamic_variable_updates": [
181 {
182 "variable_name": "string",
183 "old_value": "string",
184 "new_value": "string",
185 "updated_at": 1.1,
186 "tool_name": "string",
187 "tool_request_id": "string"
188 }
189 ],
190 "type": "client"
191 }
192 ],
193 "feedback": {
194 "score": "like",
195 "time_in_call_secs": 1
196 },
197 "llm_override": "string",
198 "conversation_turn_metrics": {
199 "metrics": {},
200 "convai_asr_provider": "string",
201 "convai_tts_model": "string",
202 "convai_tts_cascade": "string"
203 },
204 "rag_retrieval_info": {
205 "chunks": [
206 {
207 "document_id": "string",
208 "chunk_id": "string",
209 "vector_distance": 1.1
210 }
211 ],
212 "embedding_model": "e5_mistral_7b_instruct",
213 "retrieval_query": "string",
214 "rag_latency_secs": 1.1,
215 "used_chunk_ids": [
216 "string"
217 ]
218 },
219 "llm_usage": {
220 "model_usage": {}
221 },
222 "interrupted": false,
223 "original_message": "string",
224 "source_medium": "audio",
225 "source_event_id": 1,
226 "used_static_kb_document_ids": [
227 "string"
228 ]
229 }
230 ]
231 },
232 "success_condition": "",
233 "success_examples": [
234 {
235 "response": "string",
236 "type": "string"
237 }
238 ]
239 },
240 "branch_id": "string",
241 "workflow_node_id": "string",
242 "agent_responses": [
243 {
244 "role": "user",
245 "time_in_call_secs": 1,
246 "agent_metadata": {
247 "agent_id": "string",
248 "branch_id": "string",
249 "workflow_node_id": "string",
250 "version_id": "string"
251 },
252 "message": "string",
253 "multivoice_message": {
254 "parts": [
255 {
256 "text": "string",
257 "voice_label": "string",
258 "time_in_call_secs": 1
259 }
260 ]
261 },
262 "tool_calls": [
263 {
264 "request_id": "string",
265 "tool_name": "string",
266 "params_as_json": "string",
267 "tool_has_been_called": true,
268 "type": "system",
269 "tool_details": {
270 "type": "webhook",
271 "method": "string",
272 "url": "string",
273 "body": "string",
274 "headers": {},
275 "path_params": {},
276 "query_params": {}
277 }
278 }
279 ],
280 "tool_results": [
281 {
282 "request_id": "string",
283 "tool_name": "string",
284 "result_value": "string",
285 "is_error": true,
286 "is_blocked": false,
287 "tool_has_been_called": true,
288 "tool_latency_secs": 0,
289 "error_type": "",
290 "raw_error_message": "",
291 "dynamic_variable_updates": [
292 {
293 "variable_name": "string",
294 "old_value": "string",
295 "new_value": "string",
296 "updated_at": 1.1,
297 "tool_name": "string",
298 "tool_request_id": "string"
299 }
300 ],
301 "type": "client"
302 }
303 ],
304 "feedback": {
305 "score": "like",
306 "time_in_call_secs": 1
307 },
308 "llm_override": "string",
309 "conversation_turn_metrics": {
310 "metrics": {},
311 "convai_asr_provider": "string",
312 "convai_tts_model": "string",
313 "convai_tts_cascade": "string"
314 },
315 "rag_retrieval_info": {
316 "chunks": [
317 {
318 "document_id": "string",
319 "chunk_id": "string",
320 "vector_distance": 1.1
321 }
322 ],
323 "embedding_model": "e5_mistral_7b_instruct",
324 "retrieval_query": "string",
325 "rag_latency_secs": 1.1,
326 "used_chunk_ids": [
327 "string"
328 ]
329 },
330 "llm_usage": {
331 "model_usage": {}
332 },
333 "interrupted": false,
334 "original_message": "string",
335 "source_medium": "audio",
336 "source_event_id": 1,
337 "used_static_kb_document_ids": [
338 "string"
339 ]
340 }
341 ],
342 "test_name": "Unknown Test",
343 "condition_result": {
344 "result": "success",
345 "rationale": {
346 "messages": [
347 "string"
348 ],
349 "summary": ""
350 }
351 },
352 "last_updated_at_unix": 1,
353 "metadata": {
354 "workspace_id": "string",
355 "test_name": "string",
356 "ran_by_user_email": "string",
357 "test_type": "llm"
358 },
359 "root_folder_id": "string",
360 "root_folder_name": "string",
361 "environment": "string"
362 }
363 ],
364 "agent_id": "string",
365 "branch_id": "string",
366 "created_at": 1,
367 "folder_id": "string",
368 "repeat_count": 1,
369 "bucketing_status": "pending",
370 "result_groups": [
371 {
372 "test_id": "string",
373 "test_name": "string",
374 "buckets": [
375 {
376 "test_run_ids": [
377 "string"
378 ],
379 "title": "string",
380 "reason": "string",
381 "status": "pending"
382 }
383 ],
384 "workflow_node_id": "string"
385 }
386 ]
387}
Run selected tests on the agent with provided configuration. If the agent configuration is provided, it will be used to override default agent configuration.
Was this page helpful?
Previous

Create folder

Next
Built with

Path parameters

agent_idstringRequired
The id of an agent. This is returned on agent creation.

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
testslist of objectsRequired
List of tests to run on the agent
agent_config_overrideobject or nullOptional
Configuration overrides to use for testing. If not provided, the agent's default configuration will be used.
branch_idstring or nullOptional
ID of the branch to run the tests on. If not provided, the tests will be run on the agent default configuration.
repeat_countintegerOptional1-20Defaults to 1
Number of times to run each test. When greater than 1, results are grouped and summarized.

Response

Successful Response
idstring
test_runslist of objects
agent_idstring or null
branch_idstring or null
created_atinteger
folder_idstring or null
repeat_countintegerDefaults to 1
bucketing_statusenum or null

None when repeat_count==1 (no bucketing). Otherwise tracks bucketing lifecycle.

Allowed values:
result_groupslist of objects

Errors

422
Unprocessable Entity Error