{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/anthropic/main/json-schema/anthropic-beta-managed-agents-memory-version-schema.json", "title": "BetaManagedAgentsMemoryVersion", "description": "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 are not deleted with the memory; each version is retained for at least the version retention period after it was written, unless the store itself 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.", "x-generated": "2026-09-23", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/anthropic-memory-stores-api-openapi.yml#/components/schemas/BetaManagedAgentsMemoryVersion", "type": "object", "additionalProperties": false, "required": [ "type", "id", "memory_store_id", "memory_id", "operation", "created_at" ], "properties": { "type": { "type": "string", "enum": [ "memory_version" ] }, "id": { "description": "Unique identifier for this version (a `memver_...` value).", "type": "string" }, "memory_store_id": { "description": "ID of the memory store this version belongs to (a `memstore_...` value).", "type": "string" }, "memory_id": { "description": "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](/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.", "type": "string" }, "path": { "description": "The memory's path at the time of this write. `null` if and only if `redacted_at` is set.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "operation": { "description": "The kind of mutation this version records: `created`, `modified`, or `deleted`.", "allOf": [ { "$ref": "#/$defs/BetaManagedAgentsMemoryVersionOperation" } ] }, "content": { "description": "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.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "content_size_bytes": { "description": "Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.", "anyOf": [ { "type": "integer", "format": "int32" }, { "type": "null" } ] }, "content_sha256": { "description": "Lowercase hex SHA-256 digest of `content` as of this version (64 characters). `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "description": "Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction.", "allOf": [ { "$ref": "#/$defs/BetaManagedAgentsActor" } ] }, "created_at": { "description": "When this version was written, in RFC 3339 format.", "allOf": [ { "$ref": "#/$defs/BetaTimestamp" } ] }, "redacted_at": { "description": "When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/en/api/beta/memory_stores/memory_versions/redact).", "anyOf": [ { "$ref": "#/$defs/BetaTimestamp" }, { "type": "null" } ] }, "redacted_by": { "description": "Who redacted this version, or `null` if it has not been redacted. In practice always an `api_actor`, `user_actor`, or `service_account_actor` (agents do not have a redact capability).", "allOf": [ { "$ref": "#/$defs/BetaManagedAgentsActor" } ] } }, "$defs": { "BetaManagedAgentsActor": { "description": "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](/en/api/sessions-retrieve).", "type": "object", "oneOf": [ { "$ref": "#/$defs/BetaManagedAgentsSessionActor" }, { "$ref": "#/$defs/BetaManagedAgentsApiActor" }, { "$ref": "#/$defs/BetaManagedAgentsUserActor" }, { "$ref": "#/$defs/BetaManagedAgentsServiceAccountActor" } ] }, "BetaManagedAgentsApiActor": { "description": "Attribution for a write made directly via the public API (outside of any session).", "type": "object", "additionalProperties": false, "required": [ "type", "api_key_id" ], "properties": { "type": { "type": "string", "enum": [ "api_actor" ] }, "api_key_id": { "description": "ID of the API key that performed the write. This identifies the key, not the secret.", "type": "string", "minLength": 1 } } }, "BetaManagedAgentsMemoryVersionOperation": { "type": "string", "description": "The kind of mutation a `memory_version` records. Every non-no-op mutation to a memory appends exactly one version row with one of these values.", "enum": [ "created", "modified", "deleted" ] }, "BetaManagedAgentsServiceAccountActor": { "description": "Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.", "type": "object", "additionalProperties": false, "required": [ "type", "service_account_id" ], "properties": { "type": { "type": "string", "const": "service_account_actor" }, "service_account_id": { "description": "ID of the service account that performed the write (a `svac_...` value).", "type": "string", "minLength": 1 } } }, "BetaManagedAgentsSessionActor": { "description": "Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.", "type": "object", "additionalProperties": false, "required": [ "type", "session_id" ], "properties": { "type": { "type": "string", "enum": [ "session_actor" ] }, "session_id": { "description": "ID of the session that performed the write (a `sesn_...` value). Look up the session via [Retrieve a session](/en/api/sessions-retrieve) for further provenance.", "type": "string", "minLength": 1 } } }, "BetaManagedAgentsUserActor": { "description": "Attribution for a write made by a human user through the Anthropic Console.", "type": "object", "additionalProperties": false, "required": [ "type", "user_id" ], "properties": { "type": { "type": "string", "enum": [ "user_actor" ] }, "user_id": { "description": "ID of the user who performed the write (a `user_...` value).", "type": "string", "minLength": 1 } } }, "BetaTimestamp": { "description": "A timestamp in RFC 3339 format", "type": "string", "format": "date-time" } } }