跳转到内容
EN

创建记忆库

POST/anthropic/v1/memory_stores○ 未支持

请求体

  • namestring必填

    Human-readable name for the store. Required; 1–255 characters; no control characters. The mount-path slug under /mnt/memory/ is derived from this name (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need not be unique within a workspace.

  • descriptionstring可选

    Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent.

  • metadataobject可选

    Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Not visible to the agent.

返回

501 平台还没有实现这个端点;调用会得到下面这个响应:

平台还没有提供智能体可读写的持久记忆库。调用会返回 501(not_implemented_error),不产生副作用,官方 SDK 不会重试。

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

请求示例

curl
curl -X POST https://api.deepraxis.com/anthropic/v1/memory_stores \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: managed-agents-2026-04-01"
Python
from anthropic import Anthropic

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

# 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
result = client.beta.memory_stores.create({})
print(result)
TypeScript
import Anthropic from "@anthropic-ai/sdk";

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

// 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
const result = await client.beta.memoryStores.create({});
console.log(result);

响应示例 501

{
  "type": "error",
  "error": {
    "type": "not_implemented_error",
    "message": "Not implemented: this Managed Agents operation is not implemented on this platform yet (POST /v1/memory_stores); see the docs for the supported subset."
  },
  "request_id": "d4c95ed3-798c-42ed-81f7-f45584dd6500"
}

响应

HTTP 200

Successful response

application/json

名称 类型 说明
id string Unique identifier for the memory store (a memstore_... tagged ID). Use this when attaching the store to a session, or in the {memory_store_id} path parameter of subsequent calls.
created_at string A timestamp in RFC 3339 format
name string Human-readable name for the store. 1–255 characters. The store's mount-path slug under /mnt/memory/ is derived from this name.
type string
updated_at string A timestamp in RFC 3339 format
archived_at null | string A timestamp in RFC 3339 format
description string Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset.
metadata object Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable.