Add memory
Memory lets an agent recall durable facts about a caller across calls. For how it works, see Memory.
Enable memory on the agent
Toggle memory in the console, or PATCH the agent:
memory_retention_days caps retrieval and the nightly cleanup; 0 means no cap.
Reference the placeholder in the prompt
Add {{memory}} where you want the facts grounded. The retrieved block is already a numbered list, so keep the surrounding prompt short.
With memory disabled, the placeholder is stripped — no literal braces reach the LLM.
Pass a stable caller identity
Memory pivots on caller_identity, taken from the LiveKit participant identity:
- Console test calls and authenticated SDK starts →
user_<firebase-uid>, set for you. - Public widget → pass
user_identityyourself (a stable ID such as a hashed email).
The widget’s user-identity attribute becomes the caller_identity on every memory — see Embed. Anonymous sessions — no user-identity — skip memory.
Verify it end to end
- Give the agent a prompt containing
{{memory}}and enable memory. - Place a test call and state something durable — “I can only do mornings; I’m vegetarian.” Hang up.
- On the conversation detail page, Memories written this call lists the facts within about ten seconds.
- Call again as the same caller and ask an open question — the agent should use the fact without re-asking.
Manage memories
Troubleshooting
The second call asks the same question again
Confirm {{memory}} is literally in the prompt. Without the placeholder, facts are stored but never injected.
“Memories written this call” never appears
The caller must be identified. Anonymous widget sessions (no user_identity) aren’t recorded — check the conversation’s caller_identity (empty means anonymous).
Facts exist but don't surface in-call
Retrieval has a 0.5 confidence floor. Lower-confidence facts show in the admin list but never enter the {{memory}} block.
The second call ignores the first call's facts
Both calls need the same caller_identity. A widget embed that passes a different userIdentity counts as a different caller.
No facts are written
Usually fine — the extractor emits zero rather than invent filler, so mundane calls often produce none.