Skip to main content
POST
/
action
/
query_agent_kb
Look Up Agent Memories
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/query_agent_kb \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "output_variable_name": "recalled_memories",
  "agent_id_override": "<string>",
  "include_citations": true,
  "metadata_filter": "<string>"
}
'
{
  "status": 123,
  "response": {}
}

Authorizations

Authorization
string
header
required

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

Body

application/json
query
string
required

What do you want to recall? Ask about past meetings, notes, or context (supports variable references).

output_variable_name
string
default:recalled_memories
required

Variable name to store the recalled memories, like 'recalled_memories' or 'past_context'.

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

Optionally look up memories from a different agent. Leave empty to use current agent.

include_citations
boolean
default:true

Include citations showing which memories were used to generate the response.

metadata_filter
string

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.

Response

Successful response

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action