Skip to main content
POST
/
action
/
save_to_agent_kb
Save Agent Memory
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/save_to_agent_kb \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text_content": "<string>",
  "output_variable_name": "saved_memory",
  "metadata": "<string>",
  "suggested_keywords": "<string>"
}
'
{
  "status": 123,
  "response": {}
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
text_content
string
required

The text content to save to the agent's memory (supports variable references like {{meeting_notes}}).

output_variable_name
string
default:saved_memory
required

Variable name to store the save result, like 'saved_memory' or 'memory_saved'.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
metadata
string

Optional JSON metadata about this content (e.g., {"source": "meeting_notes", "date": "2025-11-13"}).

suggested_keywords
string

Comma-separated list of keywords to prioritize in indexing (e.g., "enterprise, pricing, annual contract").

Response

Successful response

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action