The tester always runs the draft. Phone and chat serve the last published version. If a
change works in the tester but not on a real call, you probably haven’t published yet — see
Versioning & Publishing.
Simulate over text (and voice)
POST /agents/{agentId}/simulate opens a server-sent events (SSE) stream. Set mode to
text for the chat tester or voice for the in-browser voice tester. Leave draftMode as its
default (true) to run against the freshly-compiled draft.
Each SSE frame is a single audit event: the event: line is the event type, and the data: line
is the event JSON. You’ll see user_utterance, agent_message, tool_call, kb_retrieval,
guardrail, and more stream by in real time — the same shapes you’ll later read back as a
receipt. The stream ends with event: done (or event: error).
In-browser voice with a talk-token
To test voice live in the browser, mint a short-lived talk-token. It returns the credentials your browser needs to join a real-time voice session — a URL, a token, and a room. WithdraftMode: true the session runs the ephemeral draft and is not billed. With
draftMode: false it runs the latest published version — and returns 409 no_published_version
if the agent has never been published.
In the API
| Action | Endpoint | Scope |
|---|---|---|
| Simulate (text / voice) over SSE | POST /agents/{agentId}/simulate | agents:write |
| Mint an in-browser voice talk-token | POST /agents/{agentId}/talk-token | dashboard session only |
| Kick a probe run (scripted scenario) | POST /agents/{agentId}/probe/run | agents:write |
| Poll a probe run | GET /agents/{agentId}/probe/runs/{runId} | agents:read |
| Stream probe progress (SSE) | GET /agents/{agentId}/probe/runs/{runId}/stream | agents:read |