Install a template
SDK platic.agentTemplates.install()
Create an agent from a template by sending its slug, with no body. This uses the template’s latest version, including instructions, configuration and photo. Read setup to complete the pending items for your business; the agent remains a draft until you publish it.
Warning
Each call creates another agent. If the response didn't arrive, check List agents before repeating. If the agent was created but its list of pending items couldn't be saved, the error says so with details.agentId: delete that agent or finish it in Platica before installing again.
Example
curl -X POST https://api.platic.ai/v1/agent-templates/atencion-a-clientes/install \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agentTemplates.install("atencion-a-clientes"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
slug | string | The template's slug, from List agent templates | ✓ |
Request body
It takes no body.
Response
201 Created
{
"status": "success",
"message": "Agent created from the template Vendedor de la tienda",
"data": {
"agent": {
"id": "Ag6bV8nM1qW3eR5t",
"name": "Vendedor de la tienda",
"url": "https://app.platica.mx/workspace/K7u9rQ2LmZx18BvC5tNd/agents/Ag6bV8nM1qW3eR5t"
},
"setup": {
"template": { "slug": "vendedor-de-tienda", "name": "Vendedor de la tienda", "version": 3 },
"status": "in_progress",
"ready": false,
"done": 1,
"total": 4,
"slots": [
{
"id": "negocio",
"kind": "variable",
"label": "Datos del negocio",
"detail": "Horario",
"required": true,
"state": "pending",
"variables": [{ "key": "horario", "label": "Horario", "placeholder": "{{horario}}" }],
"openUrl": null
},
{
"id": "tool-shopify",
"kind": "tool",
"label": "Shopify",
"detail": "Conéctala y actívala para este agente",
"required": false,
"state": "done",
"provider": { "type": "mcp", "id": "shopify" },
"openUrl": null
},
{
"id": "canal",
"kind": "channel",
"label": "Canal",
"detail": "WhatsApp",
"required": true,
"state": "pending",
"channels": [{ "id": "whatsapp", "name": "WhatsApp" }],
"openUrl": "https://app.platica.mx/workspace/K7u9rQ2LmZx18BvC5tNd/integrations"
},
{
"id": "conocimiento",
"kind": "knowledge",
"label": "Catálogo",
"detail": "Tu catálogo de productos con precios",
"required": false,
"state": "pending",
"hint": "Tu catálogo de productos con precios",
"openUrl": null
}
]
}
},
"nextStep": "The agent Ag6bV8nM1qW3eR5t was created as a draft with 3 pending items. Datos del negocio: replace {{horario}} in the draft's instructions with PATCH /v1/agents/Ag6bV8nM1qW3eR5t/draft. Canal: connect one of WhatsApp with POST /v1/channels/connections and this agentId, or give this agent an existing channel with PATCH /v1/channels/{channelId}. Catálogo: add files to this agent with PUT /v1/agents/Ag6bV8nM1qW3eR5t/files/{fileId}. Optional items can be skipped with POST /v1/agents/Ag6bV8nM1qW3eR5t/template-setup (action \"skip\" and slotId). Each item is marked done when Platica sees it in the agent: check again with GET /v1/agents/Ag6bV8nM1qW3eR5t/template-setup. It can also be finished in Platica: https://app.platica.mx/workspace/K7u9rQ2LmZx18BvC5tNd/agents/Ag6bV8nM1qW3eR5t"
} | Field | Description |
|---|---|
agent.id | The new agent. Use it in the Agents routes |
agent.name | Its name, the template's |
agent.url | The agent's page in Platica, where the pending items can also be finished |
setup | The list of pending items. See the list |
nextStep | What is missing and which route resolves each pending item, in English |
Errors
| Status | details.code | When |
|---|---|---|
402 | CREDIT_LIMIT_REACHED | The workspace has no credit. Nothing was created |
404 | AGENT_TEMPLATE_NOT_FOUND | There is no published template with that slug |
409 | AGENT_TEMPLATE_UNAVAILABLE | The workspace doesn't use agents with versions. Nothing was created |
The errors that come up on any operation are in the introduction.
Notes
- 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 or creator chat. See API key or OAuth.
- The data the workspace already has is filled in on its own in the agent's instructions.
- After that: resolve the pending items, finish the template and publish the agent.
- From an AI agent, the tool is
install_agent_template.