Claude Platform Docs

记忆存储

创建记忆存储
$client->beta->memoryStores->create(string name, ?string description, ?array<string,string> metadata, ?list<AnthropicBeta> betas, ?string workspaceID): BetaManagedAgentsMemoryStore
POST/v1/memory_stores
列出记忆存储
$client->beta->memoryStores->list(?\Datetime createdAtGte, ?\Datetime createdAtLte, ?bool includeArchived, ?int limit, ?string page, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<BetaManagedAgentsMemoryStore>
GET/v1/memory_stores
检索记忆存储
$client->beta->memoryStores->retrieve(string memoryStoreID, ?list<AnthropicBeta> betas, ?string workspaceID): BetaManagedAgentsMemoryStore
GET/v1/memory_stores/{memory_store_id}
更新记忆存储
$client->beta->memoryStores->update(string memoryStoreID, ?string description, ?array<string,string> metadata, ?string name, ?list<AnthropicBeta> betas, ?string workspaceID): BetaManagedAgentsMemoryStore
POST/v1/memory_stores/{memory_store_id}
删除记忆存储
$client->beta->memoryStores->delete(string memoryStoreID, ?list<AnthropicBeta> betas, ?string workspaceID): BetaManagedAgentsDeletedMemoryStore
DELETE/v1/memory_stores/{memory_store_id}
归档记忆存储
$client->beta->memoryStores->archive(string memoryStoreID, ?list<AnthropicBeta> betas, ?string workspaceID): BetaManagedAgentsMemoryStore
POST/v1/memory_stores/{memory_store_id}/archive
Models
class BetaManagedAgentsDeletedMemoryStore { $type; $id; }
Type type
string id

ID of the deleted memory store (a memstore_... identifier). The store and all its memories and versions are no longer retrievable.

class BetaManagedAgentsMemoryStore { $type; $id; $createdAt; /* 5 more */ }
Type type
string id

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.

\Datetime createdAt

A timestamp in RFC 3339 format

string name

Human-readable name for the store. 1–255 characters. The store's mount-path slug under /mnt/memory/ is derived from this name.

\Datetime updatedAt

A timestamp in RFC 3339 format

?\Datetime archivedAt

A timestamp in RFC 3339 format

?string description

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.

?array<string,string> metadata

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.

记忆存储记忆

创建记忆
$client->beta->memoryStores->memories->create(string memoryStoreID, ?string content, string path, ?ManagedAgentsMemoryView view, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsMemory
POST/v1/memory_stores/{memory_store_id}/memories
列出记忆
$client->beta->memoryStores->memories->list(string memoryStoreID, ?int depth, ?int limit, ?string page, ?string pathPrefix, ?ManagedAgentsMemoryView view, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<ManagedAgentsMemoryListItem>
GET/v1/memory_stores/{memory_store_id}/memories
检索记忆
$client->beta->memoryStores->memories->retrieve(string memoryID, string memoryStoreID, ?ManagedAgentsMemoryView view, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsMemory
GET/v1/memory_stores/{memory_store_id}/memories/{memory_id}
更新记忆
$client->beta->memoryStores->memories->update(string memoryID, string memoryStoreID, ?ManagedAgentsMemoryView view, ?string content, ?string path, ?ManagedAgentsPrecondition precondition, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsMemory
POST/v1/memory_stores/{memory_store_id}/memories/{memory_id}
删除记忆
$client->beta->memoryStores->memories->delete(string memoryID, string memoryStoreID, ?string expectedContentSha256, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsDeletedMemory
DELETE/v1/memory_stores/{memory_store_id}/memories/{memory_id}

记忆存储记忆版本

列出记忆版本
$client->beta->memoryStores->memoryVersions->list(string memoryStoreID, ?string apiKeyID, ?\Datetime createdAtGte, ?\Datetime createdAtLte, ?int limit, ?string memoryID, ?ManagedAgentsMemoryVersionOperation operation, ?string page, ?string serviceAccountID, ?string sessionID, ?ManagedAgentsMemoryView view, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<ManagedAgentsMemoryVersion>
GET/v1/memory_stores/{memory_store_id}/memory_versions
检索记忆版本
$client->beta->memoryStores->memoryVersions->retrieve(string memoryVersionID, string memoryStoreID, ?ManagedAgentsMemoryView view, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsMemoryVersion
GET/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}
对记忆版本进行脱敏
$client->beta->memoryStores->memoryVersions->redact(string memoryVersionID, string memoryStoreID, ?list<AnthropicBeta> betas, ?string workspaceID): ManagedAgentsMemoryVersion
POST/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact