> ## Documentation Index
> Fetch the complete documentation index at: https://docs.labelbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search an agent's current memories

> Lists current memories as a flat, searchable keyset page, with topics from the entire collection. Retired memories are available through detail and history reads.



## OpenAPI

````yaml /managed-agents/openapi.yaml get /managed-agents/v1/agents/{agent_id}/memories
openapi: 3.1.0
info:
  title: Managed Agents API
  version: 0.14.0
  description: >-
    The Recursion Managed Agents REST API. Authenticate with a Recursion API key
    as a bearer token. An organization-scoped key acts in its own organization
    and needs nothing else; a tenant-scoped key must also send
    `x-organization-id` with an organization id or `default`. Field names follow
    each operation's published schema.
servers:
  - url: https://api.recursion.labelbox.com
security:
  - bearerAuth: []
paths:
  /managed-agents/v1/agents/{agent_id}/memories:
    get:
      tags:
        - Memory
      summary: Search an agent's current memories
      description: >-
        Lists current memories as a flat, searchable keyset page, with topics
        from the entire collection. Retired memories are available through
        detail and history reads.
      operationId: managedAgentsListAgentMemories
      parameters:
        - description: Case-insensitive search across memory path, summary, and content.
          in: query
          name: query
          schema:
            description: Case-insensitive search across memory path, summary, and content.
            type: string
        - description: >-
            Top-level collection topic returned in topics; filters an entire
            path segment.
          in: query
          name: topic
          schema:
            description: >-
              Top-level collection topic returned in topics; filters an entire
              path segment.
            type: string
        - description: Sort by most recently updated (default) or alphabetically by path.
          in: query
          name: sort
          schema:
            description: Sort by most recently updated (default) or alphabetically by path.
            enum:
              - updated
              - alphabetical
            type: string
        - description: >-
            Opaque next_cursor from the previous page with the same search
            settings.
          in: query
          name: cursor
          schema:
            description: >-
              Opaque next_cursor from the previous page with the same search
              settings.
            type: string
        - description: Page size from 1 through 100, default 50.
          in: query
          name: limit
          schema:
            default: 50
            description: Page size from 1 through 100, default 50.
            maximum: 100
            minimum: 1
            type: integer
        - description: Agent whose permanent collection is being searched.
          in: path
          name: agent_id
          required: true
          schema:
            description: Agent whose permanent collection is being searched.
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsAgentMemoriesPage'
          description: A searchable page of an agent's current memories.
        '400':
          description: The request was rejected by schema or semantic validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
        '401':
          description: The caller is unauthenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnauthorized'
        '403':
          description: The caller lacks a required permission or capability.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
        '404':
          description: No such resource is reachable for this caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorNotFound'
        '429':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
          description: A rate limit is exhausted. Honor `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorRateLimitExceeded'
        '500':
          description: An unexpected server-side failure.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorInternalError'
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorInvariantViolation
                discriminator:
                  propertyName: code
                  mapping:
                    internal_error:
                      $ref: '#/components/schemas/ManagedAgentsApiErrorInternalError'
                    invariant_violation:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorInvariantViolation
        '502':
          description: The service returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorBadGateway'
        '503':
          description: >-
            A dependency is unavailable. Consult details.retryable and
            Retry-After when present before retrying.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                discriminator:
                  propertyName: code
                  mapping:
                    managed_agents_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                    service_unavailable:
                      $ref: >-
                        #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
        '504':
          description: The service did not respond before the timeout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorGatewayTimeout'
components:
  schemas:
    ManagedAgentsAgentMemoriesPage:
      description: A searchable page of an agent's current memories.
      properties:
        memories:
          description: Current memories matching the query, without full content.
          items:
            $ref: '#/components/schemas/ManagedAgentsMemory'
          type: array
        next_cursor:
          description: Opaque cursor for the next page; absent on the final page.
          type: string
        topics:
          description: >-
            Topics from the entire current collection, independent of search and
            pagination.
          items:
            type: string
          type: array
      required:
        - memories
        - topics
      type: object
      example:
        memories:
          - byte_size: 1
            content: example
            content_sha256: example
            created_at: '2026-02-18T09:30:00.000Z'
            deleted_at: '2026-02-18T09:30:00.000Z'
            head_version_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            memory_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            memory_store_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            organization_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            path: example
            reflection_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            status: active
            summary: example
            superseded_by_memory_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
            updated_at: '2026-02-18T09:30:00.000Z'
        next_cursor: example
        topics:
          - example
    ManagedAgentsApiErrorInvalidRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invalid_request
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unauthorized
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorForbidden:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - forbidden
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorNotFound:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - not_found
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorRateLimitExceeded:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - rate_limit_exceeded
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorInternalError:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - internal_error
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorInvariantViolation:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invariant_violation
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorBadGateway:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - bad_gateway
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorManagedAgentsUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - managed_agents_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorServiceUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - service_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorGatewayTimeout:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - gateway_timeout
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsMemory:
      description: >-
        One path-addressed document in a memory store. The path hierarchy is the
        routing structure an agent browses, so it carries the meaning a
        per-memory prompt description otherwise would.
      properties:
        byte_size:
          description: Size of the content in bytes.
          format: int64
          type: integer
        content:
          description: >-
            Full text of the memory. Returned when reading one memory, omitted
            from listings.
          type: string
        content_sha256:
          description: >-
            SHA-256 of the content. Pass it back as an update precondition to
            avoid clobbering a concurrent write.
          type: string
        created_at:
          description: Server-assigned RFC 3339 timestamp of when the memory was created.
          format: date-time
          type: string
        deleted_at:
          description: Set when the memory was deleted. A deleted path may be recreated.
          format: date-time
          type: string
        head_version_id:
          description: Version id of the current content.
          type: string
        memory_id:
          description: Server-assigned id of the memory.
          type: string
        memory_store_id:
          description: Store this memory belongs to.
          type: string
        organization_id:
          description: >-
            Organization that owns this record. Resolved from the API key; never
            accepted from the caller.
          type: string
        path:
          description: >-
            Address of the memory within its store, e.g.
            /conventions/testing.md. The path hierarchy is the routing structure
            an agent browses, so it carries the meaning a per-memory prompt
            description otherwise would.
          type: string
        reflection_id:
          description: >-
            Reflection run that wrote this memory. Empty for a memory a human
            seeded.
          type: string
        status:
          description: >-
            active memories are offered to sessions; retired and superseded
            memories are kept for history, so later learning runs can see what
            was already tried.
          enum:
            - active
            - retired
            - superseded
          type: string
        summary:
          description: >-
            One-line description, shown in search results and the console. Not
            disclosed in the system prompt.
          type: string
        superseded_by_memory_id:
          description: Memory that replaced this one, when a learning run superseded it.
          type: string
        updated_at:
          description: Server-assigned RFC 3339 timestamp of the most recent change.
          format: date-time
          type: string
      required:
        - organization_id
        - memory_store_id
        - memory_id
        - path
        - byte_size
        - status
        - created_at
        - updated_at
      type: object
      example:
        byte_size: 1
        content: example
        content_sha256: example
        created_at: '2026-02-18T09:30:00.000Z'
        deleted_at: '2026-02-18T09:30:00.000Z'
        head_version_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        memory_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        memory_store_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        organization_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        path: example
        reflection_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        status: active
        summary: example
        superseded_by_memory_id: 9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d
        updated_at: '2026-02-18T09:30:00.000Z'
    ManagedAgentsApiErrorDetails:
      type: object
      properties:
        field:
          description: >-
            Request field or header responsible for the error, when one can be
            identified.
          type: string
        issues:
          description: >-
            Boundary-validation failures as path-prefixed human-readable
            messages.
          type: array
          items:
            type: string
        requestId:
          description: Request correlation identifier for support and log lookup.
          type: string
        retryable:
          description: >-
            Server advice about failure transience. `true` means transient,
            `false` means non-transient, and absence gives no advice. Automatic
            replay is allowed only when this field is not `false` and the
            operation-specific retry and idempotency contract permits replay.
          type: boolean
      additionalProperties: {}
      description: >-
        Optional structured error details. Reserved transport fields are typed;
        code-specific fields remain forward compatible.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````