Skip to main content

Assistant templates

A template is a curated pre-built assistant — a system prompt, model pick, voice configuration, and channel compatibility set that the agent wizard applies in one click. Templates are read-only catalog entries; the only write on this surface is instantiate, which clones a template into a new assistant in your organization. Field-level reference lives in the Agents templates endpoints; this page walks the flow end to end. Base path: /api/v1/agents/templates Authentication: API key (X-API-Key) or session JWT. Reads are open to any authenticated role; instantiate requires owner, admin, or developer. Every response below carries the full { data, meta } envelope and at least one labelled error envelope — the same floor as the SDK sample coverage policy.

Worked sequence: browse, read, instantiate, test

1. List the catalog

The catalog’s templates array is the plain pre-rendered list; there is no server-side filter — filter by agent_type on your side when you only want, say, voice.
Response 200:

2. Read one template detail

Before instantiating, fetch the template’s id so the call can surface its prompt fields. Unknown ids answer 404 with a labelled error envelope:
404 Error

3. Instantiate the template into your tenant

POST instantiate clones the template into a new assistant row, renders the prompt against your organization’s jurisdiction, and returns the new assistant record. Repeat instantiate with a stable Idempotency-Key header to dedupe lobby-level retries.
Response 200:
The new assistant id (agt_a41c829e77d902) goes straight into the Assistant lifecycle — create, deploy, list, fetch, update, delete. The config.template_id back-pointer lets you trace the instance to the curated source during support.

4. Test the instantiated assistant end to end

POST /api/v1/agents/{id}/conversations opens a conversation you can step through turn by turn. The conversation path only exists once instantiate returned 200. Send one initial message and read the reply.
Response 200:
404 Error — invalid assistant id
The reply carries the first turn; step through further turns by posting with the same conversation_id. The full conversation shape — turns, tool calls, handoffs, CSAT — is covered on the Agents API reference.

See also