Claude Platform Docs

Agents

Create Agent
BetaManagedAgentsAgent beta().agents().create(AgentCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/agents
List Agents
AgentListPage beta().agents().list(AgentListParamsparams = AgentListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/agents
Get Agent
BetaManagedAgentsAgent beta().agents().retrieve(AgentRetrieveParamsparams = AgentRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/agents/{agent_id}
Update Agent
BetaManagedAgentsAgent beta().agents().update(AgentUpdateParamsparams = AgentUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/agents/{agent_id}
Archive Agent
BetaManagedAgentsAgent beta().agents().archive(AgentArchiveParamsparams = AgentArchiveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/agents/{agent_id}/archive
Models
class BetaManagedAgentsAdvisor:

Platform advisor roster entry: a model the session's primary thread may consult mid-turn.

String model

The advisor model id.

Type type
class BetaManagedAgentsAgent:

A Managed Agents agent.

class BetaManagedAgentsAgentReference:

A resolved agent reference with a concrete version.

String id
Type type
long version
formatint32
class BetaManagedAgentsAgentToolConfig: A class that can be one of several variants.union

Configuration for a specific agent tool.

class BetaManagedAgentsAgentToolConfigParams: A class that can be one of several variants.union

Configuration override for a specific tool within a toolset.

class BetaManagedAgentsAgentToolsetDefaultConfig:

Resolved default configuration for agent tools.

boolean enabled
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
class BetaManagedAgentsAgentToolsetDefaultConfigParams:

Default configuration for all tools in a toolset.

Optional<Boolean> enabled

Whether tools are enabled and available to Claude by default. Defaults to true if not specified.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
class BetaManagedAgentsAgentToolset20260401:
class BetaManagedAgentsAgentToolset20260401BashInput:

Input payload for the bash tool of the agent_toolset_20260401 toolset. All fields are optional; a normal invocation supplies command, while restart=true (with no command) reboots the runner-side bash session.

Optional<String> command

Shell command to execute. Omit only when restart is true.

Optional<Boolean> restart

When true, restart the persistent bash session instead of running a command. Subsequent calls without restart will run against the fresh session.

Optional<Long> timeoutMs

Per-call timeout in milliseconds. Defaults to the runner-wide tool timeout when omitted or zero.

minimum0
class BetaManagedAgentsAgentToolset20260401EditInput:

Input payload for the edit tool. Performs a string replacement in the named file; by default old_string must occur exactly once.

String filePath

Path of the file to edit.

String newString

Replacement text.

String oldString

Substring to find and replace.

Optional<Boolean> replaceAll

When true, replace every occurrence of old_string instead of requiring a unique match.

class BetaManagedAgentsAgentToolset20260401GlobInput:

Input payload for the glob tool. Returns paths matching a doublestar glob pattern, newest first.

String pattern

Doublestar glob pattern (e.g. **/*.go). Absolute patterns are only permitted when the runner is configured to allow them.

Optional<String> path

Optional directory root to search under. Defaults to the runner's working directory.

class BetaManagedAgentsAgentToolset20260401GrepInput:

Input payload for the grep tool. Searches file contents for a regular expression, returning matching lines.

String pattern

Regular expression to search for.

Optional<String> path

Optional directory root to search under. Defaults to the runner's working directory.

class BetaManagedAgentsAgentToolset20260401Params:

Configuration for built-in agent tools. Use this to enable or disable groups of tools available to the agent.

class BetaManagedAgentsAgentToolset20260401ReadInput:

Input payload for the read tool. Reads file contents relative to the runner's working directory (or absolute when the runner permits).

String filePath

Path of the file to read.

Optional<List<Long>> viewRange

Optional [start_line, end_line] 1-indexed inclusive range. When omitted the entire file is returned. end_line of 0 or negative means "to end of file".

minItems2
maxItems2
class BetaManagedAgentsAgentToolset20260401WriteInput:

Input payload for the write tool. Writes (overwriting) the entire file contents.

String content

Full file contents to write.

String filePath

Path of the file to write.

class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
class BetaManagedAgentsAnthropicSkill:

A resolved Anthropic-managed skill.

String skillId
Type type
String version
class BetaManagedAgentsAnthropicSkillParams:

An Anthropic-managed skill.

String skillId

Identifier of the Anthropic skill (e.g., "xlsx").

minLength1
maxLength64
Type type
Optional<String> version

Version to pin. Defaults to latest if omitted.

minLength1
maxLength64
class BetaManagedAgentsBashToolConfig:

Configuration for the bash tool.

boolean enabled
JsonValue name "bash"constant
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
JsonValue type "bash"constant
class BetaManagedAgentsBashToolConfigParams:

Configuration override for the bash tool.

JsonValue name "bash"constant

Must be "bash".

Optional<Boolean> enabled

Whether this tool is enabled and available to Claude. Overrides the default_config setting.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
Optional<Type> type
class BetaManagedAgentsCustomSkill:

A resolved user-created custom skill.

String skillId
Type type
String version
class BetaManagedAgentsCustomSkillParams:

A user-created custom skill.

String skillId

Tagged ID of the custom skill (e.g., "skill_01XJ5...").

minLength1
maxLength64
Type type
Optional<String> version

Version to pin. Defaults to latest if omitted.

minLength1
maxLength64
class BetaManagedAgentsCustomTool:

A custom tool as returned in API responses.

String description

JSON Schema for custom tool input parameters.

JsonValue type "object"constant
Optional<Properties> properties
Optional<List<String>> required
String name
Type type
class BetaManagedAgentsCustomToolInputSchema:

JSON Schema for custom tool input parameters.

JsonValue type "object"constant
Optional<Properties> properties
Optional<List<String>> required
class BetaManagedAgentsCustomToolParams:

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.

String description

Description of what the tool does, shown to the agent to help it decide when to use the tool.

minLength1

JSON Schema for custom tool input parameters.

JsonValue type "object"constant
Optional<Properties> properties
Optional<List<String>> required
String name

Unique name for the tool. 1-128 characters; letters, digits, underscores, and hyphens.

minLength1
maxLength128
Type type
class BetaManagedAgentsEditToolConfig:

Configuration for the edit tool.

boolean enabled
JsonValue name "edit"constant
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
JsonValue type "edit"constant
class BetaManagedAgentsEditToolConfigParams:

Configuration override for the edit tool.

JsonValue name "edit"constant

Must be "edit".

Optional<Boolean> enabled

Whether this tool is enabled and available to Claude. Overrides the default_config setting.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
Optional<Type> type
class BetaManagedAgentsEffortHigh:

High effort. Favors reasoning depth.

Type type
class BetaManagedAgentsEffortLow:

Low effort. Favors latency over reasoning depth.

Type type
class BetaManagedAgentsEffortMax:

Maximum effort. Favors reasoning depth over latency.

Type type
class BetaManagedAgentsEffortMedium:

Medium effort. Balances latency and reasoning depth.

Type type
class BetaManagedAgentsEffortXhigh:

Extra-high effort. Not all models accept this level.

Type type
class BetaManagedAgentsGlobToolConfig:

Configuration for the glob tool.

boolean enabled
JsonValue name "glob"constant
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
JsonValue type "glob"constant
class BetaManagedAgentsGlobToolConfigParams:

Configuration override for the glob tool.

JsonValue name "glob"constant

Must be "glob".

Optional<Boolean> enabled

Whether this tool is enabled and available to Claude. Overrides the default_config setting.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
Optional<Type> type
class BetaManagedAgentsGrepToolConfig:

Configuration for the grep tool.

boolean enabled
JsonValue name "grep"constant
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
JsonValue type "grep"constant
class BetaManagedAgentsGrepToolConfigParams:

Configuration override for the grep tool.

JsonValue name "grep"constant

Must be "grep".

Optional<Boolean> enabled

Whether this tool is enabled and available to Claude. Overrides the default_config setting.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
Optional<Type> type
class BetaManagedAgentsMcpServerUrlDefinition:

URL-based MCP server connection as returned in API responses.

String name
Type type
String url
class BetaManagedAgentsMcpToolConfig:

Resolved configuration for a specific MCP tool.

boolean enabled
String name
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
class BetaManagedAgentsMcpToolConfigParams:

Configuration override for a specific MCP tool.

String name

Name of the MCP tool to configure. 1-128 characters.

minLength1
maxLength128
Optional<Boolean> enabled

Whether this tool is enabled. Overrides the default_config setting.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
class BetaManagedAgentsMcpToolset:
class BetaManagedAgentsMcpToolsetDefaultConfig:

Resolved default configuration for all tools from an MCP server.

boolean enabled
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
class BetaManagedAgentsMcpToolsetDefaultConfigParams:

Default configuration for all tools from an MCP server.

Optional<Boolean> enabled

Whether tools are enabled by default. Defaults to true if not specified.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
class BetaManagedAgentsMcpToolsetParams:

Configuration for tools from an MCP server defined in mcp_servers.

enum BetaManagedAgentsModel:

The model that will power your agent.

See models for additional details and options.

CLAUDE_SONNET_5("claude-sonnet-5")

High-performance model for coding and agents

CLAUDE_FABLE_5("claude-fable-5")

Next generation of intelligence for the hardest knowledge work and coding problems

CLAUDE_OPUS_5("claude-opus-5")

Powerful intelligence for long-running agents and coding

CLAUDE_OPUS_4_8("claude-opus-4-8")

Powerful intelligence for long-running agents and coding

CLAUDE_OPUS_4_7("claude-opus-4-7")

Powerful intelligence for long-running agents and coding

CLAUDE_OPUS_4_6("claude-opus-4-6")

Powerful intelligence for long-running agents and coding

CLAUDE_SONNET_4_6("claude-sonnet-4-6")

Best combination of speed and intelligence

CLAUDE_HAIKU_4_5("claude-haiku-4-5")

Fastest model with near-frontier intelligence

CLAUDE_HAIKU_4_5_20251001("claude-haiku-4-5-20251001")

Fastest model with near-frontier intelligence

CLAUDE_OPUS_4_5("claude-opus-4-5")

Powerful intelligence for long-running agents and coding

CLAUDE_OPUS_4_5_20251101("claude-opus-4-5-20251101")

Powerful intelligence for long-running agents and coding

CLAUDE_SONNET_4_5("claude-sonnet-4-5")

High-performance model for agents and coding

CLAUDE_SONNET_4_5_20250929("claude-sonnet-4-5-20250929")

High-performance model for agents and coding

class BetaManagedAgentsModelConfig:

Model identifier and configuration.

class BetaManagedAgentsModelConfigParams:

An object that defines additional configuration control over model use

class BetaManagedAgentsMultiagentCoordinator:

Resolved coordinator topology with a concrete agent roster.

List<Agent> agents

Agents the coordinator may spawn as session threads, each resolved to a specific version.

One of the following:
class BetaManagedAgentsAgentReference:

A resolved agent reference with a concrete version.

String id
Type type
long version
formatint32
class BetaManagedAgentsAdvisor:

Platform advisor roster entry: a model the session's primary thread may consult mid-turn.

String model

The advisor model id.

Type type
Type type
class BetaManagedAgentsMultiagentCoordinatorParams:

A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the agents roster.

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

One of the following:
String
class BetaManagedAgentsAgentParams:

Specification for an Agent. Provide a specific version or use the short-form agent="agent_id" for the most recent version

String id

The agent ID.

minLength1
maxLength128
Type type
Optional<Long> version

The specific agent version to use. Omit to use the latest version. Must be at least 1 if specified.

formatint32
class BetaManagedAgentsMultiagentSelfParams:

Sentinel roster entry meaning "the agent that owns this configuration". Resolved server-side to a concrete agent reference.

Type type
class 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.

String model

A Claude model id. The model must be permitted as an advisor for this agent's model — see the sessions/threads/advisor spec.

minLength1
maxLength256
Type type
Type type
class BetaManagedAgentsMultiagentSelfParams:

Sentinel roster entry meaning "the agent that owns this configuration". Resolved server-side to a concrete agent reference.

Type type
class BetaManagedAgentsReadToolConfig:

Configuration for the read tool.

boolean enabled
JsonValue name "read"constant
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
JsonValue type "read"constant
class BetaManagedAgentsReadToolConfigParams:

Configuration override for the read tool.

JsonValue name "read"constant

Must be "read".

Optional<Boolean> enabled

Whether this tool is enabled and available to Claude. Overrides the default_config setting.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
Optional<Type> type
class BetaManagedAgentsSessionThreadAgent:

Resolved agent definition for a single session_thread. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from Session.agent.

class BetaManagedAgentsSkillParams: A class that can be one of several variants.union

Skill to load in the session container.

class BetaManagedAgentsAnthropicSkillParams:

An Anthropic-managed skill.

String skillId

Identifier of the Anthropic skill (e.g., "xlsx").

minLength1
maxLength64
Type type
Optional<String> version

Version to pin. Defaults to latest if omitted.

minLength1
maxLength64
class BetaManagedAgentsCustomSkillParams:

A user-created custom skill.

String skillId

Tagged ID of the custom skill (e.g., "skill_01XJ5...").

minLength1
maxLength64
Type type
Optional<String> version

Version to pin. Defaults to latest if omitted.

minLength1
maxLength64
class BetaManagedAgentsUrlMcpServerParams:

URL-based MCP server connection.

String name

Unique name for this server, referenced by mcp_toolset configurations. 1-255 characters.

minLength1
maxLength255
Type type
String url

Endpoint URL for the MCP server.

maxLength2048
class BetaManagedAgentsUserLocation:

Approximate user location for search result localization.

JsonValue type "approximate"constant

Location precision. Only "approximate" is supported.

Optional<String> city

City name.

minLength1
maxLength255
Optional<String> country

Two-letter ISO 3166-1 country code, uppercase.

Optional<String> region

Region or state name.

minLength1
maxLength255
Optional<String> timezone

IANA timezone identifier, e.g. "America/Los_Angeles".

minLength1
maxLength255
class BetaManagedAgentsWebFetchToolConfig:

Configuration for the web_fetch tool.

boolean enabled
JsonValue name "web_fetch"constant
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
JsonValue type "web_fetch"constant
Optional<List<String>> allowedDomains
Optional<List<String>> blockedDomains
Optional<Long> maxContentTokens
formatint32
class BetaManagedAgentsWebFetchToolConfigParams:

Configuration override for the web_fetch tool.

class BetaManagedAgentsWebSearchToolConfig:

Configuration for the web_search tool.

class BetaManagedAgentsWebSearchToolConfigParams:

Configuration override for the web_search tool.

class BetaManagedAgentsWriteToolConfig:

Configuration for the write tool.

boolean enabled
JsonValue name "write"constant
PermissionPolicy permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
JsonValue type "write"constant
class BetaManagedAgentsWriteToolConfigParams:

Configuration override for the write tool.

JsonValue name "write"constant

Must be "write".

Optional<Boolean> enabled

Whether this tool is enabled and available to Claude. Overrides the default_config setting.

Optional<PermissionPolicy> permissionPolicy

Permission policy for tool execution.

One of the following:
class BetaManagedAgentsAlwaysAllowPolicy:

Tool calls are automatically approved without user confirmation.

Type type
class BetaManagedAgentsAlwaysAskPolicy:

Tool calls require user confirmation before execution.

Type type
Optional<Type> type

AgentsVersions

List Agent Versions
VersionListPage beta().agents().versions().list(VersionListParamsparams = VersionListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/agents/{agent_id}/versions