---
title: "Update an agent"
method: PATCH
path: "/agents/{agent_id}"
tags: ["Agents"]
---

# Update an agent

`PATCH /agents/{agent_id}`

Updates an agent's name or description. Only the fields you include in the request body are updated.

## Path parameters

- `agent_id` string, required

## Request body

- UpdateAgentRequest — Request body for updating an agent. Only include fields you want to change.
  - `name` string, nullable — Updated display name.
  - `description` string, nullable — Updated description.

## Response `200`

OK

- GetAgentResponse — An agent object. Agents organize related tasks under a single use case.
  - `id` string, required — Unique identifier for the agent, prefixed with `agt_`.
  - `object` string, required — Always `agent`.
  - `name` string, required — Display name for the agent.
  - `description` string, nullable, required — Description of the agent's purpose.
  - `tasks` TaskSummary[], required — Tasks associated with this agent.
    - `id` string, required — Unique identifier for the task, prefixed with `task_`.
    - `object` string, required — Resource type string (`task`).
    - `name` string, required — Display name for the task.
    - `status` string, required — Current task status: `learning`, `test`, or `live`.
  - `created_at` string, date-time, required — ISO 8601 timestamp of when the resource was created.
  - `updated_at` string, date-time, required — ISO 8601 timestamp of when the resource was last updated.
  - `request_id` string, required — Unique identifier for the API request. Include this when contacting support.

## Other responses

- `400` — Bad request — validation error or malformed input.
- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Not found — the requested resource does not exist.
- `409` — Conflict — the request is valid but cannot be completed in the current state.
- `422` — Unprocessable content — the request body is understood but contains invalid values.
- `429` — Too many requests or session concurrency exceeded. Retry with backoff; honor Retry-After and RateLimit headers when present.
- `500` — Internal server error.

---

[API](https://skmtc.dev/deck/apis/deck-api.md) · [All operations](https://skmtc.dev/deck/apis/deck-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/deck/deck-api/revisions/eba6e2cc9351/schema)
