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

# Update agent

`PATCH /agents/{agentId}`

Update an agent

## Path parameters

- `agentId` string, required — Agent ID (agt_*).

## Headers

- `Idempotency-Key` string, required
- `X-Instance-ID` string, nullable

## Request body

- object
  - `data` object, required
    - `attributes` object, required
      - `name` string, nullable — Agent display name.
      - `description` string, nullable — Agent description.
      - `tags` object — Metadata changes. A null value removes the key.
      - `slug` string — Agent-specific part of the handle, such as support in @acme-support. Renames the handle; omission leaves it unchanged. Handles cannot be cleared.
      - `limits` object, nullable — Agent spending limits. Null clears all limits; omission leaves them unchanged. Within the object, a null or omitted window clears that limit.
        - `perTransaction` integer, nullable — Per-transaction spending limit in cents, or null for no limit.
        - `perDay` integer, nullable — Daily spending limit in cents, or null for no limit.
        - `perMonth` integer, nullable — Monthly spending limit in cents, or null for no limit.

## Response `200`

Successful Response

- object
  - `data` object, required
    - `type` 'agent', required — Resource type. Always `agent`.
    - `id` string, required — Agent ID (agt_*).
    - `attributes` object, required
      - `name` string, required — Agent display name.
      - `description` string, nullable, required — Agent description.
      - `tags` object, required — Metadata visible to anyone who can read the resource.
      - `handle` string, nullable, required — Agent handle, such as @acme-support, or null when none is set.
      - `status` 'ACTIVE' | 'REVOKED', required — Agent status: ACTIVE, or REVOKED after deletion.
      - `limits` object, nullable, required — Spend caps for actions this agent initiates on its owner's party.
        - `perTransaction` integer, nullable — Per-transaction spending limit in cents, or null for no limit.
        - `perDay` integer, nullable — Daily spending limit in cents, or null for no limit.
        - `perMonth` integer, nullable — Monthly spending limit in cents, or null for no limit.
      - `createdAt` string, date-time, nullable, required — RFC 3339 timestamp when this agent was created, or null when unknown.
      - `createdBy` string, nullable, required — User who created this agent (usr_*).
      - `lastActiveAt` string, date-time, nullable, required — RFC 3339 timestamp when the agent last authenticated, or null when it never has.
    - `relationships` object, required
      - `party` object, required — Party that owns the agent.
        - `data` object, required — Related resource identifier.
          - `type` 'party', required — Resource type. Always `party`.
          - `id` string, required

## Other responses

- `400` — Validation Error
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found. Returned when the resource does not exist, or when it exists but is not accessible to your account. The two cases are intentionally indistinguishable, so that resource IDs cannot be enumerated by probing.
- `409` — Conflict
- `422` — Validation Error. The response contains one error object for each invalid request value.
- `428` — Precondition Required
- `429` — Too Many Requests
- `500` — Internal Server Error
- `501` — Not Implemented
- `502` — Bad Gateway
- `503` — Service Unavailable

## Changes

- **2026-09-02** `c7c12da5915f` — 12 info
  - added the optional property `errors/items/meta/limitScope` to the response with the `400` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `401` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `403` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `404` status
  - …8 more
- **2026-08-27** `359d267dca88` — 1 info
  - deleted the `header` request parameter `X-Agent-ID` with deprecation
- **2026-08-23** `b1ad79e918ac` — 1 info
  - `header` request parameter `X-Agent-ID` was deprecated
- **2026-08-13** `ba1fb54c5939` — 2 info
  - added the new optional request property `data/attributes/tags`
  - added the required property `data/attributes/tags` to the response with the `200` status
- **2026-07-26** `270e233e401c` — 3 breaking, 2 warning
  - request property `data/attributes/slug` list-of-types was narrowed by removing types `null` from media type `application/json`
  - the `data/attributes/name/anyOf[subschema #1]/` request property's maxLength was decreased to `32`
  - added the pattern `^[a-z0-9][a-z0-9._]{1,28}[a-z0-9]$` to the request property `data/attributes/slug`
  - for the `header` request parameter `Idempotency-Key`, the maxLength was set to `255`
  - …1 more

[Change history](https://skmtc.dev/natural/apis/natural-api/changes/agents/:agentId/patch.md)

---

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