Memory Versions
api/beta/memory_stores/memory_versions
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/memory_stores/memory_versions Changed · +123 / -106 lines
### Path parameters ### Query parameters ### Headers #### Response (200) ### Path parameters ### Query parameters ### Headers #### Response (200) ### Path parameters ### Headers #### Response (200) ## Domain types ### Path Parameters ### Query Parameters ### Header Parameters #### Response ### Path Parameters ### Query Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters #### Response ## Domain Types
---- -title: Memory Versions -url: https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions ---- - # Memory Versions ## List memory versions -**get** `/v1/memory_stores/{memory_store_id}/memory_versions` +**GET** `/v1/memory_stores/{memory_store_id}/memory_versions` List memory versions -### Path Parameters +### Path parameters - `memory_store_id: string` -### Query Parameters +### Query parameters - `api_key_id: optional string`
Return versions created at or after this time (inclusive). + format: date-time + - `"created_at[lte]": optional string` Return versions created at or before this time (inclusive). + format: date-time + - `limit: optional number` Query parameter for limit + format: int32 + - `memory_id: optional string` Query parameter for memory_id
- `"full"` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
A timestamp in RFC 3339 format + format: date-time + - `memory_id: string` ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the full lineage including the `deleted` row.
- `type: "memory_version"` - - `"memory_version"` - - `content: optional string or null` The memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.
Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise. + format: int32 + - `created_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). - - `BetaManagedAgentsSessionActor object { session_id, type }` + - `BetaManagedAgentsSessionActor object` Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/sessions-retrieve) for further provenance. + minLength: 1 + - `type: "session_actor"` - - `"session_actor"` + - `BetaManagedAgentsAPIActor object` - - `BetaManagedAgentsAPIActor object { api_key_id, type }` - Attribution for a write made directly via the public API (outside of any session). - `api_key_id: string`
ID of the API key that performed the write. This identifies the key, not the secret. + minLength: 1 + - `type: "api_actor"` - - `"api_actor"` + - `BetaManagedAgentsUserActor object` - - `BetaManagedAgentsUserActor object { type, user_id }` - Attribution for a write made by a human user through the Anthropic Console. - `type: "user_actor"` - - `"user_actor"` - - `user_id: string` ID of the user who performed the write (a `user_...` value). - - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + minLength: 1 + - `BetaManagedAgentsServiceAccountActor object` + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. - `service_account_id: string`
ID of the service account that performed the write (a `svac_...` value). + minLength: 1 + - `type: "service_account_actor"` - - `"service_account_actor"` - - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
A timestamp in RFC 3339 format + format: date-time + - `redacted_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve).
### Example -```http +```bash curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: agent-memory-2026-07-22' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Retrieve a memory version -**get** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}` +**GET** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}` Retrieve a memory version -### Path Parameters +### Path parameters - `memory_store_id: string` - `memory_version_id: string` -### Query Parameters +### Query parameters - `view: optional BetaManagedAgentsMemoryView`
- `"full"` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
### Returns -- `BetaManagedAgentsMemoryVersion object { id, created_at, memory_id, 10 more }` +- `BetaManagedAgentsMemoryVersion object` A `memory_version` object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and persist after the memory is deleted. Retrieving a redacted version returns 200 with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`; branch on `redacted_at`, not HTTP status.
A timestamp in RFC 3339 format + format: date-time + - `memory_id: string` ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the full lineage including the `deleted` row.
- `type: "memory_version"` - - `"memory_version"` - - `content: optional string or null` The memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.
Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise. + format: int32 + - `created_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). - - `BetaManagedAgentsSessionActor object { session_id, type }` + - `BetaManagedAgentsSessionActor object` Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/sessions-retrieve) for further provenance. + minLength: 1 + - `type: "session_actor"` - - `"session_actor"` + - `BetaManagedAgentsAPIActor object` - - `BetaManagedAgentsAPIActor object { api_key_id, type }` - Attribution for a write made directly via the public API (outside of any session). - `api_key_id: string`
ID of the API key that performed the write. This identifies the key, not the secret. + minLength: 1 + - `type: "api_actor"` - - `"api_actor"` + - `BetaManagedAgentsUserActor object` - - `BetaManagedAgentsUserActor object { type, user_id }` - Attribution for a write made by a human user through the Anthropic Console. - `type: "user_actor"` - - `"user_actor"` - - `user_id: string` ID of the user who performed the write (a `user_...` value). - - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + minLength: 1 + - `BetaManagedAgentsServiceAccountActor object` + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. - `service_account_id: string`
ID of the service account that performed the write (a `svac_...` value). + minLength: 1 + - `type: "service_account_actor"` - - `"service_account_actor"` - - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
A timestamp in RFC 3339 format + format: date-time + - `redacted_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve).
### Example -```http +```bash curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions/$MEMORY_VERSION_ID \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: agent-memory-2026-07-22' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Redact a memory version -**post** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact` +**POST** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact` Redact a memory version -### Path Parameters +### Path parameters - `memory_store_id: string` - `memory_version_id: string` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
### Returns -- `BetaManagedAgentsMemoryVersion object { id, created_at, memory_id, 10 more }` +- `BetaManagedAgentsMemoryVersion object` A `memory_version` object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and persist after the memory is deleted. Retrieving a redacted version returns 200 with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`; branch on `redacted_at`, not HTTP status.
A timestamp in RFC 3339 format + format: date-time + - `memory_id: string` ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the full lineage including the `deleted` row.
- `type: "memory_version"` - - `"memory_version"` - - `content: optional string or null` The memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.
Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise. + format: int32 + - `created_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). - - `BetaManagedAgentsSessionActor object { session_id, type }` + - `BetaManagedAgentsSessionActor object` Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/sessions-retrieve) for further provenance. + minLength: 1 + - `type: "session_actor"` - - `"session_actor"` + - `BetaManagedAgentsAPIActor object` - - `BetaManagedAgentsAPIActor object { api_key_id, type }` - Attribution for a write made directly via the public API (outside of any session). - `api_key_id: string`
ID of the API key that performed the write. This identifies the key, not the secret. + minLength: 1 + - `type: "api_actor"` - - `"api_actor"` + - `BetaManagedAgentsUserActor object` - - `BetaManagedAgentsUserActor object { type, user_id }` - Attribution for a write made by a human user through the Anthropic Console. - `type: "user_actor"` - - `"user_actor"` - - `user_id: string` ID of the user who performed the write (a `user_...` value). - - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + minLength: 1 + - `BetaManagedAgentsServiceAccountActor object` + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. - `service_account_id: string`
ID of the service account that performed the write (a `svac_...` value). + minLength: 1 + - `type: "service_account_actor"` - - `"service_account_actor"` - - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
A timestamp in RFC 3339 format + format: date-time + - `redacted_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve).
### Example -```http +```bash curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions/$MEMORY_VERSION_ID/redact \ -X POST \ -H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### Beta Managed Agents Actor
Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). - - `BetaManagedAgentsSessionActor object { session_id, type }` + - `BetaManagedAgentsSessionActor object` Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/sessions-retrieve) for further provenance. + minLength: 1 + - `type: "session_actor"` - - `"session_actor"` + - `BetaManagedAgentsAPIActor object` - - `BetaManagedAgentsAPIActor object { api_key_id, type }` - Attribution for a write made directly via the public API (outside of any session). - `api_key_id: string`
ID of the API key that performed the write. This identifies the key, not the secret. + minLength: 1 + - `type: "api_actor"` - - `"api_actor"` + - `BetaManagedAgentsUserActor object` - - `BetaManagedAgentsUserActor object { type, user_id }` - Attribution for a write made by a human user through the Anthropic Console. - `type: "user_actor"` - - `"user_actor"` - - `user_id: string` ID of the user who performed the write (a `user_...` value). - - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + minLength: 1 + - `BetaManagedAgentsServiceAccountActor object` + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. - `service_account_id: string`
ID of the service account that performed the write (a `svac_...` value). + minLength: 1 + - `type: "service_account_actor"` - - `"service_account_actor"` - ### Beta Managed Agents API Actor -- `BetaManagedAgentsAPIActor object { api_key_id, type }` +- `BetaManagedAgentsAPIActor object` Attribution for a write made directly via the public API (outside of any session).
ID of the API key that performed the write. This identifies the key, not the secret. + minLength: 1 + - `type: "api_actor"` - - `"api_actor"` - ### Beta Managed Agents Memory Version -- `BetaManagedAgentsMemoryVersion object { id, created_at, memory_id, 10 more }` +- `BetaManagedAgentsMemoryVersion object` A `memory_version` object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and persist after the memory is deleted. Retrieving a redacted version returns 200 with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`; branch on `redacted_at`, not HTTP status.
A timestamp in RFC 3339 format + format: date-time + - `memory_id: string` ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the full lineage including the `deleted` row.
- `type: "memory_version"` - - `"memory_version"` - - `content: optional string or null` The memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.
Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise. + format: int32 + - `created_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). - - `BetaManagedAgentsSessionActor object { session_id, type }` + - `BetaManagedAgentsSessionActor object` Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/sessions-retrieve) for further provenance. + minLength: 1 + - `type: "session_actor"` - - `"session_actor"` + - `BetaManagedAgentsAPIActor object` - - `BetaManagedAgentsAPIActor object { api_key_id, type }` - Attribution for a write made directly via the public API (outside of any session). - `api_key_id: string`
ID of the API key that performed the write. This identifies the key, not the secret. + minLength: 1 + - `type: "api_actor"` - - `"api_actor"` + - `BetaManagedAgentsUserActor object` - - `BetaManagedAgentsUserActor object { type, user_id }` - Attribution for a write made by a human user through the Anthropic Console. - `type: "user_actor"` - - `"user_actor"` - - `user_id: string` ID of the user who performed the write (a `user_...` value). - - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + minLength: 1 + - `BetaManagedAgentsServiceAccountActor object` + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. - `service_account_id: string`
ID of the service account that performed the write (a `svac_...` value). + minLength: 1 + - `type: "service_account_actor"` - - `"service_account_actor"` - - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
A timestamp in RFC 3339 format + format: date-time + - `redacted_by: optional BetaManagedAgentsActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve).
### Beta Managed Agents Service Account Actor -- `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` +- `BetaManagedAgentsServiceAccountActor object` Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.
ID of the service account that performed the write (a `svac_...` value). + minLength: 1 + - `type: "service_account_actor"` - - `"service_account_actor"` - ### Beta Managed Agents Session Actor -- `BetaManagedAgentsSessionActor object { session_id, type }` +- `BetaManagedAgentsSessionActor object` Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.
ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/sessions-retrieve) for further provenance. + minLength: 1 + - `type: "session_actor"` - - `"session_actor"` - ### Beta Managed Agents User Actor -- `BetaManagedAgentsUserActor object { type, user_id }` +- `BetaManagedAgentsUserActor object` Attribution for a write made by a human user through the Anthropic Console. - `type: "user_actor"` - - `"user_actor"` - - `user_id: string` ID of the user who performed the write (a `user_...` value). + + minLength: 1