---
docId: doc_3f85d4b6e42a4813bbdd3b413e3b2cef
title: Get pending items
description: "Retrieves template setup items and detects which ones are complete."
api:
  group: agentes/plantillas
  auth: bearer
  operations:
    - operationId: getAgentTemplateSetup
      method: GET
      path: '/v1/agents/{agentId}/template-setup'
      postmanName: Get the template's pending items
---

<script>
  import { Ways } from '$lib/components';
</script>

# Get pending items

Check what remains to finish configuring an agent installed from a template. Read `setup.slots` for each pending item and `nextStep` for the route that resolves it. Each request checks the agent and marks completed items as `done`.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/agents/$AGENT_ID/template-setup \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.agents.templateSetup.get("agent_123");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `agentId` | string | Agent id | ✓ |

## Response

`200 OK`

```json
{
  "status": "success",
  "message": "3 of 4 items done or skipped",
  "data": {
    "agentId": "Ag6bV8nM1qW3eR5t",
    "setup": {
      "template": { "slug": "vendedor-de-tienda", "name": "Vendedor de la tienda", "version": 3 },
      "status": "in_progress",
      "ready": false,
      "done": 3,
      "total": 4,
      "slots": [
        {
          "id": "negocio",
          "kind": "variable",
          "label": "Datos del negocio",
          "detail": "Horario",
          "required": true,
          "state": "done",
          "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": "skipped",
          "hint": "Tu catálogo de productos con precios",
          "openUrl": null
        }
      ]
    }
  },
  "nextStep": "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}. Each item is marked done when Platica sees it in the agent: check again with GET /v1/agents/Ag6bV8nM1qW3eR5t/template-setup."
}
```

`setup` is `null` if the agent doesn't come from a template.

| Field | Description |
|-------|-------------|
| `agentId` | The agent |
| `setup` | The list of pending items, or `null`. See [the list](/api-reference/agent-templates#the-list-setup) and [the pending items](/api-reference/agent-templates#the-pending-items) |
| `nextStep` | What is missing and which route resolves it, in English |

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | `agentId` isn't a valid id |
| `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 errors that come up on any operation are in the [introduction](/api-reference/agent-templates#common-errors).

## Notes

- If Platica can't read the agent's draft, the business-data pending items stay as they were in the previous read.
- From an AI agent, the tool is [`get_agent_template_setup`](/mcp/tools#agents).
