Prompt Template Library
The Prompt Template Library is a curated, versioned catalog of system-prompt starters every tenant can browse and fork. Each template targets a common intent — support triage, inbound sales qualification, appointment scheduling, payment reminders, tier-1 technical support, and post-interaction surveys — and ships with a tested base prompt you resolve with your own details instead of writing from scratch. Open it in the dashboard at Agents → Prompt Template Library (/agents/prompt-templates).
Use it when you want a proven starting point: pick a template, fill in its variables, and fork the result straight into the create-agent wizard or paste it into an existing agent’s system_prompt.
1. What the library is
The catalog is shared platform content — the same set of templates is available to every tenant, maintained and versioned centrally. A template bundles:- A base system prompt written for one intent (for example, the inbound sales qualifier qualifies leads and books a follow-up with a human rep).
- A category (
customer_support,sales,scheduling,collections,technical_support,survey) and an agent type hint (voice,chatbot,router,workflow,custom). - A set of variables the prompt body references as
{{placeholders}}. - A version history — every revision of the prompt body with its own version string and changelog.
2. Browse the catalog
List every template withGET /agents/prompt-templates. Each entry returns its stable id, name, description, category, agent_type, tags, the variables it declares, latest_version, and its full versions history.
category— one template category, e.g.sales.agentType— the authored agent type, e.g.voice.tag— match a single tag (for examplebant,csat).search— case-insensitive substring match over the id, name, description, and tags.
categories and agent_types lists, so a picker can render the filter options without an extra round-trip. Fetch one template with its complete version history at GET /agents/prompt-templates/:id, or a single version’s body at GET /agents/prompt-templates/:id/versions/:version (:version accepts an exact version string or the latest alias).
3. Fill the variables
Every template declares avariables schema — the placeholders its body references. Each variable has a name, a description, and an optional default_value:
- A variable with no default (
default_value: null) should be filled before you fork. Forking without it still succeeds, but the{{placeholder}}stays literal in the resolved prompt and is listed inunresolved_variablesso you can catch it before saving the agent. - A variable with a default is optional — leave it blank and the default is substituted for you.
4. Fork to create
POST /agents/prompt-templates/:id/fork resolves a chosen version’s body against your variable values and returns a ready-to-use system prompt. No agent is created and nothing is persisted — the fork only lands when you save it.
system_prompt into either surface:
- Dashboard — on
/agents/prompt-templates, fork a template and click Use in new agent. The create-agent wizard opens pre-seeded with the resolved prompt, the template name, and the authored agent type (agent_typeis a hint — you can change it in the wizard). - API — pass
system_prompton the standard create-agent body, orPUT /agents/:idto update an existing agent.
unresolved_variables in the fork response before saving: any placeholder you skipped is listed there and remains literal {{placeholder}} text in the prompt. Fill it on the next fork, or edit the prompt in the wizard.
Omit version in the fork body to resolve the latest version.
5. Versioning: pin the version you fork
Every revision of a template is an immutable, published entry with its own version string, release date, and changelog. Curated catalog updates append a new version; they never rewrite an existing one. That makes the version you fork your safety anchor:- Fork with an explicit
version(for example1.1.0) and your agent keeps exactly that prompt text even when the catalog later publishes1.2.0. - Fork with no
versionand you tracklatest— convenient for a first pass, but a later catalog update changes what the same call returns.
template_version) so a re-fork after a catalog update resolves the same body rather than silently picking up new prompt text. The dashboard’s version picker shows every published version newest-first, with the changelog line for each, so you can see what changed before you move an agent to a newer revision.
6. Where it lives
- Dashboard:
Agents → Prompt Template Library(/agents/prompt-templates) — browse, search, filter by category, fork, and drop the resolved prompt into the create-agent wizard. - API: list at
GET /agents/prompt-templates, one template atGET /agents/prompt-templates/:id, one version atGET /agents/prompt-templates/:id/versions/:version, fork atPOST /agents/prompt-templates/:id/fork.
system_prompt you save onto an agent.
7. End-to-end example: seed a sales agent
Forkinbound-sales-qualifier with your company and product, then create the agent with the resolved prompt.
Fork the template:
system_prompt (a PUT /agents/:id with the same field updates an existing agent):