AnthropicClaude Managed Agents

Create Agent

Create Agent within the workspace of your API key.

POST /anthropic/v1/agents◐ Partial

Official Claude documentation ↗

Request body

  • namestring必填

    Human-readable agent name, 1-255 characters, unique within the workspace.

  • 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可选

    The agent's system prompt.

  • descriptionstring可选

    What the agent does.

  • mcp_serversarray可选○ 未支持

    MCP servers the agent connects to; up to 20 with unique names. Every server must be referenced by an mcp_toolset in tools, or the request is rejected.

    ▸ 展开子字段(3)
    • namestring必填

      Name unique within this list, 1-255 characters, referenced by mcp_toolset configurations.

    • typestring必填

      Server type; only url is supported today.

      取值 url
    • urlstring必填

      The MCP server's endpoint URL.

  • metadataobject可选

    Custom metadata key-value pairs; up to 16 keys of at most 512 characters each.

  • 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.

      取值 coordinator
  • skillsarray可选○ 未支持

    Skills available to the agent.

  • toolsarray可选

    Tool configurations for the agent; up to 128 tools across all toolsets.

Returns

200

Supports text prompts, models, metadata and built-in tools. MCP, skills and additional model controls are not supported and return 400. 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

NameTypeDescription
idstring
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | string
mcp_serversarray<object>
mcp_servers[].namestring
mcp_servers[].typestring
mcp_servers[].urlstring
metadataobject
modelobjectModel identifier and configuration.
model.idstringThe model that will power your agent. See models for additional details and options.
model.effortobjectHow hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.
model.inference_geostringGeographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
model.speedstringInference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.
multiagentnull | objectResolved coordinator topology with a concrete agent roster.
multiagent.agentsarray<object>Agents the coordinator may spawn as session threads, each resolved to a specific version.
multiagent.typestring
namestring
skillsarray<object>
skills[].skill_idstring
skills[].typestring
skills[].versionstring
systemnull | string
toolsarray<object>
tools[].configsarray<object>
tools[].default_configobjectResolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server.
tools[].typestring
tools[].mcp_server_namestring
tools[].descriptionstring
tools[].input_schemaobjectJSON Schema for custom tool input parameters.
tools[].namestring
typestring
updated_atstringA timestamp in RFC 3339 format
versionnumberThe agent's current version. Starts at 1 and increments when the agent is modified.