Long Term Memory
Convai can remember things about your users across sessions. When you provide an `endUserId`, the character automatically builds and recalls long-term memories.
Enable memory
This is a character based feature. Go to you convai dashboard -> Character -> Memory tab -> Memory Settings -> Enable Long Term Memory

Pass endUserId when connecting:
client.memoryManager becomes available after a successful connection.
Access the manager
List memories
Parameters
page
number
1
1–1000
pageSize
number
50
1–100
Add memories
Pass one or more strings to add as memories:
The character will use these in future conversations automatically.
Get a single memory
Delete a memory
Delete all memories
Removes all memories for the (character, user) pair. Deletion is asynchronous on the server.
Standalone usage
MemoryManager can be used independently of the client (e.g., in a backend admin tool):
Memory object shape
How automatic memory works
When endUserId is set, the Convai backend extracts meaningful facts from each conversation and stores them as memories. On future connections with the same endUserId, these memories are injected into the character's context so it "remembers" the user. This is why the value must be stable and unique per user — a UUID or email address both work well.
You do not need to call any Memory API methods for this to work. The explicit CRUD methods are for reading, seeding, or pruning memories from your application.
Last updated
Was this helpful?