Claude Platform Docs

Memories

Memory erstellen
BetaManagedAgentsMemory Beta.MemoryStores.Memories.Create(parameters, cancellationToken = default)
POST/v1/memory_stores/{memory_store_id}/memories
Memories auflisten
MemoryListPage Beta.MemoryStores.Memories.List(parameters, cancellationToken = default)
GET/v1/memory_stores/{memory_store_id}/memories
Memory abrufen
BetaManagedAgentsMemory Beta.MemoryStores.Memories.Retrieve(parameters, cancellationToken = default)
GET/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Memory aktualisieren
BetaManagedAgentsMemory Beta.MemoryStores.Memories.Update(parameters, cancellationToken = default)
POST/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Memory löschen
BetaManagedAgentsDeletedMemory Beta.MemoryStores.Memories.Delete(parameters, cancellationToken = default)
DELETE/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Models
class BetaManagedAgentsConflictError { Type; Message; }
required Type Type
string Message
class BetaManagedAgentsContentSha256Precondition { Type; ContentSha256; }

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.

required Type 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 BetaManagedAgentsDeletedMemory { Type; ID; }

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).

required Type Type
required string ID

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

class BetaManagedAgentsError: union
class BetaManagedAgentsMemory { Type; ID; ContentSha256; /* 7 more */ }

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.

required Type Type
required string ID

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

required 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.

required int ContentSizeBytes

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

formatint32
required DateTimeOffset CreatedAt

A timestamp in RFC 3339 format

formatdate-time
required string MemoryStoreID

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

required string MemoryVersionID

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.

required 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.

required DateTimeOffset UpdatedAt

A timestamp in RFC 3339 format

formatdate-time
string? Content

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

class BetaManagedAgentsMemoryListItem: union

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

class BetaManagedAgentsMemoryPathConflictError { Type; ConflictingMemoryID; ConflictingPath; Message; }
required Type Type
string ConflictingMemoryID
string ConflictingPath
string Message
class BetaManagedAgentsMemoryPreconditionFailedError { Type; Message; }
required Type Type
string Message
class BetaManagedAgentsMemoryPrefix { Type; Path; }

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.

required Type Type
required 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.

enum BetaManagedAgentsMemoryView

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.

Basic("basic")
Full("full")
class BetaManagedAgentsPrecondition { Type; ContentSha256; }

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.

required Type 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.