On this page
Test an agent
Test the behavior you expect before changing the live agent. For the equipment-service agent, check that it verifies Alex’s access before discussing the request, books only an agreed slot and handles unavailable dispatchers.
Start with a simulation: give a fictional caller a goal, provide mock responses for your tools and assert what the agent should do. Then test spoken interaction in the browser and number routing with a controlled phone call. The table below explains what each method executes.
Prerequisites
Use a member or admin key for the intended environment and publish a test version with live: false. Run admission must be enabled even for simulations. See workspace setup.
Testing methods
| Method | Use it to check | Carrier effects | Customer HTTP actions |
|---|---|---|---|
| Simulation suite | Repeatable conversation paths and assertions against a test publication | No dialing; transfers use mocks or simulated defaults | Mocks answer; an unmocked action fails before sending |
| Browser voice session | Speech, interruptions and audio; create a session and join it | No dialing; transfers are refused | Calls the publication's configured endpoints with its credentials |
Phone run with test: true | Real routing and audio with a ready trunk and caller ID | Dials real numbers; permitted transfers are real | Calls the publication's configured endpoints with its credentials |
A phone run places a real call even with test: true.
Runs marked as tests are excluded from Cumulus billing, customer lifecycle webhooks and event triggers. Carrier charges remain your carrier's responsibility. live: false keeps a publication separate from the live head; it does not replace its business endpoints. Use synthetic records and an isolated agent with sandbox endpoints for browser and carrier tests.
If you author in TypeScript, local validation checks the definition without contacting Cumulus. A simulation runs the conversation against your saved case; browser and phone tests also use the configured speech services.
A suite contains cases, each with a simulated caller and assertions. Use a persona for a caller with a goal or a script for fixed lines. Text is the default. Where enabled, an audio case uses a scripted caller with a configured voice and joins the agent over LiveKit; it does not reach a carrier. Check audio worker and provider readiness separately from text simulation.
Call POST /api/v1/test-runs with the publication version to test. For a draft, publish with "live": false first. Simulations need no trunk or phone number, but Cumulus must enable run admission. Closed admission returns tenant_not_configured or tenant_admission_closed.
Create a simulation suite and run it
Replace the agent, node and action IDs below with IDs from your draft, and supply all dynamic variables the publication requires. The mock returns a successful authorization lookup; mock every other customer HTTP action the case can reach. Use the publication version returned when you published the test version, and the suite ID returned by suite creation. Send mutation requests with an Idempotency-Key.
POST /api/v1/test-suites
{
"agent_id": "equipment-service",
"name": "Service access verification",
"spec": { "kind": "simulation", "cases": [{
"case_id": "identity-confirms", "name": "The caller confirms their identity", "language": "en",
"caller": { "kind": "persona", "goal": "Confirm you are Alex and ask what the service call is about",
"brief": "You manage the warehouse. Ask who is calling before confirming your identity." },
"dynamic_variables": { "contact_name": "Alex", "service_request_id": "SR-DEMO-24" },
"mocks": [{ "action_id": "lookup_service_request", "respond": {
"kind": "response", "status": 200,
"body": { "authorized": true, "equipment_summary": "Loading-bay equipment" }
} }],
"assertions": [
{ "type": "node_visited", "id": "identity-checked", "node_ids": ["authorization"] },
{ "type": "agent_says", "id": "no-equipment-details-before-id", "expect": "never", "match": { "patterns": ["loading-bay equipment"] },
"scope": { "until_node": "authorization" } }
]
}] }
}
POST /api/v1/test-runs
{ "agent_id": "equipment-service", "version": 3, "suite_ids": ["<suite_id>"] }
- Deterministic assertions check the path and the words:
node_visited,node_not_visited,final_node,path,agent_says,tool_called,variable,ended,transfer,disposition. Arubricassertion uses a model to judge your criteria. Review its reasoning against the conversation. mocksanswer customer HTTP actions byaction_id. An unmocked customer HTTP action fails withunmocked_actionbefore sending; built-in actions have simulated defaults.- Each case runs
trialstimes (default 1, at most 10) and passes bypass_policy(majorityorall).POST /api/v1/test-runs/estimategives the trials, cost and minutes first. - Poll
GET /api/v1/test-runs/{test_run_id}untilstateiscompletedorcancelled;…/resultslists every case and assertion verdict, and…/cases/{case_id}/trials/{trial}shows the transcript a trial was judged on. POST /api/v1/test-suites/{suite_id}/validatechecks a suite's node, action and variable references against a version or the open draft.
Private keypad tests
verify_identity and tokenize_private nodes execute only on telephone runs. Browser, cloud and simulation runs containing these nodes return capability_unavailable. Test them with a dedicated telephone number and synthetic values instead.
Validate the policy locally, then test it with a development agent, a dedicated number, synthetic values and a sandbox vault. The recipient must consent to the call. # submits a field; * cancels. A timeout, disconnect, malformed input or stale activation fails closed. There is no automatic recapture of another guess or automatic replay of an uncertain vault send.
Check the selected success or failure route and the tool receipt. For tokenization, inspect the returned token and permitted last-four suffix. Confirm that the entered digits do not appear in model context, transcript, public receipts or recording. See private workflow reference.
| Operation | MCP tool | Key role | Purpose |
|---|---|---|---|
GET /api/v1/test-suites | test_suites_list | viewer | List test suites, optionally for one agent, with their most recent run. |
GET /api/v1/test-suites/{suite_id} | test_suites_get | viewer | Read a suite’s current or selected revision, last run and flaky cases. |
POST /api/v1/test-suites | test_suites_create | member | Create simulation cases with caller behavior, assertions and action mocks for an agent. |
PATCH /api/v1/test-suites/{suite_id} | test_suites_edit | member | Rename a suite or add, remove and reorder cases. Send the revision you last read. |
DELETE /api/v1/test-suites/{suite_id} | test_suites_delete | member | Archive a test suite. Existing runs and results are retained. |
POST /api/v1/test-suites/{suite_id}/validate | test_suites_validate | member | Check a suite’s node, action and variable references against a publication or the open draft. |
POST /api/v1/test-runs/estimate | test_runs_estimate | viewer | Estimate trial count, cost and duration before starting a test run. |
POST /api/v1/test-runs | test_runs_create | member | Run suites against one publication version. Follow progress, then inspect case verdicts and trial evidence. |
GET /api/v1/test-runs | test_runs_list | viewer | List test runs, newest first. |
GET /api/v1/test-runs/{test_run_id} | test_runs_get | viewer | Read a test run’s state, progress, verdict, summary and cost. |
GET /api/v1/test-runs/{test_run_id}/results | test_runs_results | viewer | Read case results and each trial’s assertion verdicts. |
GET /api/v1/test-runs/{test_run_id}/cases/{case_id}/trials/{trial} | test_runs_trial | viewer | Read one trial’s assertion trace and, while retained, the transcript used for its verdict. |
GET /api/v1/test-runs/{test_run_id}/events | test_runs_events | viewer | Read a page of test-run events or follow them through server-sent events. |
POST /api/v1/test-runs/{test_run_id}/cancel | test_runs_cancel | member | Cancel a test run. No new trials start, running trials are cancelled and settled results remain available. |
Next step
Follow the regression-testing example to inspect a failed trial and compare versions. Fix the draft, publish a new test version and repeat. Use the release guide to release the reviewed graph for regular use.