openapi: 3.2.0 info: title: Anthropic Memory Stores API servers: - url: https://api.anthropic.com tags: - name: Memory Stores paths: /v1/memory_stores/{memory_store_id}/archive?beta=true: post: operationId: BetaArchiveMemoryStore summary: Archive a memory store parameters: - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsArchiveMemoryStoreResponse' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '409': description: Aborted - The operation was aborted due to concurrency issue content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores /v1/memory_stores/{memory_store_id}/memories/{memory_id}?beta=true: get: operationId: BetaGetMemory summary: Retrieve a memory parameters: - name: x-api-key in: header required: false schema: type: string - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id - name: memory_id in: path required: true schema: type: string description: Path parameter memory_id - name: view in: query required: false schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryView' description: Query parameter for view responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsMemory' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '409': description: Custom error status content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores post: operationId: BetaUpdateMemory summary: Update a memory parameters: - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id - name: memory_id in: path required: true schema: type: string x-stainless-cli-data-alias: id description: Path parameter memory_id - name: view in: query required: false schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryView' description: Query parameter for view requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsUpdateMemoryParams' responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsMemory' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '409': description: Custom error status content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores delete: operationId: BetaDeleteMemory summary: Delete a memory parameters: - name: x-api-key in: header required: false schema: type: string - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id - name: memory_id in: path required: true schema: type: string description: Path parameter memory_id - name: expected_content_sha256 in: query required: false schema: type: string description: Query parameter for expected_content_sha256 responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsDeletedMemory' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '409': description: Custom error status content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores /v1/memory_stores/{memory_store_id}/memories?beta=true: post: operationId: BetaCreateMemory summary: Create a memory parameters: - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id - name: view in: query required: false schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryView' description: Query parameter for view requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsCreateMemoryParams' responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsMemory' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '409': description: Custom error status content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores get: operationId: BetaListMemories summary: List memories parameters: - name: x-api-key in: header required: false schema: type: string - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id - name: path_prefix in: query required: false schema: type: string description: Optional path prefix filter. Must end with `/` (segment-aligned), e.g., `/notes/`. This value appears in request URLs. Do not include secrets or personally identifiable information. x-anthropic-beta-required: - agent-memory-2026-07-22 - name: depth in: query required: false schema: type: integer format: int32 description: '`0` (or omitted) returns all descendants below `path_prefix` (recursive). `1` returns immediate children only; deeper entries roll up as `memory_prefix` items. `depth=1` behaves like `ls`; omitting `depth` behaves like `find`.' x-anthropic-beta-required: - agent-memory-2026-07-22 - name: limit in: query required: false schema: type: integer format: int32 description: Maximum number of items to return per page. Must be between 1 and 100. Defaults to 20 when omitted. Capped at 20 when `view=full`. Both `memory` and `memory_prefix` items count toward the limit. x-anthropic-beta-required: - agent-memory-2026-07-22 - name: page in: query required: false schema: type: string description: Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a previous response to fetch the next page; omit for the first page. x-anthropic-beta-required: - agent-memory-2026-07-22 - name: view in: query required: false schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryView' description: Which projection of each `memory` to return. Defaults to `basic` (content omitted). `full` populates `content` on each item and caps `limit` at 20; use this as the bulk-read path for export and sync. x-anthropic-beta-required: - agent-memory-2026-07-22 responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsListMemoriesResult' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '409': description: Custom error status content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores /v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact?beta=true: post: operationId: BetaRedactMemoryVersion summary: Redact a memory version parameters: - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id - name: memory_version_id in: path required: true schema: type: string description: Path parameter memory_version_id responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryVersion' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '409': description: Custom error status content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores /v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}?beta=true: get: operationId: BetaGetMemoryVersion summary: Retrieve a memory version parameters: - name: x-api-key in: header required: false schema: type: string - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id - name: memory_version_id in: path required: true schema: type: string description: Path parameter memory_version_id - name: view in: query required: false schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryView' description: Query parameter for view responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryVersion' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '409': description: Custom error status content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores /v1/memory_stores/{memory_store_id}/memory_versions?beta=true: get: operationId: BetaListMemoryVersions summary: List memory versions parameters: - name: x-api-key in: header required: false schema: type: string - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id - name: memory_id in: query required: false schema: type: string description: Query parameter for memory_id - name: session_id in: query required: false schema: type: string description: Query parameter for session_id - name: api_key_id in: query required: false schema: type: string description: Query parameter for api_key_id - name: service_account_id in: query required: false schema: type: string description: Query parameter for service_account_id - name: operation in: query required: false schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryVersionOperation' description: Query parameter for operation - name: created_at[gte] in: query required: false schema: $ref: '#/components/schemas/BetaTimestamp' description: Return versions created at or after this time (inclusive). - name: created_at[lte] in: query required: false schema: $ref: '#/components/schemas/BetaTimestamp' description: Return versions created at or before this time (inclusive). - name: limit in: query required: false schema: type: integer format: int32 description: Query parameter for limit - name: page in: query required: false schema: type: string description: Query parameter for page - name: view in: query required: false schema: $ref: '#/components/schemas/BetaManagedAgentsMemoryView' description: Query parameter for view responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsListMemoryVersionsResult' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '409': description: Custom error status content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores /v1/memory_stores/{memory_store_id}?beta=true: get: operationId: BetaGetMemoryStore summary: Retrieve a memory store parameters: - name: x-api-key in: header required: false schema: type: string - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsGetMemoryStoreResponse' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '409': description: Aborted - The operation was aborted due to concurrency issue content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores post: operationId: BetaUpdateMemoryStore summary: Update a memory store parameters: - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string x-stainless-cli-data-alias: id description: Path parameter memory_store_id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsUpdateMemoryStoreRequestBody' responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsUpdateMemoryStoreResponse' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '409': description: Aborted - The operation was aborted due to concurrency issue content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores delete: operationId: BetaDeleteMemoryStore summary: Delete a memory store parameters: - name: x-api-key in: header required: false schema: type: string - name: anthropic-version in: header required: false schema: type: string - name: anthropic-beta in: header required: false schema: type: string items: type: string x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' - name: memory_store_id in: path required: true schema: type: string description: Path parameter memory_store_id responses: '200': description: Successful response (OK) content: application/json: schema: $ref: '#/components/schemas/BetaManagedAgentsDeleteMemoryStoreResponse' '400': description: Invalid argument - The client specified an invalid argument content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '401': description: Unauthenticated - The request does not have valid authentication credentials content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '403': description: Permission denied - The caller does not have permission to execute the specified operation content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '404': description: Not found - Some requested entity was not found content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '408': description: Deadline exceeded - The deadline expired before the operation could complete content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '409': description: Aborted - The operation was aborted due to concurrency issue content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '412': description: Failed precondition - Operation was rejected because the system is not in required state content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '413': description: Out of range - Operation was attempted past the valid range content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '429': description: Resource exhausted - Some resource has been exhausted (rate limiting) content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '431': description: Request header fields too large - Request metadata was too large content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '499': description: Cancelled - The operation was cancelled by the client content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '500': description: Internal - Internal server error content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '501': description: Unimplemented - The operation is not implemented or supported content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '503': description: Unavailable - The service is currently unavailable content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' '504': description: Deadline exceeded - Upstream service did not respond in time content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' x-anthropic-beta-required: - agent-memory-2026-07-22 - managed-agents-2026-04-01 tags: - Memory Stores components: schemas: BetaGatewayTimeoutError: properties: message: default: Request timeout title: Message type: string type: const: timeout_error default: timeout_error title: Type type: string required: - message - type title: GatewayTimeoutError type: object BetaTimestamp: description: A timestamp in RFC 3339 format type: string format: date-time BetaOverloadedError: properties: message: default: Overloaded title: Message type: string type: const: overloaded_error default: overloaded_error title: Type type: string required: - message - type title: OverloadedError type: object BetaBillingError: properties: message: default: Billing error title: Message type: string type: const: billing_error default: billing_error title: Type type: string required: - message - type title: BillingError type: object BetaManagedAgentsMemoryPathConflictError: type: object additionalProperties: false required: - type properties: type: type: string enum: - memory_path_conflict_error message: type: string conflicting_path: type: string conflicting_memory_id: type: string BetaManagedAgentsListMemoriesResult: description: Response payload for [List memories](/en/api/beta/memory_stores/memories/list). type: object additionalProperties: false properties: data: description: One page of results. Each item is either a `memory` object or, when `depth` was set, a `memory_prefix` rollup marker. Items are returned in a stable, server-defined order. type: array items: $ref: '#/components/schemas/BetaManagedAgentsMemoryListItem' next_page: description: Opaque cursor for the next page (a `page_...` value), or `null` if there are no more results. Pass as `page` on the next request. anyOf: - type: string - type: 'null' BetaManagedAgentsError: discriminator: propertyName: type mapping: invalid_request_error: '#/components/schemas/BetaInvalidRequestError' authentication_error: '#/components/schemas/BetaAuthenticationError' billing_error: '#/components/schemas/BetaBillingError' permission_error: '#/components/schemas/BetaPermissionError' not_found_error: '#/components/schemas/BetaNotFoundError' rate_limit_error: '#/components/schemas/BetaRateLimitError' timeout_error: '#/components/schemas/BetaGatewayTimeoutError' api_error: '#/components/schemas/BetaAPIError' overloaded_error: '#/components/schemas/BetaOverloadedError' memory_precondition_failed_error: '#/components/schemas/BetaManagedAgentsMemoryPreconditionFailedError' memory_path_conflict_error: '#/components/schemas/BetaManagedAgentsMemoryPathConflictError' conflict_error: '#/components/schemas/BetaManagedAgentsConflictError' oneOf: - $ref: '#/components/schemas/BetaInvalidRequestError' - $ref: '#/components/schemas/BetaAuthenticationError' - $ref: '#/components/schemas/BetaBillingError' - $ref: '#/components/schemas/BetaPermissionError' - $ref: '#/components/schemas/BetaNotFoundError' - $ref: '#/components/schemas/BetaRateLimitError' - $ref: '#/components/schemas/BetaGatewayTimeoutError' - $ref: '#/components/schemas/BetaAPIError' - $ref: '#/components/schemas/BetaOverloadedError' - $ref: '#/components/schemas/BetaManagedAgentsMemoryPreconditionFailedError' - $ref: '#/components/schemas/BetaManagedAgentsMemoryPathConflictError' - $ref: '#/components/schemas/BetaManagedAgentsConflictError' BetaManagedAgentsMemoryStore: description: 'A `memory_store`: a named container for agent memories, scoped to a workspace. Attach a store to a session via `resources[]` to mount it as a directory the agent can read and write.' type: object additionalProperties: false required: - type - id - name - created_at - updated_at properties: type: type: string enum: - memory_store id: description: Unique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls. type: string name: description: Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name. type: string description: description: Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset. type: string created_at: description: Timestamp when the store was created. allOf: - $ref: '#/components/schemas/BetaTimestamp' updated_at: description: Timestamp when the store's `name`, `description`, or `metadata` was last modified. Memory writes inside the store do not advance this. allOf: - $ref: '#/components/schemas/BetaTimestamp' metadata: description: Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable. type: object additionalProperties: type: string archived_at: description: Timestamp when the store was archived, or `null` if active. Set once and never cleared; archiving is one-way. Archived stores are read-only and cannot be attached to new sessions. anyOf: - $ref: '#/components/schemas/BetaTimestamp' - type: 'null' BetaManagedAgentsUpdateMemoryStoreResponse: description: Response from updating a `memory_store`. Returns the store with the changes applied. type: object discriminator: propertyName: type mapping: memory_store: '#/components/schemas/BetaManagedAgentsMemoryStore' oneOf: - $ref: '#/components/schemas/BetaManagedAgentsMemoryStore' BetaManagedAgentsListMemoryVersionsResult: description: Response payload for [List memory versions](/en/api/beta/memory_stores/memory_versions/list). type: object additionalProperties: false properties: data: description: One page of `memory_version` objects, ordered by `created_at` descending (newest first), with `id` as tiebreak. type: array items: $ref: '#/components/schemas/BetaManagedAgentsMemoryVersion' next_page: description: Opaque cursor for the next page (a `page_...` value), or `null` if there are no more results. Pass as `page` on the next request. anyOf: - type: string - type: 'null' BetaAuthenticationError: properties: message: default: Authentication error title: Message type: string type: const: authentication_error default: authentication_error title: Type type: string required: - message - type title: AuthenticationError type: object BetaManagedAgentsCreateMemoryParams: description: 'Request parameters for [Create a memory](/en/api/beta/memory_stores/memories/create). The path must be unoccupied: if a memory already exists at the path, or the path is an ancestor or descendant of an existing memory''s path, the request returns `memory_path_conflict_error` (HTTP 409). Create never overwrites; to modify an existing memory, use [Update a memory](/en/api/beta/memory_stores/memories/update).' type: object additionalProperties: false required: - path - content properties: path: description: Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`. 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, and must be NFC-normalized. Paths are case-sensitive. type: string minLength: 2 maxLength: 1024 content: description: UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required; pass `""` explicitly to create an empty memory. anyOf: - type: string - type: 'null' BetaNotFoundError: properties: message: default: Not found title: Message type: string type: const: not_found_error default: not_found_error title: Type type: string required: - message - type title: NotFoundError type: object BetaManagedAgentsUpdateMemoryParams: description: 'Request parameters for [Update a memory](/en/api/beta/memory_stores/memories/update). At least one of `content` or `path` must be provided. Renaming onto a path occupied by a different memory returns `memory_path_conflict_error` (HTTP 409). Rename never overwrites; delete or rename the blocking memory first. An update where every supplied field already matches the stored value is a no-op: it returns 200 with the existing memory and writes no new version.' type: object additionalProperties: false properties: content: description: 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). anyOf: - type: string - type: 'null' path: description: 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, and must be NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to leave the path unchanged. anyOf: - type: string minLength: 2 maxLength: 1024 - type: 'null' precondition: description: Optional optimistic-concurrency precondition. When supplied, the update applies only if the memory's current state matches; on mismatch the request returns `memory_precondition_failed_error` (HTTP 409). When omitted, the update is unconditional. allOf: - $ref: '#/components/schemas/BetaManagedAgentsPrecondition' BetaManagedAgentsArchiveMemoryStoreResponse: description: Response from archiving a `memory_store`. Returns the store with `archived_at` set. type: object discriminator: propertyName: type mapping: memory_store: '#/components/schemas/BetaManagedAgentsMemoryStore' oneOf: - $ref: '#/components/schemas/BetaManagedAgentsMemoryStore' 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 BetaManagedAgentsDeletedMemoryStore: description: Confirmation that a `memory_store` was deleted. type: object additionalProperties: false required: - type - id properties: type: type: string enum: - memory_store_deleted id: description: ID of the deleted memory store (a `memstore_...` identifier). The store and all its memories and versions are no longer retrievable. type: string BetaManagedAgentsMemoryListItem: description: 'One item in a [List memories](/en/api/beta/memory_stores/memories/list) response: either a `memory` object or, when `depth` is set, a `memory_prefix` rollup marker.' type: object discriminator: propertyName: type mapping: memory: '#/components/schemas/BetaManagedAgentsMemory' memory_prefix: '#/components/schemas/BetaManagedAgentsMemoryPrefix' oneOf: - $ref: '#/components/schemas/BetaManagedAgentsMemory' - $ref: '#/components/schemas/BetaManagedAgentsMemoryPrefix' BetaManagedAgentsMemoryPreconditionFailedError: type: object additionalProperties: false required: - type properties: type: type: string enum: - memory_precondition_failed_error message: type: string BetaInvalidRequestError: properties: message: default: Invalid request title: Message type: string type: const: invalid_request_error default: invalid_request_error title: Type type: string required: - message - type title: InvalidRequestError type: object BetaManagedAgentsDeletedMemory: description: 'Tombstone returned by [Delete a memory](/en/api/beta/memory_stores/memories/delete). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](/en/api/beta/memory_stores/memory_versions/list) 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).' type: object additionalProperties: false required: - type - id properties: type: type: string enum: - memory_deleted id: description: ID of the deleted memory (a `mem_...` value). type: string BetaPermissionError: properties: message: default: Permission denied title: Message type: string type: const: permission_error default: permission_error title: Type type: string required: - message - type title: PermissionError type: object BetaManagedAgentsConflictError: type: object additionalProperties: false required: - type properties: type: type: string enum: - conflict_error message: type: string BetaManagedAgentsDeleteMemoryStoreResponse: description: Response from deleting a `memory_store`. Confirms the deleted ID. type: object discriminator: propertyName: type mapping: memory_store_deleted: '#/components/schemas/BetaManagedAgentsDeletedMemoryStore' oneOf: - $ref: '#/components/schemas/BetaManagedAgentsDeletedMemoryStore' BetaManagedAgentsMemoryView: type: string description: '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.' enum: - basic - full 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 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.' 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: '#/components/schemas/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: '#/components/schemas/BetaManagedAgentsActor' created_at: description: When this version was written, in RFC 3339 format. allOf: - $ref: '#/components/schemas/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: '#/components/schemas/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: '#/components/schemas/BetaManagedAgentsActor' 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 discriminator: propertyName: type mapping: session_actor: '#/components/schemas/BetaManagedAgentsSessionActor' api_actor: '#/components/schemas/BetaManagedAgentsApiActor' user_actor: '#/components/schemas/BetaManagedAgentsUserActor' service_account_actor: '#/components/schemas/BetaManagedAgentsServiceAccountActor' oneOf: - $ref: '#/components/schemas/BetaManagedAgentsSessionActor' - $ref: '#/components/schemas/BetaManagedAgentsApiActor' - $ref: '#/components/schemas/BetaManagedAgentsUserActor' - $ref: '#/components/schemas/BetaManagedAgentsServiceAccountActor' BetaManagedAgentsPrecondition: description: Optional condition that must hold for an update to apply. When omitted, the update is unconditional. Asserts the current state of the memory being updated. When an update changes `path`, the precondition still refers to the memory's current content, not the destination path. Currently the only supported variant is `content_sha256`. type: object discriminator: propertyName: type mapping: content_sha256: '#/components/schemas/BetaManagedAgentsContentSha256Precondition' oneOf: - $ref: '#/components/schemas/BetaManagedAgentsContentSha256Precondition' BetaAPIError: properties: message: default: Internal server error title: Message type: string type: const: api_error default: api_error title: Type type: string required: - message - type title: APIError type: object BetaManagedAgentsMemoryPrefix: description: A rolled-up directory marker returned by [List memories](/en/api/beta/memory_stores/memories/list) 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. type: object additionalProperties: false required: - type - path properties: type: type: string enum: - memory_prefix path: description: 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: string BetaManagedAgentsGetMemoryStoreResponse: description: Response from retrieving a `memory_store`. Returns the store, including archived stores. type: object discriminator: propertyName: type mapping: memory_store: '#/components/schemas/BetaManagedAgentsMemoryStore' oneOf: - $ref: '#/components/schemas/BetaManagedAgentsMemoryStore' BetaErrorResponse: properties: error: discriminator: mapping: api_error: '#/components/schemas/BetaAPIError' authentication_error: '#/components/schemas/BetaAuthenticationError' billing_error: '#/components/schemas/BetaBillingError' invalid_request_error: '#/components/schemas/BetaInvalidRequestError' not_found_error: '#/components/schemas/BetaNotFoundError' overloaded_error: '#/components/schemas/BetaOverloadedError' permission_error: '#/components/schemas/BetaPermissionError' rate_limit_error: '#/components/schemas/BetaRateLimitError' timeout_error: '#/components/schemas/BetaGatewayTimeoutError' propertyName: type oneOf: - $ref: '#/components/schemas/BetaInvalidRequestError' - $ref: '#/components/schemas/BetaAuthenticationError' - $ref: '#/components/schemas/BetaBillingError' - $ref: '#/components/schemas/BetaPermissionError' - $ref: '#/components/schemas/BetaNotFoundError' - $ref: '#/components/schemas/BetaRateLimitError' - $ref: '#/components/schemas/BetaGatewayTimeoutError' - $ref: '#/components/schemas/BetaAPIError' - $ref: '#/components/schemas/BetaOverloadedError' title: Error request_id: anyOf: - type: string - type: 'null' default: null title: Request Id type: const: error default: error title: Type type: string required: - error - request_id - type title: ErrorResponse type: object 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 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 BetaManagedAgentsMemory: description: '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.' type: object additionalProperties: false required: - type - id - memory_store_id - path - content_size_bytes - content_sha256 - memory_version_id - created_at - updated_at properties: type: type: string enum: - memory id: description: Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory. type: string memory_store_id: description: ID of the memory store this memory belongs to (a `memstore_...` value). type: string path: description: 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. type: string content: description: The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes). anyOf: - type: string - type: 'null' content_size_bytes: description: Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`. type: integer format: int32 content_sha256: description: 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`. type: string memory_version_id: description: 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](/en/api/beta/memory_stores/memory_versions/list). type: string created_at: description: When this memory was created, in RFC 3339 format. allOf: - $ref: '#/components/schemas/BetaTimestamp' updated_at: description: When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/en/api/beta/memory_stores/memory_versions/list). allOf: - $ref: '#/components/schemas/BetaTimestamp' AnthropicBeta: anyOf: - type: string - type: string enum: - message-batches-2024-09-24 - prompt-caching-2024-07-31 - computer-use-2024-10-22 - computer-use-2025-01-24 - pdfs-2024-09-25 - token-counting-2024-11-01 - token-efficient-tools-2025-02-19 - output-128k-2025-02-19 - files-api-2025-04-14 - mcp-client-2025-04-04 - mcp-client-2025-11-20 - dev-full-thinking-2025-05-14 - interleaved-thinking-2025-05-14 - code-execution-2025-05-22 - extended-cache-ttl-2025-04-11 - context-1m-2025-08-07 - context-management-2025-06-27 - model-context-window-exceeded-2025-08-26 - skills-2025-10-02 - fast-mode-2026-02-01 - output-300k-2026-03-24 - user-profiles-2026-03-24 - user-profiles-2026-08-18 - advisor-tool-2026-03-01 - managed-agents-2026-04-01 - cache-diagnosis-2026-04-07 - dreaming-2026-04-21 - thinking-token-count-2026-05-13 - server-side-fallback-2026-06-01 - server-side-fallback-2026-07-01 - fallback-credit-2026-06-01 - fallback-credit-2026-07-01 - agent-memory-2026-07-22 - mid-conversation-tool-changes-2026-07-01 - compact-2026-01-12 - computer-use-2025-11-24 - mcp-tunnels-2026-06-22 - structured-outputs-2025-11-13 - task-budgets-2026-03-13 - thinking-display-updates-2026-08-18 - ce-user-management-2026-07-13 x-stainless-nominal: false BetaManagedAgentsUpdateMemoryStoreRequestBody: type: object additionalProperties: false properties: name: description: New human-readable name for the store. 1–255 characters; no control characters. Renaming changes the slug used for the store's `mount_path` in sessions created after the update. anyOf: - type: string minLength: 1 maxLength: 255 - type: 'null' description: description: New description for the store, up to 1024 characters. Pass an empty string to clear it. anyOf: - type: string maxLength: 1024 - type: 'null' metadata: description: Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars. anyOf: - type: object additionalProperties: anyOf: - type: string - type: 'null' - type: 'null' BetaRateLimitError: properties: message: default: Rate limited title: Message type: string type: const: rate_limit_error default: rate_limit_error title: Type type: string required: - message - type title: RateLimitError type: object BetaManagedAgentsErrorResponse: type: object required: - type - error properties: type: type: string enum: - error description: Always "error" for error responses error: $ref: '#/components/schemas/BetaManagedAgentsError' BetaManagedAgentsContentSha256Precondition: description: '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: object additionalProperties: false required: - type properties: type: type: string enum: - content_sha256 content_sha256: description: 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. type: string 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