跳转到内容
EN

读取一次巩固的进展

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

GET/agent/v1/agents/{agent_id}/consolidations/{consolidation_id}● 支持

请求参数

  • agent_idstring必填

    path: Agent id from agents.create or agents.list, the eight character identity number or the handle; the agent must belong to your organization. Also accepts an 8-character identity number (0–9, A–Z); malformed, absent and foreign references return 404, and response ids always use agent_….

  • consolidation_idstring必填

    path: Consolidation id (cns_...) returned by agents.consolidations.create for this agent.

返回

200

状态为 queued、running、done、failed;done 时带 engram_id。

错误按 Anthropic 错误格式返回(type / message / request_id),参见 错误码

请求示例

curl
# 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
curl https://api.deepraxis.com/agent/v1/agents/agent_123/consolidations/cns_123 \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
import requests

opts = dict(
    base_url="https://api.deepraxis.com/agent",
    api_key="$PRAXIS_API_KEY",
)

# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
    f"{opts['base_url']}/v1/agents/agent_123/consolidations/cns_123",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())
TypeScript
// 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
const opts = {
  baseURL: "https://api.deepraxis.com/agent",
  apiKey: "$PRAXIS_API_KEY",
};

// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/agents/agent_123/consolidations/cns_123`, {
  headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());

响应示例 200

{
  "id": "cns_67a1d6d7bd8a669db13efffd4b6da5b2",
  "session_id": "sesn_67a1d6d7bd8a669db13efffd4b6da5b2",
  "status": "queued"
}

响应

HTTP 200

The consolidation’s current status.

application/json

名称 类型 说明
id string Consolidation id (cns_...), the id to pass to agents.consolidations.retrieve; derived from the agent and the idempotency_key (or the body), so a replay returns the same id.
session_id string The imported session (sesn_...) that holds the episode: its events are your messages at the times you gave, it is archived, and it is readable with sessions.events.list.
status string Where the consolidation is: queued, running, done or failed.
engram_id string The engram the pass wrote, present only when status is done and the experience held something worth keeping; recall reads it back.
error string Why the pass failed, present only when status is failed.