---
title: "Update Agent"
method: POST
path: "/v1/agents/{agent_id}?beta=true"
---

# Update Agent

`POST /v1/agents/{agent_id}?beta=true`

## Path parameters

- `agent_id` string, required

## Headers

- `anthropic-version` string
- `anthropic-beta` string

## Request body

- BetaManagedAgentsUpdateAgentParams — Request parameters for updating an `agent`. Omit a field to preserve its current value.
  - `version` integer — The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. Must be at least 1 if specified. When supplied, the request fails if it does not match the server's current version; omit to apply the update unconditionally.
  - `name` string — Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.
  - `description` string, nullable — Description. Omit to preserve; send empty string or null to clear.
  - `model` union
    - union
      - string
      - 'claude-sonnet-5' — High-performance model for coding and agents
      - 'claude-fable-5' — Next generation of intelligence for the hardest knowledge work and coding problems
      - 'claude-opus-5' — Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-8' — Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-7' — Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-6' — Powerful intelligence for long-running agents and coding
      - 'claude-sonnet-4-6' — Best combination of speed and intelligence
      - 'claude-haiku-4-5' — Fastest model with near-frontier intelligence
      - 'claude-haiku-4-5-20251001' — Fastest model with near-frontier intelligence
      - 'claude-opus-4-5' — Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-5-20251101' — Powerful intelligence for long-running agents and coding
      - 'claude-sonnet-4-5' — High-performance model for agents and coding
      - 'claude-sonnet-4-5-20250929' — High-performance model for agents and coding
    - BetaManagedAgentsModelConfigParams — An object that defines additional configuration control over model use
      - `id` union, required — The model that will power your agent. See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
        - string
        - 'claude-sonnet-5' — High-performance model for coding and agents
        - 'claude-fable-5' — Next generation of intelligence for the hardest knowledge work and coding problems
        - 'claude-opus-5' — Powerful intelligence for long-running agents and coding
        - 'claude-opus-4-8' — Powerful intelligence for long-running agents and coding
        - 'claude-opus-4-7' — Powerful intelligence for long-running agents and coding
        - 'claude-opus-4-6' — Powerful intelligence for long-running agents and coding
        - 'claude-sonnet-4-6' — Best combination of speed and intelligence
        - 'claude-haiku-4-5' — Fastest model with near-frontier intelligence
        - 'claude-haiku-4-5-20251001' — Fastest model with near-frontier intelligence
        - 'claude-opus-4-5' — Powerful intelligence for long-running agents and coding
        - 'claude-opus-4-5-20251101' — Powerful intelligence for long-running agents and coding
        - 'claude-sonnet-4-5' — High-performance model for agents and coding
        - 'claude-sonnet-4-5-20250929' — High-performance model for agents and coding
      - `speed` 'standard' | 'fast' — Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.
      - `effort` union
        - 'low' | 'medium' | 'high' | 'xhigh' | 'max' — How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time.
        - union — How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.
          - object — Low effort. Favors latency over reasoning depth.
            - `type` 'low', required
          - object — Medium effort. Balances latency and reasoning depth.
            - `type` 'medium', required
          - object — High effort. Favors reasoning depth.
            - `type` 'high', required
          - object — Extra-high effort. Not all models accept this level.
            - `type` 'xhigh', required
          - object — Maximum effort. Favors reasoning depth over latency.
            - `type` 'max', required
      - `inference_geo` string, nullable — Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo. On update, `model` is whole-object replacement — omitting inference_geo clears it.
  - `system` string, nullable — System prompt. Omit to preserve; send empty string or null to clear.
  - `tools` BetaManagedAgentsAgentToolParams[], nullable — Tool configurations available to the agent. Full replacement. Omit to preserve; send empty array or null to clear. Maximum of 128 tools across all toolsets allowed.
    - union — Union type for tool configurations in the tools array.
      - object — Configuration for built-in agent tools. Use this to enable or disable groups of tools available to the agent.
        - `type` 'agent_toolset_20260401', required
        - `default_config` BetaManagedAgentsAgentToolsetDefaultConfigParams — Default configuration for all tools in a toolset.
          - `enabled` boolean, nullable — Whether tools are enabled and available to Claude by default. Defaults to true if not specified.
          - `permission_policy` union — Permission policy for tool execution.
            - object — Tool calls are automatically approved without user confirmation.
              - …
            - object — Tool calls require user confirmation before execution.
              - …
        - `configs` BetaManagedAgentsAgentToolConfigParams[] — Per-tool configuration overrides.
          - `name` 'bash' | 'edit' | 'read' | 'write' | 'glob' | 'grep' | 'web_fetch' | 'web_search', required — Built-in agent tool identifier.
          - `enabled` boolean, nullable — Whether this tool is enabled and available to Claude. Overrides the default_config setting.
          - `permission_policy` union — Permission policy for tool execution.
            - object — Tool calls are automatically approved without user confirmation.
              - …
            - object — Tool calls require user confirmation before execution.
              - …
      - object — Configuration for tools from an MCP server defined in `mcp_servers`.
        - `type` 'mcp_toolset', required
        - `mcp_server_name` string, required — Name of the MCP server. Must match a server name from the mcp_servers array. 1-255 characters.
        - `default_config` BetaManagedAgentsMCPToolsetDefaultConfigParams — Default configuration for all tools from an MCP server.
          - `enabled` boolean, nullable — Whether tools are enabled by default. Defaults to true if not specified.
          - `permission_policy` union — Permission policy for tool execution.
            - object — Tool calls are automatically approved without user confirmation.
              - …
            - object — Tool calls require user confirmation before execution.
              - …
        - `configs` BetaManagedAgentsMCPToolConfigParams[] — Per-tool configuration overrides.
          - `name` string, required — Name of the MCP tool to configure. 1-128 characters.
          - `enabled` boolean, nullable — Whether this tool is enabled. Overrides the `default_config` setting.
          - `permission_policy` union — Permission policy for tool execution.
            - object — Tool calls are automatically approved without user confirmation.
              - …
            - object — Tool calls require user confirmation before execution.
              - …
      - object — A custom tool that is executed by the API client rather than the agent. When the agent calls this tool, an `agent.custom_tool_use` event is emitted and the session goes idle, waiting for the client to provide the result via a `user.custom_tool_result` event.
        - `type` 'custom', required
        - `name` string, required — Unique name for the tool. 1-128 characters; letters, digits, underscores, and hyphens.
        - `description` string, required — Description of what the tool does, shown to the agent to help it decide when to use the tool.
        - `input_schema` BetaManagedAgentsCustomToolInputSchema, required — JSON Schema for custom tool input parameters.
          - `properties` object, nullable
          - `required` string[], nullable
          - `type` 'object', required
  - `mcp_servers` BetaManagedAgentsMCPServerParams[], nullable — MCP servers. Full replacement. Omit to preserve; send empty array or `null` to clear. Names must be unique. Maximum 20. Every server must be referenced by an `mcp_toolset` in the agent's resulting `tools`; unreferenced servers are rejected. See the [MCP connector guide](https://platform.claude.com/docs/en/managed-agents/mcp-connector).
    - `type` 'url', required
    - `name` string, required — Unique name for this server, referenced by mcp_toolset configurations. 1-255 characters.
    - `url` string, required — Endpoint URL for the MCP server.
  - `skills` BetaManagedAgentsSkillParams[], nullable — Skills. Full replacement. Omit to preserve; send empty array or null to clear.
    - union — Skill to load in the session container.
      - BetaManagedAgentsAnthropicSkillParams — An Anthropic-managed skill.
        - `type` 'anthropic', required
        - `skill_id` string, required — Identifier of the Anthropic skill (e.g., "xlsx").
        - `version` string, nullable — Version to pin. Defaults to latest if omitted.
      - BetaManagedAgentsCustomSkillParams — A user-created custom skill.
        - `type` 'custom', required
        - `skill_id` string, required — Tagged ID of the custom skill (e.g., "skill_01XJ5...").
        - `version` string, nullable — Version to pin. Defaults to latest if omitted.
  - `metadata` object, 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.
  - `multiagent` BetaManagedAgentsMultiagentParams — A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the `agents` roster.
    - `type` 'coordinator', required
    - `agents` BetaManagedAgentsMultiagentRosterEntryParams[], required — Agents the coordinator may spawn as session threads. 1–20 entries. Each entry is an agent ID string, a versioned `{"type":"agent","id","version"}` reference, or `{"type":"self"}` to allow recursive self-invocation. Entries must reference distinct agents (after resolving `self` and string forms); at most one `self`. Referenced agents must exist, must not be archived, and must not themselves have `multiagent` set (depth limit 1).
      - union — An entry in a multiagent roster: an agent ID string, a versioned agent reference, or `self`.
        - string
        - BetaManagedAgentsAgentParams — Specification for an Agent. Provide a specific `version` or use the short-form `agent="agent_id"` for the most recent version
          - `type` 'agent', required
          - `id` string, required — The `agent` ID.
          - `version` integer — The specific `agent` version to use. Omit to use the latest version. Must be at least 1 if specified.
        - BetaManagedAgentsMultiagentSelfParams — Sentinel roster entry meaning "the agent that owns this configuration". Resolved server-side to a concrete agent reference.
          - `type` 'self', required
        - BetaManagedAgentsAdvisorParams — Platform advisor roster entry: a model the session's primary thread may consult mid-turn. At most one per roster; the entry occupies the roster name `anthropic.advisor`.
          - `type` 'advisor', required
          - `model` string, required — A Claude model id. The model must be permitted as an advisor for this agent's model — see the sessions/threads/advisor spec.

## Response `200`

Successful response (OK)

- BetaManagedAgentsAgent — A Managed Agents `agent`.
  - `type` 'agent', required
  - `id` string, required
  - `version` integer, required — The agent's current version. Starts at 1 and increments when the agent is modified.
  - `name` string, required
  - `description` string, nullable, required
  - `model` BetaManagedAgentsModelConfig, required — Model identifier and configuration.
    - `id` union, required — The model that will power your agent. See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
      - string
      - 'claude-sonnet-5' — High-performance model for coding and agents
      - 'claude-fable-5' — Next generation of intelligence for the hardest knowledge work and coding problems
      - 'claude-opus-5' — Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-8' — Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-7' — Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-6' — Powerful intelligence for long-running agents and coding
      - 'claude-sonnet-4-6' — Best combination of speed and intelligence
      - 'claude-haiku-4-5' — Fastest model with near-frontier intelligence
      - 'claude-haiku-4-5-20251001' — Fastest model with near-frontier intelligence
      - 'claude-opus-4-5' — Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-5-20251101' — Powerful intelligence for long-running agents and coding
      - 'claude-sonnet-4-5' — High-performance model for agents and coding
      - 'claude-sonnet-4-5-20250929' — High-performance model for agents and coding
    - `speed` 'standard' | 'fast' — Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.
    - `effort` union — How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.
      - object — Low effort. Favors latency over reasoning depth.
        - `type` 'low', required
      - object — Medium effort. Balances latency and reasoning depth.
        - `type` 'medium', required
      - object — High effort. Favors reasoning depth.
        - `type` 'high', required
      - object — Extra-high effort. Not all models accept this level.
        - `type` 'xhigh', required
      - object — Maximum effort. Favors reasoning depth over latency.
        - `type` 'max', required
    - `inference_geo` string — Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
  - `system` string, nullable, required
  - `tools` BetaManagedAgentsAgentTool[], required
    - union — Union type for tool configurations returned in API responses.
      - object
        - `type` 'agent_toolset_20260401', required
        - `default_config` BetaManagedAgentsAgentToolsetDefaultConfig, required — Resolved default configuration for agent tools.
          - `enabled` boolean, required
          - `permission_policy` union, required — Permission policy for tool execution.
            - object — Tool calls are automatically approved without user confirmation.
              - …
            - object — Tool calls require user confirmation before execution.
              - …
        - `configs` BetaManagedAgentsAgentToolConfig[], required
          - `name` 'bash' | 'edit' | 'read' | 'write' | 'glob' | 'grep' | 'web_fetch' | 'web_search', required — Built-in agent tool identifier.
          - `enabled` boolean, required
          - `permission_policy` union, required — Permission policy for tool execution.
            - object — Tool calls are automatically approved without user confirmation.
              - …
            - object — Tool calls require user confirmation before execution.
              - …
      - object
        - `type` 'mcp_toolset', required
        - `mcp_server_name` string, required
        - `default_config` BetaManagedAgentsMCPToolsetDefaultConfig, required — Resolved default configuration for all tools from an MCP server.
          - `enabled` boolean, required
          - `permission_policy` union, required — Permission policy for tool execution.
            - object — Tool calls are automatically approved without user confirmation.
              - …
            - object — Tool calls require user confirmation before execution.
              - …
        - `configs` BetaManagedAgentsMCPToolConfig[], required
          - `name` string, required
          - `enabled` boolean, required
          - `permission_policy` union, required — Permission policy for tool execution.
            - object — Tool calls are automatically approved without user confirmation.
              - …
            - object — Tool calls require user confirmation before execution.
              - …
      - object — A custom tool as returned in API responses.
        - `type` 'custom', required
        - `name` string, required
        - `description` string, required
        - `input_schema` BetaManagedAgentsCustomToolInputSchema, required — JSON Schema for custom tool input parameters.
          - `properties` object, nullable
          - `required` string[], nullable
          - `type` 'object', required
  - `mcp_servers` BetaManagedAgentsMCPServer[], required
    - `type` 'url', required
    - `name` string, required
    - `url` string, required
  - `skills` BetaManagedAgentsSkill[], required
    - union — Resolved skill as returned in API responses.
      - BetaManagedAgentsAnthropicSkill — A resolved Anthropic-managed skill.
        - `type` 'anthropic', required
        - `skill_id` string, required
        - `version` string, required
      - BetaManagedAgentsCustomSkill — A resolved user-created custom skill.
        - `type` 'custom', required
        - `skill_id` string, required
        - `version` string, required
  - `metadata` object, required
  - `created_at` string, date-time, required — A timestamp in RFC 3339 format
  - `updated_at` string, date-time, required — A timestamp in RFC 3339 format
  - `archived_at` string, date-time, required — A timestamp in RFC 3339 format
  - `multiagent` BetaManagedAgentsMultiagent, required — Resolved coordinator topology with a concrete agent roster.
    - `type` 'coordinator', required
    - `agents` BetaManagedAgentsMultiagentRosterEntry[], required — Agents the coordinator may spawn as session threads, each resolved to a specific version.
      - union — A resolved multiagent roster entry.
        - BetaManagedAgentsAgentReference — A resolved agent reference with a concrete version.
          - `type` 'agent', required
          - `id` string, required
          - `version` integer, required
        - BetaManagedAgentsAdvisor — Platform advisor roster entry: a model the session's primary thread may consult mid-turn.
          - `type` 'advisor', required
          - `model` string, required — The advisor model id.

## Other responses

- `400` — Invalid argument - The client specified an invalid argument
- `401` — Unauthenticated - The request does not have valid authentication credentials
- `403` — Permission denied - The caller does not have permission to execute the specified operation
- `404` — Not found - Some requested entity was not found
- `408` — Deadline exceeded - The deadline expired before the operation could complete
- `409` — Aborted - The operation was aborted due to concurrency issue
- `412` — Failed precondition - Operation was rejected because the system is not in required state
- `413` — Out of range - Operation was attempted past the valid range
- `429` — Resource exhausted - Some resource has been exhausted (rate limiting)
- `431` — Request header fields too large - Request metadata was too large
- `499` — Cancelled - The operation was cancelled by the client
- `500` — Internal - Internal server error
- `501` — Unimplemented - The operation is not implemented or supported
- `503` — Unavailable - The service is currently unavailable
- `504` — Deadline exceeded - Upstream service did not respond in time

---

[API](https://skmtc.net/anthropics/apis/anthropic-api.md) · [All operations](https://skmtc.net/anthropics/apis/anthropic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anthropics/anthropic-api/versions/93d8fd7d6493/schema)
