SPB Git

Repository Public

archive.md 21.9 KB 786 lines markdown

1---2title: Archive Agent3url: https://platform.claude.com/docs/en/api/beta/agents/archive4---56# Archive Agent78**POST** `/v1/agents/{agent_id}/archive`910Archive Agent1112## Path parameters1314- `agent_id: string`1516## Headers1718- `"anthropic-beta": optional array of AnthropicBeta`1920  Optional header to specify the beta version(s) you want to use.2122  - `string`2324  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`2526    - `"message-batches-2024-09-24"`2728    - `"prompt-caching-2024-07-31"`2930    - `"computer-use-2024-10-22"`3132    - `"computer-use-2025-01-24"`3334    - `"pdfs-2024-09-25"`3536    - `"token-counting-2024-11-01"`3738    - `"token-efficient-tools-2025-02-19"`3940    - `"output-128k-2025-02-19"`4142    - `"files-api-2025-04-14"`4344    - `"mcp-client-2025-04-04"`4546    - `"mcp-client-2025-11-20"`4748    - `"dev-full-thinking-2025-05-14"`4950    - `"interleaved-thinking-2025-05-14"`5152    - `"code-execution-2025-05-22"`5354    - `"extended-cache-ttl-2025-04-11"`5556    - `"context-1m-2025-08-07"`5758    - `"context-management-2025-06-27"`5960    - `"model-context-window-exceeded-2025-08-26"`6162    - `"skills-2025-10-02"`6364    - `"fast-mode-2026-02-01"`6566    - `"output-300k-2026-03-24"`6768    - `"user-profiles-2026-03-24"`6970    - `"user-profiles-2026-08-18"`7172    - `"user-profiles-2026-09-04"`7374    - `"advisor-tool-2026-03-01"`7576    - `"managed-agents-2026-04-01"`7778    - `"cache-diagnosis-2026-04-07"`7980    - `"dreaming-2026-04-21"`8182    - `"thinking-token-count-2026-05-13"`8384    - `"server-side-fallback-2026-06-01"`8586    - `"server-side-fallback-2026-07-01"`8788    - `"fallback-credit-2026-06-01"`8990    - `"fallback-credit-2026-07-01"`9192    - `"agent-memory-2026-07-22"`9394    - `"mid-conversation-tool-changes-2026-07-01"`9596    - `"compact-2026-01-12"`9798    - `"computer-use-2025-11-24"`99100    - `"mcp-tunnels-2026-06-22"`101102    - `"structured-outputs-2025-11-13"`103104    - `"task-budgets-2026-03-13"`105106    - `"thinking-display-updates-2026-08-18"`107108    - `"ce-user-management-2026-07-13"`109110    - `"mid-conversation-output-config-2026-07-01"`111112    - `"thinking-binding-controls-2026-08-01"`113114    - `"mid-conversation-system-clear-at-2026-08-21"`115116    - `"compact-2026-09-04"`117118- `"anthropic-workspace-id": optional string`119120## Returns121122- `BetaManagedAgentsAgent object`123124  A Managed Agents `agent`.125126  - `type: "agent"`127128  - `id: string`129130  - `archived_at: string or null`131132    A timestamp in RFC 3339 format133134    format: date-time135136  - `created_at: string`137138    A timestamp in RFC 3339 format139140    format: date-time141142  - `description: string or null`143144  - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`145146    - `type: "url"`147148    - `name: string`149150    - `url: string`151152  - `metadata: map[string]`153154  - `model: BetaManagedAgentsModelConfig`155156    Model identifier and configuration.157158    - `id: BetaManagedAgentsModel`159160      The model that will power your agent.161162      See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.163164      - `"claude-fable-5-1" or "claude-sonnet-5" or "claude-fable-5" or 11 more`165166        The model that will power your agent.167168        See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.169170        - `"claude-fable-5-1"`171172          Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows173174        - `"claude-sonnet-5"`175176          High-performance model for coding and agents177178        - `"claude-fable-5"`179180          Next generation of intelligence for the hardest knowledge work and coding problems181182        - `"claude-opus-5"`183184          Powerful intelligence for long-running agents and coding185186        - `"claude-opus-4-8"`187188          Powerful intelligence for long-running agents and coding189190        - `"claude-opus-4-7"`191192          Powerful intelligence for long-running agents and coding193194        - `"claude-opus-4-6"`195196          Powerful intelligence for long-running agents and coding197198        - `"claude-sonnet-4-6"`199200          Best combination of speed and intelligence201202        - `"claude-haiku-4-5"`203204          Fastest model with near-frontier intelligence205206        - `"claude-haiku-4-5-20251001"`207208          Fastest model with near-frontier intelligence209210        - `"claude-opus-4-5"`211212          Powerful intelligence for long-running agents and coding213214        - `"claude-opus-4-5-20251101"`215216          Powerful intelligence for long-running agents and coding217218        - `"claude-sonnet-4-5"`219220          High-performance model for agents and coding221222        - `"claude-sonnet-4-5-20250929"`223224          High-performance model for agents and coding225226      - `string`227228    - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more`229230      How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.231232      - `BetaManagedAgentsEffortLow object`233234        Low effort. Favors latency over reasoning depth.235236        - `type: "low"`237238      - `BetaManagedAgentsEffortMedium object`239240        Medium effort. Balances latency and reasoning depth.241242        - `type: "medium"`243244      - `BetaManagedAgentsEffortHigh object`245246        High effort. Favors reasoning depth.247248        - `type: "high"`249250      - `BetaManagedAgentsEffortXhigh object`251252        Extra-high effort. Not all models accept this level.253254        - `type: "xhigh"`255256      - `BetaManagedAgentsEffortMax object`257258        Maximum effort. Favors reasoning depth over latency.259260        - `type: "max"`261262    - `inference_geo: optional string`263264      Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.265266    - `speed: optional "standard" or "fast"`267268      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.269270      - `"standard"`271272      - `"fast"`273274  - `multiagent: BetaManagedAgentsMultiagent or null`275276    Resolved coordinator topology with a concrete agent roster.277278    - `type: "coordinator"`279280    - `agents: array of BetaManagedAgentsAgentReference or BetaManagedAgentsAdvisor`281282      Agents the coordinator may spawn as session threads, each resolved to a specific version.283284      - `BetaManagedAgentsAgentReference object`285286        A resolved agent reference with a concrete version.287288        - `type: "agent"`289290        - `id: string`291292        - `version: number`293294          format: int32295296      - `BetaManagedAgentsAdvisor object`297298        Platform advisor roster entry: a model the session's primary thread may consult mid-turn.299300        - `type: "advisor"`301302        - `model: string`303304          The advisor model id.305306  - `name: string`307308  - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`309310    - `BetaManagedAgentsAnthropicSkill object`311312      A resolved Anthropic-managed skill.313314      - `type: "anthropic"`315316      - `skill_id: string`317318      - `version: string`319320    - `BetaManagedAgentsCustomSkill object`321322      A resolved user-created custom skill.323324      - `type: "custom"`325326      - `skill_id: string`327328      - `version: string`329330  - `system: string or null`331332  - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`333334    - `BetaManagedAgentsAgentToolset20260401 object`335336      - `type: "agent_toolset_20260401"`337338      - `configs: array of BetaManagedAgentsAgentToolConfig`339340        - `BetaManagedAgentsBashToolConfig object`341342          Configuration for the bash tool.343344          - `type: "bash"`345346          - `enabled: boolean`347348          - `name: "bash"`349350          - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`351352            Permission policy for tool execution.353354            - `BetaManagedAgentsAlwaysAllowPolicy object`355356              Tool calls are automatically approved without user confirmation.357358              - `type: "always_allow"`359360            - `BetaManagedAgentsAlwaysAskPolicy object`361362              Tool calls require user confirmation before execution.363364              - `type: "always_ask"`365366            - `BetaManagedAgentsAutoPolicy object`367368              The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.369370              - `type: "auto"`371372        - `BetaManagedAgentsEditToolConfig object`373374          Configuration for the edit tool.375376          - `type: "edit"`377378          - `enabled: boolean`379380          - `name: "edit"`381382          - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`383384            Permission policy for tool execution.385386            - `BetaManagedAgentsAlwaysAllowPolicy object`387388              Tool calls are automatically approved without user confirmation.389390            - `BetaManagedAgentsAlwaysAskPolicy object`391392              Tool calls require user confirmation before execution.393394            - `BetaManagedAgentsAutoPolicy object`395396              The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.397398        - `BetaManagedAgentsReadToolConfig object`399400          Configuration for the read tool.401402          - `type: "read"`403404          - `enabled: boolean`405406          - `name: "read"`407408          - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`409410            Permission policy for tool execution.411412            - `BetaManagedAgentsAlwaysAllowPolicy object`413414              Tool calls are automatically approved without user confirmation.415416            - `BetaManagedAgentsAlwaysAskPolicy object`417418              Tool calls require user confirmation before execution.419420            - `BetaManagedAgentsAutoPolicy object`421422              The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.423424        - `BetaManagedAgentsWriteToolConfig object`425426          Configuration for the write tool.427428          - `type: "write"`429430          - `enabled: boolean`431432          - `name: "write"`433434          - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`435436            Permission policy for tool execution.437438            - `BetaManagedAgentsAlwaysAllowPolicy object`439440              Tool calls are automatically approved without user confirmation.441442            - `BetaManagedAgentsAlwaysAskPolicy object`443444              Tool calls require user confirmation before execution.445446            - `BetaManagedAgentsAutoPolicy object`447448              The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.449450        - `BetaManagedAgentsGlobToolConfig object`451452          Configuration for the glob tool.453454          - `type: "glob"`455456          - `enabled: boolean`457458          - `name: "glob"`459460          - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`461462            Permission policy for tool execution.463464            - `BetaManagedAgentsAlwaysAllowPolicy object`465466              Tool calls are automatically approved without user confirmation.467468            - `BetaManagedAgentsAlwaysAskPolicy object`469470              Tool calls require user confirmation before execution.471472            - `BetaManagedAgentsAutoPolicy object`473474              The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.475476        - `BetaManagedAgentsGrepToolConfig object`477478          Configuration for the grep tool.479480          - `type: "grep"`481482          - `enabled: boolean`483484          - `name: "grep"`485486          - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`487488            Permission policy for tool execution.489490            - `BetaManagedAgentsAlwaysAllowPolicy object`491492              Tool calls are automatically approved without user confirmation.493494            - `BetaManagedAgentsAlwaysAskPolicy object`495496              Tool calls require user confirmation before execution.497498            - `BetaManagedAgentsAutoPolicy object`499500              The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.501502        - `BetaManagedAgentsWebFetchToolConfig object`503504          Configuration for the web_fetch tool.505506          - `type: "web_fetch"`507508          - `enabled: boolean`509510          - `name: "web_fetch"`511512          - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`513514            Permission policy for tool execution.515516            - `BetaManagedAgentsAlwaysAllowPolicy object`517518              Tool calls are automatically approved without user confirmation.519520            - `BetaManagedAgentsAlwaysAskPolicy object`521522              Tool calls require user confirmation before execution.523524            - `BetaManagedAgentsAutoPolicy object`525526              The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.527528          - `allowed_domains: optional array of string`529530          - `blocked_domains: optional array of string`531532          - `max_content_tokens: optional number or null`533534            format: int32535536        - `BetaManagedAgentsWebSearchToolConfig object`537538          Configuration for the web_search tool.539540          - `type: "web_search"`541542          - `enabled: boolean`543544          - `name: "web_search"`545546          - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`547548            Permission policy for tool execution.549550            - `BetaManagedAgentsAlwaysAllowPolicy object`551552              Tool calls are automatically approved without user confirmation.553554            - `BetaManagedAgentsAlwaysAskPolicy object`555556              Tool calls require user confirmation before execution.557558            - `BetaManagedAgentsAutoPolicy object`559560              The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.561562          - `allowed_domains: optional array of string`563564          - `blocked_domains: optional array of string`565566          - `user_location: optional BetaManagedAgentsUserLocation or null`567568            Approximate user location for search result localization.569570            - `type: "approximate"`571572              Location precision. Only "approximate" is supported.573574            - `city: optional string or null`575576              City name.577578              minLength: 1, maxLength: 255579580            - `country: optional string or null`581582              Two-letter ISO 3166-1 country code, uppercase.583584            - `region: optional string or null`585586              Region or state name.587588              minLength: 1, maxLength: 255589590            - `timezone: optional string or null`591592              IANA timezone identifier, e.g. "America/Los_Angeles".593594              minLength: 1, maxLength: 255595596      - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`597598        Resolved default configuration for agent tools.599600        - `enabled: boolean`601602        - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`603604          Permission policy for tool execution.605606          - `BetaManagedAgentsAlwaysAllowPolicy object`607608            Tool calls are automatically approved without user confirmation.609610          - `BetaManagedAgentsAlwaysAskPolicy object`611612            Tool calls require user confirmation before execution.613614          - `BetaManagedAgentsAutoPolicy object`615616            The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.617618    - `BetaManagedAgentsMCPToolset object`619620      - `type: "mcp_toolset"`621622      - `configs: array of BetaManagedAgentsMCPToolConfig`623624        - `enabled: boolean`625626        - `name: string`627628        - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`629630          Permission policy for tool execution.631632          - `BetaManagedAgentsAlwaysAllowPolicy object`633634            Tool calls are automatically approved without user confirmation.635636          - `BetaManagedAgentsAlwaysAskPolicy object`637638            Tool calls require user confirmation before execution.639640          - `BetaManagedAgentsAutoPolicy object`641642            The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.643644      - `default_config: BetaManagedAgentsMCPToolsetDefaultConfig`645646        Resolved default configuration for all tools from an MCP server.647648        - `enabled: boolean`649650        - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`651652          Permission policy for tool execution.653654          - `BetaManagedAgentsAlwaysAllowPolicy object`655656            Tool calls are automatically approved without user confirmation.657658          - `BetaManagedAgentsAlwaysAskPolicy object`659660            Tool calls require user confirmation before execution.661662          - `BetaManagedAgentsAutoPolicy object`663664            The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.665666      - `mcp_server_name: string`667668    - `BetaManagedAgentsCustomTool object`669670      A custom tool as returned in API responses.671672      - `type: "custom"`673674      - `description: string`675676      - `input_schema: BetaManagedAgentsCustomToolInputSchema`677678        JSON Schema for custom tool input parameters.679680        - `type: "object"`681682        - `properties: optional map[unknown] or null`683684        - `required: optional array of string or null`685686      - `name: string`687688  - `updated_at: string`689690    A timestamp in RFC 3339 format691692    format: date-time693694  - `version: number`695696    The agent's current version. Starts at 1 and increments when the agent is modified.697698    format: int32699700## Example701702```bash703curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \704    -X POST \705    -H 'anthropic-version: 2023-06-01' \706    -H 'anthropic-beta: managed-agents-2026-04-01' \707    -H "X-Api-Key: $ANTHROPIC_API_KEY"708```709710### Response (200)711712```json713{714  "id": "agent_011CZkYpogX7uDKUyvBTophP",715  "archived_at": null,716  "created_at": "2026-03-15T10:00:00Z",717  "description": "A general-purpose starter agent.",718  "mcp_servers": [719    {720      "name": "example-mcp",721      "type": "url",722      "url": "https://example-server.modelcontextprotocol.io/sse"723    }724  ],725  "metadata": {726    "foo": "bar"727  },728  "model": {729    "id": "claude-opus-5",730    "effort": {731      "type": "low"732    },733    "inference_geo": "inference_geo",734    "speed": "standard"735  },736  "multiagent": {737    "agents": [738      {739        "id": "agent_011CZkYqphY8vELVzwCUpqiQ",740        "type": "agent",741        "version": 1742      }743    ],744    "type": "coordinator"745  },746  "name": "My First Agent",747  "skills": [748    {749      "skill_id": "xlsx",750      "type": "anthropic",751      "version": "1"752    },753    {754      "skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx",755      "type": "custom",756      "version": "2"757    }758  ],759  "system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.",760  "tools": [761    {762      "configs": [763        {764          "enabled": true,765          "name": "bash",766          "permission_policy": {767            "type": "always_allow"768          },769          "type": "bash"770        }771      ],772      "default_config": {773        "enabled": true,774        "permission_policy": {775          "type": "always_ask"776        }777      },778      "type": "agent_toolset_20260401"779    }780  ],781  "type": "agent",782  "updated_at": "2026-03-15T10:00:00Z",783  "version": 1784}785```786
Files main
Menu

Theme