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

# Look Up Agent Memories

> Search this agent's memories with AI-powered semantic search to recall past context, notes, and insights with citations.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/query_agent_kb
openapi: 3.0.0
info:
  version: 1.1.0
  title: AI Actions - Get Data
  description: API specifications for 'Get Data' category AI actions.
  license:
    name: MIT
servers:
  - url: https://api-lr.agent.ai/v1
security:
  - bearerAuth: []
paths:
  /action/query_agent_kb:
    post:
      tags:
        - Inputs & Data Retrieval
      summary: Look Up Agent Memories
      description: >-
        Search this agent's memories with AI-powered semantic search to recall
        past context, notes, and insights with citations.
      operationId: queryAgentKb
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  x-ui: textarea
                  description: >-
                    What do you want to recall? Ask about past meetings, notes,
                    or context (supports variable references).
                agent_id_override:
                  type: string
                  description: >-
                    Optionally look up memories from a different agent. Leave
                    empty to use current agent.
                include_citations:
                  type: boolean
                  description: >-
                    Include citations showing which memories were used to
                    generate the response.
                  default: true
                metadata_filter:
                  type: string
                  x-ui: textarea
                  description: >-
                    Filter memories by metadata key-value pairs. JSON format,
                    e.g., {"meeting_title": "Q4 Review", "event_id":
                    "event_123"}. Only memories matching ALL specified metadata
                    will be searched.
                output_variable_name:
                  type: string
                  description: >-
                    Variable name to store the recalled memories, like
                    'recalled_memories' or 'past_context'.
                  default: recalled_memories
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
              required:
                - query
                - output_variable_name
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          description: Unauthorized - invalid or missing bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
components:
  schemas:
    ActionResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: HTTP status code of the action response
        response:
          type: object
          description: Response data from the action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from your account
        ([https://agent.ai/user/integrations#api](https://agent.ai/user/integrations#api))

````