Simulate a conversation
Runs a text or voice simulation against the agent and streams the conversation back as server-sent events. Set draftMode to test unpublished changes without billing. Each event is a turn or tool-call frame, and the stream ends with a done or error event.
Authorizations
Flowyte secret API key (Authorization: Bearer flowyte_sk_live_…). Scope-gated; is scoped to your organization — a key can never reach another tenant. The listed scopes in each operation's apiKey requirement are the scopes that key must hold. The tokenUrl is nominal: keys are minted in the dashboard.
Path Parameters
The agent this resource is scoped to (the UUID returned by createAgent / listAgents).
Body
Chat/voice draft tester request. mode selects the tester surface: text (in-UI chat tester) or voice (in-browser voice draft tester); voice_browser/probe_loopback also supported. draftMode runs the simulation against the ephemerally compiled draft config (default true for the in-builder tester).
text, voice, voice_browser, probe_loopback In-builder text tester channel (mode text only): chat (default, markdown-native) or sms (plain text, GSM-7 — the runtime returns a plain-text reply so the tester previews the SMS voice, and the UI shows a live segment counter). Any other value is treated as chat.
chat, sms Run against the ephemerally-compiled draft config (not the published version, not billed). Default true for the in-builder chat/voice tester.
Carry ONE session across every turn of a test conversation. Server-held per-session state — the write-confirm gate, and the paused-playbook run — is keyed on it, so a fresh id per turn makes confirm-gated and multi-step flows untestable. Send the same value for the whole conversation and a new one when the tester is reset. Omitted → a fresh id per call (single-turn behaviour).
Synthetic caller ID for the test, in E.164. Lets a caller-ID data dip (e.g. "look this number up in the CRM before answering") be exercised without placing a real call. Omitted → no caller ID, which is what a real chat has.
Opaque conversation state returned by the previous turn's driver_state event. Hand it back unchanged on the next request and a multi-step playbook resumes exactly where it paused (same collected answers, same next question); omit it and the playbook starts over. Treat it as a token — it is signed and bound to this agent + sessionId, and editing it only makes the turn ignore it.
Response
SSE stream of SimulateEvent frames (each an AuditEventDTO).
The live simulate/chat SSE frame. It IS an AuditEventDTO: the SSE event: line equals eventType and the data: line is the AuditEventDTO JSON. Streams terminate with event: done or event: error, consumed via fetch() streaming.
On voice rows this is a MONOTONIC clock (relative), useless as an absolute time — use createdAtMs for wall-clock dating.
voice, chat, sms Authoritative AuditEvent / SimulateEvent event-type set. Each value selects the per-variant payload shape documented on AuditEventDTO.payload (see the *Payload schemas below). The legacy agent_utterance/turn_summary values are also supported for the ported audit_events write-path.
user_utterance, agent_message, tool_call, kb_retrieval, guardrail, verification, language_switch, handoff, barge_in, latency, filler, call_started, call_ended, error, agent_utterance, turn_summary, procedure_run, driver_state, claim_check Per-eventType payload (see schema description for the eventType→*Payload mapping).
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
Wall-clock insert time (audit_events.created_at) as epoch ms — the reliable timestamp for dating an event on the transcript. Present on persisted receipt rows; absent on the live SSE frame.