---
title: "Read an agent's setup"
method: GET
path: "/api/v1/agent-definitions/{definition_id}"
tags: ["authed"]
---

# Read an agent's setup

`GET /api/v1/agent-definitions/{definition_id}`

## Request

- Base URL: `https://api.teaflask.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.teaflask.com/api/v1/agent-definitions/{definition_id}`
- Auth: none declared

One AI agent with its newest configuration in full: the model it
runs, its system prompt and the tools it may use. That revision may be
an unpublished draft; published_revision_id names what is live. Earlier
revisions: list_agent_definition_revisions.

## Path parameters

- `definition_id` string, uuid, required: The agent's id, as list_agent_definitions returns it.

## Response `200`

Successful Response

- AgentDefinitionDetailResponse: An agent plus its newest revision.
  - `id` string, uuid, required: The agent's id.
  - `organization_id` string, uuid, required: The organization it belongs to.
  - `slug` string, required: The agent's unique short name.
  - `name` string, required: The agent's display name.
  - `kind` 'web' | 'slack', required: Where an agent answers; chosen at creation and never switched.
  - `published_revision_id` string, uuid, nullable, required: The revision live conversations run; null until the agent is first published.
  - `created_at` string, date-time, required: When the agent was created.
  - `updated_at` string, date-time, required: When the agent last changed.
  - `latest_revision` AgentDefinitionRevisionResponse, required
    - `id` string, uuid, required: The revision's id.
    - `agent_definition_id` string, uuid, required: The agent it belongs to.
    - `parent_revision_id` string, uuid, nullable, required: The revision this one was edited from; null for the first.
    - `config` object, required: The agent's whole configuration: model (which model answers and how hard it thinks), routing (fallback models) and user_model_choice (whether visitors may pick the model); prompt (its system prompt); tools (what it may use: searching and reading docs, navigating, reading, highlighting and filling in pages of the organization's own app, calling the organization's API actions by slug, handing work to subagents, a code workspace, the page register); docs_scope and skills (which docs and skills it may read); memory (whether it remembers each signed-in visitor); suggestions (first questions offered to visitors); end_users (whether visitors must sign in or connect an AI subscription, and what they may spend before one is required); and steering and interventions (the checks that steer or stop its actions).
    - `config_format` 'agent/v1', required: Versions of the agent config vocabulary; evolves additively, never in place.
    - `status` 'draft' | 'published' | 'superseded', required
    - `authored_by_user_id` string, uuid, required: The member who wrote it.
    - `content_version` integer, required: Changes each time this revision is edited in place; send it back as parent_content_version.
    - `created_at` string, date-time, required: When the revision was created.
    - `updated_at` string, date-time, required: When the revision last changed: an edited draft or a status change.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `422`: Validation error
- `500`: Internal server error

---

[API](https://skmtc.dev/teaflask/apis/teaflask-api.md) - [All operations](https://skmtc.dev/teaflask/apis/teaflask-api/llms.txt) - [OpenAPI document](https://skmtc.dev/teaflask/apis/teaflask-api/revisions/d23e9286b847?raw)
