Skip to main content

Overview

When User Memory is enabled on your agent, it automatically remembers details about each user across conversations. Use these endpoints to list, count, and delete memories programmatically.
User Memory is a per-user feature — each user gets their own private memory store. Enable it in your agent’s Settings → Features & Options → Access to Memory.

List Memories

Retrieve memories stored for a specific user or all users on the bot.
const result = await client.request({
  method: 'GET',
  path: '/bot/memory/readall',
  params: {
    bot_id: 'bot_abc123',
    user_uuid: 'user_uuid_here', // optional
    type: 'semantic',            // optional
    page: 1,                     // optional
    per_page: 50                 // optional
  }
});

console.log(result.memories);

Parameters

ParameterTypeRequiredDescription
bot_idstringYesBot ID
user_uuidstringNoFilter by user UUID
typestringNoFilter by type: semantic, episodic, procedural, or all (default: all)
pagenumberNoPage number (default: 1)
per_pagenumberNoResults per page (default: 50)

Response

{
  "total": 12,
  "memories": [
    {
      "uuid": "mem_abc123",
      "content": "User prefers dark mode and minimal UI",
      "type": "semantic",
      "is_active": true,
      "created_at": "2026-02-10T14:30:00.000Z",
      "user": {
        "uuid": "user_uuid_here",
        "name": "John"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 50,
    "total": 12,
    "total_pages": 1
  }
}

Count Memories

Get the total number of active memories for a specific user.
const result = await client.request({
  method: 'GET',
  path: '/bot/memory/count',
  params: {
    bot_id: 'bot_abc123',
    user_uuid: 'user_uuid_here'
  }
});

console.log(result.count); // 12

Parameters

ParameterTypeRequiredDescription
bot_idstringYesBot ID
user_uuidstringYesUser UUID to count memories for

Response

{
  "count": 12
}

Delete a Memory

Delete a specific memory by its ID.
const result = await client.request({
  method: 'DELETE',
  path: '/bot/memory/mem_abc123',
  params: {
    bot_id: 'bot_abc123'
  }
});

console.log(result.success); // true

Parameters

ParameterTypeRequiredDescription
bot_idstringYesBot ID
memory_idstringYesMemory UUID (path parameter)

Response

{
  "success": true
}

Memory Types

Memories are categorized into three types:
TypeDescriptionExample
semanticFacts and knowledge about the user”User’s company is Acme Corp”
episodicEvents and interactions”User reported a billing issue on Feb 5”
proceduralPreferences and workflows”User prefers step-by-step explanations”

Next Steps