Claude Platform Docs

Memories

Create a memory
POST/v1/memory_stores/{memory_store_id}/memories
List memories
GET/v1/memory_stores/{memory_store_id}/memories
Retrieve a memory
GET/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Update a memory
POST/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Delete a memory
DELETE/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Models
BetaManagedAgentsConflictError object{ type, message }
type: "conflict_error"
message: optional string
BetaManagedAgentsContentSha256Precondition object{ type, content_sha256 }

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: "content_sha256"
content_sha256: optional string

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.

BetaManagedAgentsDeletedMemory object{ id, type }

Tombstone returned by Delete a memory. The memory's version history persists and remains listable via List memory versions until the store itself is deleted.

id: string

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

type: "memory_deleted"
BetaManagedAgentsError = BetaInvalidRequestError { message, type } or BetaAuthenticationError { message, type } or BetaBillingError { message, type } or 9 more
One of the following:
BetaManagedAgentsMemory object{ id, content_sha256, content_size_bytes, 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.

BetaManagedAgentsMemoryListItem = BetaManagedAgentsMemory { id, content_sha256, content_size_bytes, 7 more } or BetaManagedAgentsMemoryPrefix { path, type }

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:
BetaManagedAgentsMemoryPathConflictError object{ type, conflicting_memory_id, conflicting_path, message }
type: "memory_path_conflict_error"
conflicting_memory_id: optional string
conflicting_path: optional string
message: optional string
BetaManagedAgentsMemoryPreconditionFailedError object{ type, message }
type: "memory_precondition_failed_error"
message: optional string
BetaManagedAgentsMemoryPrefix object{ path, type }

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

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: "memory_prefix"
BetaManagedAgentsMemoryView = "basic" or "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"
BetaManagedAgentsPrecondition object{ type, content_sha256 }

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: "content_sha256"
content_sha256: optional string

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.