---
title: "Get a factory agent"
method: GET
path: "/v1/agent-templates/{templateId}"
tags: ["Agents"]
---

# Get a factory agent

`GET /v1/agent-templates/{templateId}`

Fetch a single factory agent fully rendered: the function files to scaffold (an `index.ts` that declares the agent with `defineAgent` and its skills with `defineTool`) plus the secrets it needs. This is what `npx zavudev agents pull <id>` writes to disk before `npx zavudev deploy`.

## Path parameters

- `templateId` string, required

## Response `200`

Rendered factory agent.

- object
  - `template` AgentTemplate, required — A fully rendered factory agent: the function files to scaffold plus the secrets it needs. Returned by GET /v1/agent-templates/{templateId} and consumed by `npx zavudev agents pull`.
    - `id` string, required
    - `name` string, required
    - `summary` string, required
    - `category` 'sales' | 'support' | 'frontDesk' | 'ops', required
    - `voice` boolean, required
    - `defaultSlug` string, required
    - `files` AgentTemplateFile[], required
      - `path` string, required
      - `content` string, required — File contents to write verbatim.
    - `dependencies` object, required — npm dependencies for the scaffolded function.
    - `requiredSecrets` object[], required
      - `key` string, required
      - `hint` string, required

## Other responses

- `401` — Unauthorized.
- `404` — Template not found.

---

[API](https://skmtc.net/zavudev/apis/zavu-unified-messaging-layer-api.md) · [All operations](https://skmtc.net/zavudev/apis/zavu-unified-messaging-layer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zavudev/zavu-unified-messaging-layer-api/revisions/5a69a1777f6f/schema)
