Skip to main content
A voice agent: its prompt and the lines it can be reached on. Thin by design; endpoints are nested and reconciled with the agent. References nothing. A kind: agent is one of two things:
  • A connected agent (provider set to another platform, such as vapi, set to custom for your own stack, or omitted). The agent runs on that platform or your own stack. Roark observes its calls, runs simulations against it, and grades it, but does not run it. provider is optional, and every existing config without it stays valid.
  • An agent built on Roark (provider: roark). Roark runs the agent. Apply creates or updates it and publishes a version, and agent-scoped tools with a handler become the tools it calls. See Agents built on Roark below.
  • name is the local key (^[a-z0-9][a-z0-9-_.]*$) and, with the kind, forms the config identity.
  • displayName (optional) is the agent’s name as it appears in Roark, where spaces and capitals are allowed; it defaults to name. Set it to an agent’s exact existing name to bring an agent you created in the app under config (apply takes it over in place instead of creating a duplicate) when that name isn’t slug-shaped, for example displayName: "Dental Clinic" with name: dental-clinic.
  • Other resources reference an agent by its name (the slug), not its displayName (e.g. a flow’s agents: list, a collector’s AGENT filter, or a simulation plan’s agentEndpoints).

Endpoints

An endpoint is identified by its value: the E.164 number for a phone line, the URL otherwise. That is the only field you always have to give. An endpoint is identified by its value and its direction together, so one number can carry an inbound endpoint and an outbound one:
That is how a number that both takes and places calls is set up: an endpoint is INCOMING or OUTGOING, never both. Endpoints reconcile with the agent on that pair: one you add is created, one you change is updated, and one you remove is detached. Changing a direction is therefore a new endpoint and the retirement of the old one rather than an edit, which matches what it does to your call routing.

Prompt

prompt is the agent’s system prompt, kept in your repo and versioned in Roark. In TypeScript it’s a plain string, so read it from a file (or write it inline); in YAML it takes an inline string or a file:// reference resolved from your config root:
Each apply versions it: a change appends a new version, identical content is a no-op. It lands in its own history on the agent’s Prompts tab, shown as a read-only Config as code lineage, separate from prompts you edit in the app or that arrive on calls. Omitting prompt leaves any existing prompt alone: config sets a prompt, it never clears one you did not declare.
For a connected agent, the prompt is kept for your reference and versioning only. Roark does not run your agent, and no metric evaluates against this prompt, so setting it does not change how your agent behaves or how it is scored. For an agent built on Roark (provider: roark), prompt is the system prompt Roark runs.
Other endpoint types (LiveKit, SmallWebRTC, ElevenLabs, Kore, Google CES, Daily) are not configurable here. They are bidirectional, so they carry no direction, and each needs provider configuration the config format has no place for. Their endpoints are created by the integration that owns them.
Omitting the endpoints block leaves the agent’s existing lines alone. Writing endpoints: [] removes all of them. The difference matters, because it is the difference between saying nothing about your phone numbers and saying you want none.

Outbound dialling

By default an OUTGOING endpoint is dialled by Roark. To hand dialling off to your own system, set outboundDialType: HTTP_REQUEST and point outboundDialHttpRequestDefinition at an HTTP request definition by name. Roark fires that request (with the number to dial substituted in) when the call should be placed:
Declare the dialer definition in the same bundle (or a previous apply); it reconciles before agents, so the reference resolves in one apply. See HTTP request definitions.

Provider

Top-level provider says who runs the agent: provider is optional. Omitting it means the agent runs somewhere other than Roark, without saying where, so it is not read as custom (the agent could be on Vapi, for example). Existing configs without provider keep working exactly as before. Only provider: roark makes Roark run the agent. With provider: custom, apply does not create or import an integration, does not create a runtime, and does not need Build on Roark.
provider: api is a deprecated alias for custom. It maps to the same Custom/API provider and keeps working, but use custom in new configs.
A connected agent on another platform:
A connected agent on your own stack, reached on a phone number:
Top-level provider is who runs the agent. The provider inside tts, stt, and llm is the speech or LLM vendor, an uppercase catalog value such as ELEVENLABS, DEEPGRAM, or OPENAI.

Agents built on Roark

With provider: roark, Roark runs the agent. roark config apply (or POST /v1/config/apply) creates or updates the agent and publishes a version of it, and its prompt becomes the system prompt it runs. The agent’s tools are kind: tool resources that name it in agent: and declare a handler (see Tools for an agent built on Roark).
Agents built on Roark need Build on Roark enabled on your account. Without it, apply fails the agent with Build on Roark is not enabled for this account, and nothing is written for it.
The tool it calls, as its own resource:

Fields

These fields sit directly on the agent and are used when provider is roark. Each is optional, but the agent needs either a prompt or a jobDescription. An unknown tts, stt, or llm provider fails schema validation, so diff and apply reject the bundle. A model the vendor does not offer fails the agent at apply.

Let Roark write the first prompt

Leave out prompt and give a jobDescription, and on the first apply Roark writes the prompt and greeting from it:
jobDescription is used once. Later applies do not rewrite the prompt from it. To change the prompt after the first apply, declare prompt.

What apply changes

  • Every field sets only what it names. A model you leave out keeps what the live version runs (Roark’s default on the first apply). Settings tuned in Roark, such as fallbacks, end-call reasons, or keyterms, stay unless you declare them.
  • A version is published only on a difference. On each apply 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.
  • A tool edit is an agent change. Editing one of the agent’s tools shows up in roark config diff as an update to the agent, and apply publishes a version that runs the edited tool. If a tool fails to apply, the agent fails with tool "lookup-patient" did not apply, so the agent was left on the version it runs.
  • Tools added in Roark stay. Config removes a tool from the agent only when the bundle scopes that tool to another agent, or when a pruning bundle drops it.
Apply refuses to publish while the agent has an unpublished draft in Roark, because that draft may be someone’s work in progress. The agent fails with agent "frontdesk" has an unpublished draft in Roark. Publish or discard it there, then apply again. Publish or discard the draft, then apply again.

Not configurable yet

These are not part of an agent’s config today, and config does not change them:
  • 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

Build an agent on Roark

A step-by-step guide: write the YAML, diff, apply, and handle the first apply, later applies, and draft conflicts.
For the full field reference of every kind, see the Config DSL reference schema.