voice_scenarios
Create, edit, run, and review live duplex-voice acceptance scenarios that place real calls to test agent transcripts, frames, and HTTP checks, with per-run headers for protected flows.
Instructions
Live duplex-voice acceptance scenarios (ai_voice_scenarios) — the
portal/MCP surface over admin/voice_scenario_runner.py. action:
list | get (slug) | set (slug + agent_kind + steps; upsert — step types:
say / expect_transcript / expect_frame / http_check / wait, shapes in the
runner's module docstring) | delete (slug) | run (slug; launches a
background job that places a REAL call against the engine's own
/voice/live — or target ws(s)://; headers are per-invocation HTTP
headers forwarded to the WS connection AND merged into each http_check
step's own headers — the way to carry a portal login cookie or other
secret for a deep protected-flow scenario without ever storing it on the
scenario row) | runs (recent results, optional slug filter). Runs need
AZURE_SPEECH_KEY on the service (else they land as status=skipped).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "voice_scenarios"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Config branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves. | staging |
| slug | No | Scenario slug. | |
| limit | No | Maximum number of rows to return. | |
| notes | No | Free-text notes. | |
| steps | No | Ordered scenario steps (utterances, checks). | |
| title | No | Scenario title. | |
| action | No | Operation to run: list | get | set | delete | run | runs. The tool description lists what each action needs. | list |
| locale | No | Caller language for the scenario. | |
| target | No | ws(s):// URL of a remote deployment to call instead of this engine. | |
| enabled | No | Whether the scenario is active. | |
| headers | No | Per-run HTTP/WS headers (never stored). | |
| ws_path | No | WebSocket path the scenario calls (default /voice/live). | |
| agent_kind | No | Agent kind the scenario calls. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |