AnthropicClaude Managed Agents

Update Memory

Update one memory entry in a memory store.

POST /anthropic/v1/memory_stores/{memory_store_id}/memories/{memory_id}○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • memory_idstring必填

    path: Memory ID (path or query parameter).

  • memory_store_idstring必填

    query: Memory store ID (path or query parameter).

  • viewstring可选

    query: Which projection to return: basic omits content, full includes it.

  • contentstring可选

    New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to leave the content unchanged (e.g., for a rename-only update).

  • pathstring可选

    New path for the memory (a rename). Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, or the Unicode line and paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to leave the path unchanged.

  • preconditionobject可选

    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.

    ▸ 展开子字段(2)
    • typestring必填
      取值 content_sha256
    • content_sha256string可选

      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.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
content_sha256stringLowercase 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_bytesnumberSize of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
created_atstringA timestamp in RFC 3339 format
memory_store_idstringID of the memory store this memory belongs to (a `memstore_...` value).
memory_version_idstringID 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.
pathstringHierarchical 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.
typestring
updated_atstringA timestamp in RFC 3339 format
contentnull | stringThe memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).