Update Agent

post/v1/agents/{agent_id}?beta=true

Path parameters

agent_idstring required

Path parameter agent_id

Headers

anthropic-versionstring
anthropic-betastring

Request body

versioninteger required

The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. The request fails if this does not match the server's current version.

namestring

Human-readable name. 1-256 characters. Omit to preserve. Cannot be cleared.

descriptionstring nullable

Description. Up to 2048 characters. Omit to preserve; send empty string or null to clear.

systemstring nullable

System prompt. Up to 100,000 characters. Omit to preserve; send empty string or null to clear.

metadataobject nullable

Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars.

Example request

{
  "version": 1,
  "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end."
}

Response

Successful response (OK)

type'agent' required
idstring required
versioninteger required

The agent's current version. Starts at 1 and increments when the agent is modified.

namestring required
descriptionstring nullable required
systemstring nullable required
metadataobject required
created_atstring date-time required

A timestamp in RFC 3339 format

updated_atstring date-time required

A timestamp in RFC 3339 format

archived_atstring date-time required

A timestamp in RFC 3339 format

Example response

{
  "type": "agent",
  "id": "agent_011CZkYpogX7uDKUyvBTophP",
  "version": 1,
  "name": "My First Agent",
  "description": "A general-purpose starter agent.",
  "model": {
    "id": "claude-sonnet-4-6",
    "speed": "standard"
  },
  "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.",
  "tools": [
    {
      "type": "agent_toolset_20260401",
      "default_config": {
        "enabled": true,
        "permission_policy": {
          "type": "always_ask"
        }
      },
      "configs": []
    }
  ],
  "mcp_servers": [
    {
      "type": "url",
      "name": "example-mcp",
      "url": "https://example-server.modelcontextprotocol.io/sse"
    }
  ],
  "skills": [
    {
      "type": "anthropic",
      "skill_id": "xlsx",
      "version": "1"
    },
    {
      "type": "custom",
      "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx",
      "version": "2"
    }
  ],
  "multiagent": null,
  "metadata": {
    "foo": "bar"
  },
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z",
  "archived_at": null
}

Changes