kind: agent with provider: roark is an agent Roark runs. You declare its prompt, voice, transcription, and model in your repo, declare the tools it calls as kind: tool resources, and roark config apply creates the agent and publishes a version of it. Later applies publish a new version only when what you declare differs from what the agent runs.
With provider set to another platform (such as vapi or retell) or omitted, kind: agent is a connected agent: it runs on that platform, and Roark observes, simulates, and grades it. Existing configs without provider are unchanged.
You need the CLI (
npm install -g @roarkanalytics/cli), an API key with config:apply in ROARK_API_BEARER_TOKEN, and Build on Roark enabled on your account. Without Build on Roark, apply fails the agent with Build on Roark is not enabled for this account.1. Write the agent and its tools
Put the agent and each tool in its own file underroark/:
provider: roarkis who runs the agent: Roark.promptis the system prompt the agent runs, inline or from afile://path under your config root.greeting,tts(voice),stt(transcription), andllm(the model) sit directly on the agent. Every one is optional. Theproviderinsidetts,stt, andllmis the speech or LLM vendor, not who runs the agent. See Fields for the vendors each accepts.lookup-patientis a separatekind: toolthat names the agent inagent:and declares ahandler, so the agent calls it mid-call. See Tools for an agent built on Roark.
Or let Roark write the prompt
If you don’t have a prompt yet, leave outprompt and give a jobDescription (up to 2000 characters). On the first apply, Roark writes the prompt and greeting from it:
prompt, or a jobDescription.
2. Preview the changes
diff makes no writes. On the first run it lists the agent and its tool as creates:
tts, stt, or llm vendor fails validation here, before anything is applied.
3. Apply
lookup-patient attached. With the API, send the same bundle to POST /v1/config/apply.
First apply and later applies
On the first apply, Roark creates the agent and publishes version 1. Fields you leave out, such as a model, use Roark’s defaults. If you gave ajobDescription and no prompt, Roark writes the prompt and greeting now.
On later applies, Roark compares what you declare with the live version and publishes a new version only when they differ:
- Re-applying unchanged config is a no-op.
- Every field sets only what it names. A model you leave out keeps what the live version runs, and settings tuned in Roark, such as fallbacks, end-call reasons, or keyterms, stay unless you declare them.
-
jobDescriptionis not used again. To change the prompt, declareprompt. -
Editing a tool shows up in
diffas an update to the agent, and apply publishes a version that runs the edited tool: - Tools added to the agent in Roark stay on it. Config removes a tool from the agent only when the bundle scopes it to another agent, or when a pruning bundle drops it.
Draft conflicts
If someone has an unpublished draft of the agent open in Roark, apply does not publish over it. The agent fails with:roark config apply ./roark again.
Other apply errors
Each of these is reported on the agent’s change in the apply result, withstatus: failed. A model the vendor does not offer also fails the agent at apply.
What’s not in config yet
These are not part of an agent’s config today:- Sub-agents and handoffs
- Speech-to-speech configs
- Fallback configs
- Call and idle settings
- The chat modality
- Attaching project-wide tools to the agent
- Assigning a Roark phone number to the agent
roark get-started scaffolds simulation testing of an existing agent. It does not scaffold an agent built on Roark.
Agents reference
provider, every agent field, and the vendors each accepts.Tools reference
HTTP and calendar handlers,
responseFields, and messages.