Claude Platform Docs

Memorias

Crear una memoria
$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
Requires anthropic-beta: agent-memory-2026-07-22 or anthropic-beta: managed-agents-2026-04-01. How to send beta headers
Listar memorias
$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
Requires anthropic-beta: agent-memory-2026-07-22 or anthropic-beta: managed-agents-2026-04-01. How to send beta headers
Recuperar una memoria
$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}
Requires anthropic-beta: agent-memory-2026-07-22 or anthropic-beta: managed-agents-2026-04-01. How to send beta headers
Actualizar una memoria
$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}
Requires anthropic-beta: agent-memory-2026-07-22 or anthropic-beta: managed-agents-2026-04-01. How to send beta headers
Eliminar una memoria
$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}
Requires anthropic-beta: agent-memory-2026-07-22 or anthropic-beta: managed-agents-2026-04-01. How to send beta headers
Models
class ManagedAgentsConflictError { $type = 'conflict_error'; $message; }
"conflict_error" type
?string message
class ManagedAgentsContentSha256Precondition { $type = 'content_sha256'; $contentSha256; }
"content_sha256" type
?string contentSha256

Expected content_sha256 of the stored memory (64 lowercase hexadecimal characters). Typically the content_sha256 returned by a prior read or list call. Because the server applies no content normalization, clients can also compute this locally as the SHA-256 of the UTF-8 content bytes.

class ManagedAgentsDeletedMemory { $type = 'memory_deleted'; $id; }
"memory_deleted" type
string id

ID of the deleted memory (a mem_... value).

One of the following:
class ManagedAgentsMemory { $type = 'memory'; $id; $contentSha256; /* 7 more */ }
"memory" type
string id

The unique ID of the memory (mem_...). It stays the same when the memory's path changes.

To retrieve, update, or delete the memory, pass this ID.

string contentSha256

Lowercase hex SHA-256 digest of the UTF-8 content bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a content_sha256 precondition on update. Always populated, regardless of view.

int contentSizeBytes

The size of the memory's content in UTF-8 bytes. It is set regardless of view.

\Datetime createdAt

When this memory was created, in RFC 3339 format.

string memoryStoreID

ID of the memory store this memory belongs to (a memstore_... value).

string memoryVersionID

The ID of the memory version that holds the memory's current content (memver_...).

Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.

See the memory guide to learn more about memory versions.

string path

Hierarchical path of the memory within the store, e.g. /projects/foo/notes.md. Always starts with /. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.

\Datetime updatedAt

When the memory was last changed, in RFC 3339.

To find out who made the change, look at created_by on the memory version that memory_version_id references.

?string content

The memory's UTF-8 text content, or null when the response uses view=basic.

The maximum size is 100 kB (102,400 bytes).

One of the following:
class ManagedAgentsMemoryPathConflictError { $type = 'memory_path_conflict_error'; $conflictingMemoryID; $conflictingPath; $message; }
"memory_path_conflict_error" type
?string conflictingMemoryID

The ID of the memory that blocked the write (mem_...), or an empty string if that memory can't be identified.

Retry the request when it is empty.

?string conflictingPath

The path that blocked the write: the requested path, or the path of a memory that is an ancestor or descendant of it.

?string message

A human-readable explanation of the conflict. To handle the error in code, use conflicting_path and conflicting_memory_id instead.

class ManagedAgentsMemoryPreconditionFailedError { $type = 'memory_precondition_failed_error'; $message; }
"memory_precondition_failed_error" type
?string message

A human-readable explanation of why the precondition failed.

class ManagedAgentsMemoryPrefix { $type = 'memory_prefix'; $path; }
"memory_prefix" type
string path

The rolled-up path prefix, including a trailing / (e.g. /projects/foo/). Pass this value as path_prefix on a subsequent list call to drill into the directory.

One of the following:
"basic"

Return the object with content set to null. The content_size_bytes and content_sha256 fields remain populated, so sync clients can diff without fetching content.

"full"

Return the object with content populated. On list endpoints, view=full caps limit at 20.

class ManagedAgentsPrecondition { $type = 'content_sha256'; $contentSha256; }
"content_sha256" type
?string contentSha256

Expected content_sha256 of the stored memory (64 lowercase hexadecimal characters). Typically the content_sha256 returned by a prior read or list call. Because the server applies no content normalization, clients can also compute this locally as the SHA-256 of the UTF-8 content bytes.