Update Session
api/beta/sessions/update
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/sessions/update Changed · +178 / -245 lines
# Update Session ## Path parameters ## Headers ## Body parameters ## Returns ## Example ### Response (200) ## Update Session ### Path Parameters ### Header Parameters ### Body Parameters ### Returns ### Example #### Response
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
---- -title: Update Session -url: https://platform.claude.com/docs/en/api/beta/sessions/update ---- - -## Update Session - -**post** `/v1/sessions/{session_id}` +# Update Session + +**POST** `/v1/sessions/{session_id}` Update Session -### Path Parameters +## Path parameters - `session_id: string` -### Header Parameters +## Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Body Parameters +## Body parameters - `agent: optional BetaManagedAgentsSessionAgentUpdate`
Unique name for this server, referenced by mcp_toolset configurations. 1-255 characters. + minLength: 1, maxLength: 255 + - `type: "url"` - - `"url"` - - `url: string` Endpoint URL for the MCP server. + maxLength: 2048 + - `tools: optional array of BetaManagedAgentsAgentToolset20260401Params or BetaManagedAgentsMCPToolsetParams or BetaManagedAgentsCustomToolParams` Replacement tool list. Full replacement: the provided array becomes the new value. Send an empty array to clear; omit to preserve. - - `BetaManagedAgentsAgentToolset20260401Params object { type, configs, default_config }` + - `BetaManagedAgentsAgentToolset20260401Params object` Configuration for built-in agent tools. Use this to enable or disable groups of tools available to the agent. - `type: "agent_toolset_20260401"` - - `"agent_toolset_20260401"` - - `configs: optional array of BetaManagedAgentsAgentToolConfigParams` Per-tool configuration overrides. - - `BetaManagedAgentsBashToolConfigParams object { name, enabled, permission_policy, type }` + - `BetaManagedAgentsBashToolConfigParams object` Configuration override for the bash tool.
Must be "bash". - - `"bash"` - - `enabled: optional boolean or null` Whether this tool is enabled and available to Claude. Overrides the default_config setting.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - `type: "always_allow"` - - `"always_allow"` - - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "always_ask"` - - `"always_ask"` - - `type: optional "bash"` - - `"bash"` - - - `BetaManagedAgentsEditToolConfigParams object { name, enabled, permission_policy, type }` + - `BetaManagedAgentsEditToolConfigParams object` Configuration override for the edit tool.
Must be "edit". - - `"edit"` - - `enabled: optional boolean or null` Whether this tool is enabled and available to Claude. Overrides the default_config setting.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: optional "edit"` - - `"edit"` - - - `BetaManagedAgentsReadToolConfigParams object { name, enabled, permission_policy, type }` + - `BetaManagedAgentsReadToolConfigParams object` Configuration override for the read tool.
Must be "read". - - `"read"` - - `enabled: optional boolean or null` Whether this tool is enabled and available to Claude. Overrides the default_config setting.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: optional "read"` - - `"read"` - - - `BetaManagedAgentsWriteToolConfigParams object { name, enabled, permission_policy, type }` + - `BetaManagedAgentsWriteToolConfigParams object` Configuration override for the write tool.
Must be "write". - - `"write"` - - `enabled: optional boolean or null` Whether this tool is enabled and available to Claude. Overrides the default_config setting.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: optional "write"` - - `"write"` - - - `BetaManagedAgentsGlobToolConfigParams object { name, enabled, permission_policy, type }` + - `BetaManagedAgentsGlobToolConfigParams object` Configuration override for the glob tool.
Must be "glob". - - `"glob"` - - `enabled: optional boolean or null` Whether this tool is enabled and available to Claude. Overrides the default_config setting.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: optional "glob"` - - `"glob"` - - - `BetaManagedAgentsGrepToolConfigParams object { name, enabled, permission_policy, type }` + - `BetaManagedAgentsGrepToolConfigParams object` Configuration override for the grep tool.
Must be "grep". - - `"grep"` - - `enabled: optional boolean or null` Whether this tool is enabled and available to Claude. Overrides the default_config setting.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: optional "grep"` - - `"grep"` - - - `BetaManagedAgentsWebFetchToolConfigParams object { name, allowed_domains, blocked_domains, 4 more }` + - `BetaManagedAgentsWebFetchToolConfigParams object` Configuration override for the web_fetch tool.
Must be "web_fetch". - - `"web_fetch"` - - `allowed_domains: optional array of string` Only fetch URLs whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "docs.example.com" (no scheme, port, or path). At most 64 entries; an empty list is rejected (omit the field instead). Cannot be combined with blocked_domains.
Maximum number of tokens of fetched text content to include in context per call. Does not apply to binary content such as PDFs. + format: int32 + - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: optional "web_fetch"` - - `"web_fetch"` - - - `BetaManagedAgentsWebSearchToolConfigParams object { name, allowed_domains, blocked_domains, 4 more }` + - `BetaManagedAgentsWebSearchToolConfigParams object` Configuration override for the web_search tool.
Must be "web_search". - - `"web_search"` - - `allowed_domains: optional array of string` Only return search results whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "docs.example.com" (no scheme or port; an optional path suffix is accepted). At most 64 entries; an empty list is rejected (omit the field instead). Cannot be combined with blocked_domains.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: optional "web_search"` - - `"web_search"` - - `user_location: optional BetaManagedAgentsUserLocation or null` Approximate user location for search result localization.
Location precision. Only "approximate" is supported. - - `"approximate"` - - `city: optional string or null` City name. + minLength: 1, maxLength: 255 + - `country: optional string or null` Two-letter ISO 3166-1 country code, uppercase.
Region or state name. + minLength: 1, maxLength: 255 + - `timezone: optional string or null` IANA timezone identifier, e.g. "America/Los_Angeles". + minLength: 1, maxLength: 255 + - `default_config: optional BetaManagedAgentsAgentToolsetDefaultConfigParams or null` Default configuration for all tools in a toolset.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - - `BetaManagedAgentsMCPToolsetParams object { mcp_server_name, type, configs, default_config }` + - `BetaManagedAgentsMCPToolsetParams object` Configuration for tools from an MCP server defined in `mcp_servers`.
Name of the MCP server. Must match a server name from the mcp_servers array. 1-255 characters. + minLength: 1, maxLength: 255 + - `type: "mcp_toolset"` - - `"mcp_toolset"` - - `configs: optional array of BetaManagedAgentsMCPToolConfigParams` Per-tool configuration overrides.
Name of the MCP tool to configure. 1-128 characters. + minLength: 1, maxLength: 128 + - `enabled: optional boolean or null` Whether this tool is enabled. Overrides the `default_config` setting.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - - `BetaManagedAgentsCustomToolParams object { description, input_schema, name, type }` + - `BetaManagedAgentsCustomToolParams 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.
Description of what the tool does, shown to the agent to help it decide when to use the tool. + minLength: 1 + - `input_schema: BetaManagedAgentsCustomToolInputSchema` JSON Schema for custom tool input parameters. - `type: "object"` - - `"object"` - - `properties: optional map[unknown] or null` - `required: optional array of string or null`
Unique name for the tool. 1-128 characters; letters, digits, underscores, and hyphens. + minLength: 1, maxLength: 128 + - `type: "custom"` - - `"custom"` - - `budget: optional BetaManagedAgentsBudgetLimit or null` A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced. - - `"USD"` - - `type: "limit"` - - `"limit"` - - `metadata: optional map[string] or null` Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve.
Human-readable session title. + minLength: 1, maxLength: 500 + - `vault_ids: optional array of string` Vault IDs (`vlt_*`) to attach to the session. Not yet supported; requests setting this field are rejected. Reserved for future use. -### Returns - -- `BetaManagedAgentsSession object { id, agent, archived_at, 14 more }` +## Returns + +- `BetaManagedAgentsSession object` A Managed Agents `session`.
- `type: "url"` - - `"url"` - - `url: string` - `model: BetaManagedAgentsModelConfig`
How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. - - `BetaManagedAgentsEffortLow object { type }` + - `BetaManagedAgentsEffortLow object` Low effort. Favors latency over reasoning depth. - `type: "low"` - - `"low"` - - - `BetaManagedAgentsEffortMedium object { type }` + - `BetaManagedAgentsEffortMedium object` Medium effort. Balances latency and reasoning depth. - `type: "medium"` - - `"medium"` - - - `BetaManagedAgentsEffortHigh object { type }` + - `BetaManagedAgentsEffortHigh object` High effort. Favors reasoning depth. - `type: "high"` - - `"high"` - - - `BetaManagedAgentsEffortXhigh object { type }` + - `BetaManagedAgentsEffortXhigh object` Extra-high effort. Not all models accept this level. - `type: "xhigh"` - - `"xhigh"` - - - `BetaManagedAgentsEffortMax object { type }` + - `BetaManagedAgentsEffortMax object` Maximum effort. Favors reasoning depth over latency. - `type: "max"` - - `"max"` - - `inference_geo: optional string` Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
Full `agent` definitions the coordinator may spawn as session threads. - - `BetaManagedAgentsSessionThreadAgent object { id, description, mcp_servers, 7 more }` + - `BetaManagedAgentsSessionThreadAgent object` 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`.
- `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill` - - `BetaManagedAgentsAnthropicSkill object { skill_id, type, version }` + - `BetaManagedAgentsAnthropicSkill object` A resolved Anthropic-managed skill.
- `type: "anthropic"` - - `"anthropic"` - - `version: string` - - `BetaManagedAgentsCustomSkill object { skill_id, type, version }` + - `BetaManagedAgentsCustomSkill object` A resolved user-created custom skill.
- `type: "custom"` - - `"custom"` - - `version: string` - `system: string or null` - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool` - - `BetaManagedAgentsAgentToolset20260401 object { configs, default_config, type }` + - `BetaManagedAgentsAgentToolset20260401 object` - `configs: array of BetaManagedAgentsAgentToolConfig` - - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }` + - `BetaManagedAgentsBashToolConfig object` Configuration for the bash tool.
- `name: "bash"` - - `"bash"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - `type: "always_allow"` - - `"always_allow"` - - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "always_ask"` - - `"always_ask"` - - `type: "bash"` - - `"bash"` - - - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }` + - `BetaManagedAgentsEditToolConfig object` Configuration for the edit tool.
- `name: "edit"` - - `"edit"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "edit"` - - `"edit"` - - - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }` + - `BetaManagedAgentsReadToolConfig object` Configuration for the read tool.
- `name: "read"` - - `"read"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "read"` - - `"read"` - - - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }` + - `BetaManagedAgentsWriteToolConfig object` Configuration for the write tool.
- `name: "write"` - - `"write"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "write"` - - `"write"` - - - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }` + - `BetaManagedAgentsGlobToolConfig object` Configuration for the glob tool.
- `name: "glob"` - - `"glob"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "glob"` - - `"glob"` - - - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }` + - `BetaManagedAgentsGrepToolConfig object` Configuration for the grep tool.
- `name: "grep"` - - `"grep"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "grep"` - - `"grep"` - - - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }` + - `BetaManagedAgentsWebFetchToolConfig object` Configuration for the web_fetch tool.
- `name: "web_fetch"` - - `"web_fetch"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "web_fetch"` - - `"web_fetch"` - - `allowed_domains: optional array of string` - `blocked_domains: optional array of string` - `max_content_tokens: optional number or null` - - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }` + format: int32 + + - `BetaManagedAgentsWebSearchToolConfig object` Configuration for the web_search tool.
- `name: "web_search"` - - `"web_search"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "web_search"` - - `"web_search"` - - `allowed_domains: optional array of string` - `blocked_domains: optional array of string`
Location precision. Only "approximate" is supported. - - `"approximate"` - - `city: optional string or null` City name. + minLength: 1, maxLength: 255 + - `country: optional string or null` Two-letter ISO 3166-1 country code, uppercase.
Region or state name. + minLength: 1, maxLength: 255 + - `timezone: optional string or null` IANA timezone identifier, e.g. "America/Los_Angeles". + minLength: 1, maxLength: 255 + - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig` Resolved default configuration for agent tools.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution. - `type: "agent_toolset_20260401"` - - `"agent_toolset_20260401"` - - - `BetaManagedAgentsMCPToolset object { configs, default_config, mcp_server_name, type }` + - `BetaManagedAgentsMCPToolset object` - `configs: array of BetaManagedAgentsMCPToolConfig`
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution.
Permission policy for tool execution. - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + - `BetaManagedAgentsAlwaysAllowPolicy object` Tool calls are automatically approved without user confirmation. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `BetaManagedAgentsAlwaysAskPolicy object` Tool calls require user confirmation before execution.
- `type: "mcp_toolset"` - - `"mcp_toolset"` - - - `BetaManagedAgentsCustomTool object { description, input_schema, name, type }` + - `BetaManagedAgentsCustomTool object` A custom tool as returned in API responses.
- `type: "object"` - - `"object"` - - `properties: optional map[unknown] or null` - `required: optional array of string or null`
- `type: "custom"` - - `"custom"` - - `type: "agent"` - - `"agent"` - - `version: number` - - `BetaManagedAgentsAdvisor object { model, type }` + format: int32 + + - `BetaManagedAgentsAdvisor object` Platform advisor roster entry: a model the session's primary thread may consult mid-turn.
- `type: "advisor"` - - `"advisor"` - - `type: "coordinator"` - - `"coordinator"` - - `name: string` - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill` - - `BetaManagedAgentsAnthropicSkill object { skill_id, type, version }` + - `BetaManagedAgentsAnthropicSkill object` A resolved Anthropic-managed skill. - - `BetaManagedAgentsCustomSkill object { skill_id, type, version }` + - `BetaManagedAgentsCustomSkill object` A resolved user-created custom skill.
- `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool` - - `BetaManagedAgentsAgentToolset20260401 object { configs, default_config, type }` - - - `BetaManagedAgentsMCPToolset object { configs, default_config, mcp_server_name, type }` - - - `BetaManagedAgentsCustomTool object { description, input_schema, name, type }` + - `BetaManagedAgentsAgentToolset20260401 object` + + - `BetaManagedAgentsMCPToolset object` + + - `BetaManagedAgentsCustomTool object` A custom tool as returned in API responses. - `type: "agent"` - - `"agent"` - - `version: number` + format: int32 + - `archived_at: string or null` A timestamp in RFC 3339 format + format: date-time + - `budget: BetaManagedAgentsBudgetLimit or null` A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced. - - `"USD"` - - `type: "limit"` - - `"limit"` - - `created_at: string` A timestamp in RFC 3339 format + format: date-time + - `environment_id: string` - `metadata: map[string]`
A timestamp in RFC 3339 format + format: date-time + - `description: string` What the agent should produce.
0-indexed revision cycle the outcome is currently on. + format: int32 + - `outcome_id: string` Server-generated outc_ ID for this outcome.
- `type: "outcome_evaluation"` - - `"outcome_evaluation"` - - `resources: array of BetaManagedAgentsSessionResource` - - `BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }` + - `BetaManagedAgentsGitHubRepositoryResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `mount_path: string` - `type: "github_repository"` - - `"github_repository"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `url: string` - `checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout or null` - - `BetaManagedAgentsBranchCheckout object { name, type }` + - `BetaManagedAgentsBranchCheckout object` - `name: string` Branch name to check out. + minLength: 1, maxLength: 255 + - `type: "branch"` - - `"branch"` - - - `BetaManagedAgentsCommitCheckout object { sha, type }` + - `BetaManagedAgentsCommitCheckout object` - `sha: string` Full commit SHA to check out. + minLength: 7, maxLength: 64 + - `type: "commit"` - - `"commit"` - - - `BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }` + - `BetaManagedAgentsFileResource object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `file_id: string` - `mount_path: string` - `type: "file"` - - `"file"` - - `updated_at: string` A timestamp in RFC 3339 format - - `BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }` + format: date-time + + - `BetaManagedAgentsMemoryStoreResource object` A memory store attached to an agent session.
- `type: "memory_store"` - - `"memory_store"` - - `access: optional "read_write" or "read_only" or null` Access mode for an attached memory store.
Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. + maxLength: 4096 + - `mount_path: optional string or null` Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
Cumulative time in seconds the session spent in running status. Excludes idle time. + format: double + - `duration_seconds: optional number` Elapsed time since session creation in seconds. For terminated sessions, frozen at the final update. + format: double + - `status: "rescheduling" or "running" or "idle" or "terminated"` SessionStatus enum
- `type: "session"` - - `"session"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `usage: BetaManagedAgentsSessionUsage` Cumulative token usage for a session across all turns.
Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once, unlike `stats.active_seconds`, which sums each thread's own active time. This is the duration the session's runtime cost is priced on. + format: double + - `cache_creation: optional BetaManagedAgentsCacheCreationUsage` Prompt-cache creation token usage broken down by cache lifetime.
Tokens used to create 1-hour ephemeral cache entries. + format: int32 + - `ephemeral_5m_input_tokens: optional number` Tokens used to create 5-minute ephemeral cache entries. + format: int32 + - `cache_read_input_tokens: optional number` Total tokens read from prompt cache. + format: int32 + - `input_tokens: optional number` Total input tokens consumed across all turns. + format: int32 + - `list_cost: optional BetaMonetaryAmount or null` A monetary amount in a specific currency.
Total output tokens generated across all turns. + format: int32 + - `server_tool_use: optional BetaManagedAgentsServerToolUsage or null` Cumulative count of server-executed tool invocations, broken down by tool.
Number of server-executed web fetch requests. + format: int32 + - `web_search_requests: optional number` Number of server-executed web search requests. + format: int32 + - `vault_ids: array of string` Vault IDs attached to the session at creation. Empty when no vaults were supplied.
Deployment ID when the session was created from a deployment reference. Null otherwise. -### Example - -```http +## Example + +```bash curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +### Response (200) ```json {