Test a flow (hermetic simulator)
Flow Agents
Test a Flow
Walks a flow graph against a synthetic transcript without dispatching real tools or writing a call_logs row. Conversation-node transitions are picked by a deterministic keyword heuristic — for true eval-LLM-driven simulation use the in-app test panel. Tool-call nodes consume mocked results from the request body. Useful for CI smoke tests and skill verification before going live.
POST
Test a flow (hermetic simulator)
Hermetic flow simulator. Walks a
Optionally include
flow_config graph against a synthetic transcript without dispatching real tools, writing a call_logs row, or placing a real call. Useful for CI smoke tests, skill verification, and pre-deploy sanity checks.
Required scope: flows:test (separate from agents:update because flow tests can spend money on eval LLMs and external APIs in richer test modes).
What this endpoint does
- Loads the agent’s saved
flow_config(or uses the override you supply in the request body). - For each conversation node: consumes the next
role: "user"turn from your transcript and picks a transition by deterministic keyword overlap with each transition’s label/description. Misses route to “stay”. - For each tool-call node: looks up
mock_tool_results[step_id]. Iferroris set, takes theerrortransition. Otherwise takessuccess, with custom branches evaluated in declaration order via thejsonpath/equalsrule. - At an end node (or transfer, or post-end webhook/structured_output), the walk terminates and returns the full trace.
What this endpoint does NOT do
- It does not call the eval LLM. The deterministic heuristic is good enough for unit tests of branching topology, not for testing prompt quality. For eval-LLM-driven simulation use the in-app Flow Test panel (which runs a real bot pipeline against a WebRTC web call).
- It does not dispatch tools. Mock every tool-call node you reach via
mock_tool_results. - It does not write
call_logsor fire webhooks.
Body
flow_config in the body to test an unsaved draft instead of the agent’s stored graph.
Response
Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.
Path Parameters
Body
application/json