Claude Platform Docs

Memories

Create a memory
beta.memory_stores.memories.create(strmemory_store_id, MemoryCreateParams**kwargs) -> BetaManagedAgentsMemory
POST/v1/memory_stores/{memory_store_id}/memories
List memories
beta.memory_stores.memories.list(strmemory_store_id, MemoryListParams**kwargs) -> SyncPageCursor[BetaManagedAgentsMemoryListItem]
GET/v1/memory_stores/{memory_store_id}/memories
Retrieve a memory
beta.memory_stores.memories.retrieve(strmemory_id, MemoryRetrieveParams**kwargs) -> BetaManagedAgentsMemory
GET/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Update a memory
beta.memory_stores.memories.update(strmemory_id, MemoryUpdateParams**kwargs) -> BetaManagedAgentsMemory
POST/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Delete a memory
beta.memory_stores.memories.delete(strmemory_id, MemoryDeleteParams**kwargs) -> BetaManagedAgentsDeletedMemory
DELETE/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Models
class BetaManagedAgentsConflictError:
type: Literal["conflict_error"]
message: Optional[str]
class BetaManagedAgentsContentSha256Precondition:

Optimistic-concurrency precondition: the update applies only if the memory's stored content_sha256 equals the supplied value. On mismatch, the request returns memory_precondition_failed_error (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested content and path, the server returns 200 instead of 409.

type: Literal["content_sha256"]
content_sha256: Optional[str]

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 BetaManagedAgentsDeletedMemory:

Tombstone returned by Delete a memory. Deleting a memory does not erase its version history: its versions remain listable via List memory versions while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).

id: str

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

type: Literal["memory_deleted"]
One of the following:
class BetaManagedAgentsMemory:

A memory object: a single text document at a hierarchical path inside a memory store. The content field is populated when view=full and null when view=basic; the content_size_bytes and content_sha256 fields are always populated so sync clients can diff without fetching content. Memories are addressed by their mem_... ID; the path is the create key and can be changed via update.

id: str

Unique identifier for this memory (a mem_... value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.

content_sha256: str

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.

content_size_bytes: int

Size of content in bytes (the UTF-8 plaintext length). Always populated, regardless of view.

formatint32
created_at: datetime

A timestamp in RFC 3339 format

formatdate-time
memory_store_id: str

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

memory_version_id: str

ID of the memory_version representing this memory's current content (a memver_... value). This is the authoritative head pointer; memory_version objects do not carry an is_latest flag, so compare against this field instead. Enumerate the history via List memory versions.

path: str

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.

type: Literal["memory"]
updated_at: datetime

A timestamp in RFC 3339 format

formatdate-time
content: Optional[str]

The memory's UTF-8 text content. Populated when view=full; null when view=basic. Maximum 100 kB (102,400 bytes).

One item in a List memories response: either a memory object or, when depth is set, a memory_prefix rollup marker.

One of the following:
class BetaManagedAgentsMemoryPathConflictError:
type: Literal["memory_path_conflict_error"]
conflicting_memory_id: Optional[str]
conflicting_path: Optional[str]
message: Optional[str]
class BetaManagedAgentsMemoryPreconditionFailedError:
type: Literal["memory_precondition_failed_error"]
message: Optional[str]
class BetaManagedAgentsMemoryPrefix:

A rolled-up directory marker returned by List memories when depth is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page limit and interleaves with memory items in path order.

path: str

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.

type: Literal["memory_prefix"]
Literal["basic", "full"]

Selects which projection of a memory or memory_version the server returns. basic returns the object with content set to null; full populates content. When omitted, the default is endpoint-specific: retrieve operations default to full; list, create, and update operations default to basic. Listing with view=full caps limit at 20.

One of the following:
"basic"
"full"
class BetaManagedAgentsPrecondition:

Optimistic-concurrency precondition: the update applies only if the memory's stored content_sha256 equals the supplied value. On mismatch, the request returns memory_precondition_failed_error (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested content and path, the server returns 200 instead of 409.

type: Literal["content_sha256"]
content_sha256: Optional[str]

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.