跳转到内容
EN

归档智能体

先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。

POST/anthropic/v1/agents/{agent_id}/archive● 支持

Claude 官方文档 ↗

请求参数

  • agent_idstring必填

    path: 按智能体 ID 过滤结果。

返回

200

归档后保留查询与历史版本,不能继续更新。请只归档自己的测试智能体。

错误按 Claude Managed Agents 格式返回,参见 错误码

请求示例

curl
# 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
curl -X POST https://api.deepraxis.com/anthropic/v1/agents/agent_123/archive \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: managed-agents-2026-04-01"
Python
# 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.deepraxis.com/anthropic",
    api_key="$PRAXIS_API_KEY",
)

result = client.beta.agents.archive("agent_123")
print(result)
TypeScript
// 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.deepraxis.com/anthropic",
  apiKey: "$PRAXIS_API_KEY",
});

const result = await client.beta.agents.archive("agent_123");
console.log(result);

响应示例 200

{
  "id": "agent_57d15145-7ef6-4bd3-8b33-2b8ddca88ac0",
  "type": "agent",
  "name": "文档助手(已更新)",
  "description": null,
  "system": "用一句话简短回答。",
  "model": {
    "id": "deepseek-flash"
  },
  "metadata": {},
  "tools": [],
  "mcp_servers": [],
  "skills": [],
  "multiagent": null,
  "version": 2,
  "created_at": "2026-09-26T07:16:03.655Z",
  "updated_at": "2026-09-26T07:16:06.139Z",
  "archived_at": "2026-09-26T07:16:59.528Z"
}

响应

HTTP 200

Successful response

application/json

名称 类型 说明
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[].type string
mcp_servers[].name string
mcp_servers[].url string
metadata object
model object Model identifier and configuration.
model.id string A model id from the Praxis model catalog (praxis.model.models.list). Unlike Anthropic, Claude model ids other than those in the catalog are rejected.
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> | array | null
tools[].default_config object | object | null Resolved default configuration for agent tools.
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.