Skip to main content
A saved, repeatable simulation: which agents to call, which flows to run against them, and which metrics to grade the result on (the config form of a run plan).
notify is optional; see Sending each run’s report.
Applying a plan never starts a run. Applying reconciles the definition. A one-off run is a separate, deliberate act:
A recurring run is declared on the plan itself with a schedule. Either way, the plan exists as a durable resource rather than as a side effect of having run something, which is what lets an alert name it.

Running on a schedule

Add a schedule block and the plan runs itself. It is the config form of a plan’s schedule: the same cadences, the same one schedule per plan.
Every type also takes: Write time as a quoted 24-hour 'HH:MM'. once takes a full timestamp with its offset (at: '2026-11-02T09:00:00-05:00') and ignores timezone.

Who owns the schedule

  • Declaring schedule puts it under config. Apply creates it and keeps it in step with the file. In the dashboard the plan’s Automation panel shows it as Managed by config, with no Edit, Pause or Delete: change it in the file and re-apply. Pause by setting enabled: false.
  • Removing the block deletes the schedule. The plan stays and keeps running on demand.
  • A plan that never declares schedule leaves the dashboard’s schedule alone. Bringing an already-scheduled plan into config does not stop its automation.
  • Declaring schedule on a plan that already has one adopts it rather than adding a second, so the plan never fires twice.
  • Removing the plan removes its schedule. A deleted plan never keeps firing.
Detaching the plan from config in the dashboard hands its schedule back to the dashboard too.
Every scheduled run places real, billed calls. Start with a daily or weekly cadence, or set maxRuns while you trial a new plan.
A scheduled run can’t prompt for a variable, so every variable the plan’s flows use needs a default before you schedule it. If one is missing a default, apply fails for that plan with a missing variable error. See Variables.
A schedule created by apply is attributed to the user who minted the API key you apply with.

Knowledge checks

Testing that your agent answers a set of questions correctly is common enough that it has its own template. Instead of authoring a flow per question, set template: question-answer-check and write the questions and expected answers as a list. Roark asks each one in its own call and grades the answer. The same template is also a tile in the dashboard’s New simulation run picker and can be run over the API (see From the dashboard or API below). Config, dashboard and API all drive the one template.
Each question becomes its own isolated call: the caller asks it, and the answer is graded on its own, with no context bleed from the other questions. Grading is LLM-judged, not string matching, so an answer that means the same thing passes (“we don’t open on public holidays” satisfies the expectation above).
A knowledge check needs a persona (who asks) and an environment (which channel), the same two things every simulated call needs. Reference a kind: persona in your bundle by name, and an environment by its display name.

Grading against a knowledge base

Set gradeWithKnowledgeBase: true to grade answers against your project’s knowledge base as well. A question may then omit expect, and its answer is checked for grounding instead, so your knowledge base stays the single source of truth for the ones you don’t want to hand-write.
A question needs something to grade against: give it an expect, or turn on gradeWithKnowledgeBase. A question with neither is refused.
A knowledge check generates a flow behind the scenes (one variant per question). It appears in your flow library named after the plan. Edit the plan, not the generated flow: the next apply rewrites it from the questions.
The metrics are added for you, so a knowledge check does not need a metrics list: Agent Expectations grades each expect, and Knowledge Base Grounding is added when gradeWithKnowledgeBase is on. Anything you add under metrics is collected on top.

From the dashboard or API

The same question-answer-check template is available two other ways, driving the identical run:
  • Dashboard: New simulation run → Question & Answer Check. Pick the persona and environment, add your question/expected-answer rows, and run. There is no flow picker: the flow is generated from the questions.
  • API: POST /v1/simulation/run with the template and your questions:
personaId, environmentId and questions are required for this template; flows is rejected (the flow is generated). The response is a run plan, the same shape every POST /v1/simulation/run returns.

Your flows and Roark’s

This and the sections below describe the default (template: manual) plan, where you attach flows you authored. A knowledge check generates its flow for you, so it skips them.
A flow row names exactly one of flow or system. They resolve through different paths, so a row naming both is refused.
roark simulation template list prints the slug of every curated flow and outcome. happyPath and edgeCases are alternatives, not a union: asking for both is refused, because omitting both is already how you say “all of it”.

Which line to call

value is the endpoint’s own identifier, spelled the way kind: agent spells it. Omit it when the agent has exactly one endpoint; apply refuses to guess between several rather than dial a different number than you meant.

Everything else has a default

Only name, direction, agentEndpoints, metrics, flows and maxDurationSeconds are required. The rest default to what the dashboard would give you:
Deleting a line reverts that setting to its default. It does not leave the previous value in place. That is what makes the file the source of truth: if a plan drifts from its config, the next apply pulls it back rather than quietly keeping both.
Success criteria are not expressible in config yet. metrics takes slugs, so every pass/fail check on a config-managed plan is held to the 80% default, and a managed plan rejects edits from the API or the dashboard. If a plan needs a check held to a minimum of its own, keep that plan out of config for now and set its minimums under Advanced → Success criteria. See Success criteria.
endCallReasons is worth knowing about if you run scripted flows. A simulated caller hangs up on an end-call phrase (something the agent says) or on one of these conditions. Running out of scripted steps ends nothing, so a flow scripted to a verdict needs a matching reason or the call stays on the line until maxDurationSeconds.

Sending each run’s report

When a run of the plan finishes and Roark has written its report, notify sends that report by email, to Slack, or both. The report PDF goes with every announcement, so a reader who never logs in to Roark still gets the whole report.
notify is the same block a simulation group takes for its group report: notify.slack takes up to 10 { channelId, channelName } channels. Each gets a summary (the verdict, calls analyzed, issue count and the top three issues, with a Read the report button) with the report PDF in the message’s thread. Slack has to be connected to the project first; see Slack for finding channel ids and private channels.
Inside the block, email defaults to every project member. A plan that should only post to Slack writes email: false, which matters most for a plan on a frequent schedule.
A few things to know:
  • Who owns it. Declaring notify makes config own the plan’s report delivery, and deleting the block turns it off. A plan that never declares notify keeps whatever delivery was set in the dashboard before you adopted it into config, the same rule as schedule.
  • Once per run. Each run sends its first report once. Regenerating a report later does not send it again, and a run that ended more than a day before its report was written is not sent at all, so generating reports for old runs never fills anyone’s inbox.
  • Every run counts. Runs started from the dashboard, on the plan’s schedule, through the API, or as part of a simulation group all send their report. A plan in a group sends its own run reports as well as the group report.
  • Reports, not alerts. notify delivers the finished report. To hear about a run the moment it fails, add an alert as below.

Alerting on the result

An alert scopes itself to a plan by name, which is why the plan’s name is also its stored name:
Both can live in the same bundle. Apply creates the plan before the alert that names it. To send each run’s full report instead, use the plan’s notify. To run several plans together and send one combined report (a PDF by email, Slack or both), list them in a simulation group.

Apply order

Plans reference agents, flows and metrics, and groups and alerts reference plans, so one apply resolves them in that order regardless of how your files are laid out:
Deletes run in reverse, so a plan is torn down before the flows and agents it points at.
For the full field reference of every kind, see the Config DSL reference schema.