Agent templates
Create an agent from a template for sales, support, appointments or another use. Choose a template, install it and check the pending items to adapt it to your business.
The agent starts as a draft. Publish it when you are done so it can begin replying.
Example
# 1. Install a template (creates a new agent and returns setup.slots)
curl -X POST https://api.platic.ai/v1/agent-templates/atencion-a-clientes/install \
-H "Authorization: Bearer $PLATIC_API_KEY"
# 2. Check the pending items and close the list when ready is true
curl https://api.platic.ai/v1/agents/$AGENT_ID/template-setup \
-H "Authorization: Bearer $PLATIC_API_KEY"
curl -X POST https://api.platic.ai/v1/agents/$AGENT_ID/template-setup \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action": "complete"}' // 1. List templates and install one
const [template] = await platic.agentTemplates.list();
const { agent, setup } = await platic.agentTemplates.install(template.slug);
// 2. Resolve pending items (draft, files, tools, channels) or skip optional ones
for (const slot of (setup?.slots ?? []).filter((s) => s.state === "pending" && !s.required)) {
await platic.agents.templateSetup.update(agent.id, { action: "skip", slotId: slot.id });
}
// 3. Close the list when ready === true and publish
const current = await platic.agents.templateSetup.get(agent.id);
if (current.setup?.ready) {
await platic.agents.templateSetup.update(agent.id, { action: "complete" });
await platic.agents.publish(agent.id);
} What you need to know
- They are marked done on their own: each pending item (
variable,tool,channelorknowledge) is resolved with the agent's normal endpoints; when you readtemplate-setup, Platica detects what you already completed and moves it todone. - Optional items and closing: only pending items with
required: falsecan be skipped (action: "skip").completecloses the list whenreadyistrue;dismisscloses it as is. - Permissions and credits: it requires the Agents permission. Installing consumes creation credits if applicable (
402 CREDIT_LIMIT_REACHEDif there is no credit). With OAuth the agent is placed under the person's name; with an API key it is born without an owner.
Endpoints
| Method | Endpoint | What it does |
|---|---|---|
GET | /v1/agent-templates | List the available templates |
POST | /v1/agent-templates/{slug}/install | Install a template and create a new agent |
GET | /v1/agents/{agentId}/template-setup | See the agent's pending items |
POST | /v1/agents/{agentId}/template-setup | Skip a pending item, finish (complete) or dismiss (dismiss) |
The list (setup)
Installing and reading the pending items return the same setup object:
| Field | Description |
|---|---|
template | The template the agent comes from: slug, name and version |
status | in_progress, completed or dismissed |
ready | true when every required item is done: only then does complete work |
done, total | Items done or skipped, and items in total |
slots | The pending items. See the pending items |
setup is null on an agent that doesn't come from a template.
The pending items
Each item in slots has an id, a kind, a label, a detail, required, a state and an openUrl (the page in Platica where it can also be resolved, or null).
kind | What it asks for | Extra fields |
|---|---|---|
variable | Replace the {{variables}} in the draft's instructions with your business data | variables: key, label and placeholder of each one |
tool | Connect and activate a tool for this agent | provider: type and id |
channel | Give the agent a channel | channels: id and name of the ones the template is made for |
knowledge | Add files to the agent | hint: what to add |
state is pending, done or skipped. Skipped items count in done.
API key or OAuth
With an OAuth token, the agent is placed under the person's name and their creator chat in Platica starts with the template. With an API key there is no person: the agent has no owner and no creator chat.
Common errors
| Status | details.code | When |
|---|---|---|
402 | CREDIT_LIMIT_REACHED | The workspace has no credit. Nothing was created |
403 | FORBIDDEN | Your token only sees your assigned agents and this one isn't yours |
404 | AGENT_NOT_FOUND | The agent doesn't exist in this workspace |
The rest are listed on each endpoint's page and in Errors. AI tools are in the Agents MCP tools.