Create a run plan
Creates a new simulation run plan.
To run a simulation, use POST /v1/simulation/run instead: it starts a run from a plan or from an inline configuration, and takes runtime variables. Create a plan here when you want a reusable, named one to run later.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Input for creating a new simulation run plan
Name of the run plan
1"My Run Plan"
Direction of the simulation (INBOUND or OUTBOUND)
INBOUND, OUTBOUND "INBOUND"
Maximum duration in seconds for each simulation
x >= 1300
Agent endpoints to include in this run plan
1Metric definitions to include in this run plan. Reference each by id (UUID) or slug.
1Description of the run plan
"A run plan for testing inbound calls"
Number of iterations to run for each test case (1-10000)
1 <= x <= 100001
Maximum number of concurrent simulation jobs
x >= 15
Timeout in seconds for silence detection
x >= 130
Phrases that trigger end of call. Empty array disables the feature.
Semantic conditions that trigger end of call. The LLM evaluates the conversation against these conditions. Empty array disables the feature.
Execution mode (PARALLEL or SEQUENTIAL)
PARALLEL, SEQUENTIAL_SAME_RUN_PLAN, SEQUENTIAL_PROJECT "PARALLEL"
Deprecated: use flows instead. Scenarios to include in this run plan. The same scenario ID can appear multiple times with different variables.
1Customer flows to include in this run plan. The same flow can appear more than once with a different persona override or different variables.
1Personas to include in this run plan. Required with scenarios; ignored with flows, where each variant carries its own persona.
1Also collect each attached flow's own metrics, on top of the metrics named here.
Default true, which is what you want when you brought your own flows and their graders. Set false for a run whose metric list is meant to be exhaustive: a template like Load Testing or Voicemail deliberately grades a narrow set, and inheriting every flow metric on top multiplies analysis cost across the volume without adding signal.
GET /v1/simulation/template returns the value each template expects.
true
Let the run add metrics by itself off the attached flows, on top of the metrics named here.
Two attach this way today: Agent Expectations wherever an attached flow has agent expectations written on it, and Keypad Entry wherever one has steps where the agent is expected to press keys. Both grade something authored on the flow that nothing else measures, which is why it is on by default.
Set false when the metrics list is meant to be exhaustive: a plan testing only whether the caller
can complete the flow may not want the agent graded on its expectations as well. False also pins
the plan against any automatic metric Roark adds later.
true
Merge the customer's own recording of the real call into each simulation, so metrics can be scored against the live leg as well as the simulated one. This is the API equivalent of the dashboard's live-enrichment toggle.
With this on, the run provisions a phone number and holds each call open for up to 15 minutes
waiting for a matching call to be posted to POST /v1/call. A call matches on the provisioned
number (roarkPhoneNumber on the job) with a start time inside the simulation window. If
nothing arrives, the simulation still completes and any LIVE-sourced metric produces no value.
Required by any metric whose requiresLiveConversation is true: without it that metric is
silently skipped.
false
Deprecated: use POST /v1/simulation/run, which starts a run and accepts runtime variables as well. This flag runs the plan with only the values pinned on it.
false
Response
The created run plan
Response when creating a run plan, optionally including a triggered job