Update Agent
Update Agent within the workspace of your API key.
Call Create agent first and replace the example agent ID with its returned ID.
/anthropic/v1/agents/{agent_id}◐ PartialOfficial Claude documentation ↗
Request parameters
agent_idstring必填path: Filter results by agent ID.
namestring可选Agent name; omit to preserve. Cannot be cleared.
modelstring | object可选The model powering the agent: a model name string (e.g. claude-opus-5) or an object for extra configuration (see subfields).
▸ 展开子字段(4)
idstring必填The model name string, e.g. claude-opus-5.
effortstring | object可选How hard the model works per inference: a bare level string (e.g. high) or a {type: high} object. On create, omitted resolves the per-model default; on update, omitting preserves it.
inference_geostring可选Geographic region for inference; unset falls through to the workspace default. model is replaced wholesale — omitting the subfield on update clears it.
speedstring可选Inference speed mode: fast generates output notably quicker at premium pricing. Not all models support it; invalid combinations are rejected at create time.
systemstring可选System prompt; omit to preserve, send an empty string or null to clear.
descriptionstring可选Description; omit to preserve, send an empty string or null to clear.
mcp_serversarray可选○ 未支持Full-replacement MCP server list; omit to preserve, send an empty array or null to clear.
metadataobject可选Metadata patch: set a key to a string to upsert it, or to null to delete it; omit the field to preserve. Up to 16 keys of at most 512 characters.
multiagentobject可选Multiagent topology: the session's primary thread orchestrates work by spawning session threads drawn from the agents roster.
▸ 展开子字段(2)
agentsarray必填A roster of 1-20 agent IDs, {type: agent, id, version?} references or at most one {type: self}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.
typestring必填Topology type; only coordinator today.
skillsarray可选○ 未支持Full-replacement skill list; omit to preserve, send an empty array or null to clear.
toolsarray可选Full-replacement tool configuration; omit to preserve, send an empty array or null to clear.
▸ 更多参数(1)
versionnumber可选The agent's current version for concurrency control: must match the version returned by the latest create or retrieve, or the call answers a conflict.
Returns
200
Use version for optimistic concurrency; conflicts return 409 and unchanged updates preserve the version. MCP and skills are not supported. multiagent accepts null or a coordinator roster of 1–20 agent IDs, {type:"agent",id,version?} references or at most one {type:"self"}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. The compatibility API provides only the eight official tools: bash, edit, glob, grep, read, write, web_search and web_fetch. configs rejects other tool names. Sessions created here do not provide background tasks, Monitor or subagents. Use /agent/v1 for all native tools. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.
Errors follow the Claude Managed Agents format — see error codes
Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | |
| mcp_servers | array<object> | |
| mcp_servers[].name | string | |
| mcp_servers[].type | string | |
| mcp_servers[].url | string | |
| metadata | object | |
| model | object | Model identifier and configuration. |
| model.id | string | The model that will power your agent. See models for additional details and options. |
| model.effort | object | How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. |
| model.inference_geo | string | Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo. |
| model.speed | string | 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. |
| multiagent | null | object | Resolved coordinator topology with a concrete agent roster. |
| multiagent.agents | array<object> | Agents the coordinator may spawn as session threads, each resolved to a specific version. |
| multiagent.type | string | |
| name | string | |
| skills | array<object> | |
| skills[].skill_id | string | |
| skills[].type | string | |
| skills[].version | string | |
| system | null | string | |
| tools | array<object> | |
| tools[].configs | array<object> | |
| tools[].default_config | object | Resolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server. |
| tools[].type | string | |
| tools[].mcp_server_name | string | |
| tools[].description | string | |
| tools[].input_schema | object | JSON Schema for custom tool input parameters. |
| tools[].name | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| version | number | The agent's current version. Starts at 1 and increments when the agent is modified. |