> ## 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.

# Save Agent Memory

> Save notes, context, or insights to this agent's persistent memory for future recall and reference.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/save_to_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/save_to_agent_kb:
    post:
      tags:
        - Inputs & Data Retrieval
      summary: Save Agent Memory
      description: >-
        Save notes, context, or insights to this agent's persistent memory for
        future recall and reference.
      operationId: saveToAgentKb
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text_content:
                  type: string
                  x-ui: textarea
                  description: >-
                    The text content to save to the agent's memory (supports
                    variable references like {{meeting_notes}}).
                metadata:
                  type: string
                  description: >-
                    Optional JSON metadata about this content (e.g., {"source":
                    "meeting_notes", "date": "2025-11-13"}).
                suggested_keywords:
                  type: string
                  description: >-
                    Comma-separated list of keywords to prioritize in indexing
                    (e.g., "enterprise, pricing, annual contract").
                output_variable_name:
                  type: string
                  description: >-
                    Variable name to store the save result, like 'saved_memory'
                    or 'memory_saved'.
                  default: saved_memory
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
              required:
                - text_content
                - 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))

````