Memory Management π‘ BETA
Memory is split into user, bot, session and episodic scopes, each exposed through a small set of BASIC keywords.
Overview
| Scope | Keywords | Lifetime |
|---|---|---|
| User | SET USER MEMORY, GET USER MEMORY |
Persists across conversations for that user. |
| Bot | SET BOT MEMORY, GET BOT MEMORY |
Shared state for one bot. |
| Session | SET, GET on session state |
Ends with the session. |
| Episodic | REMEMBER / RECALL path |
Summarised episodes with retention. |
User Memory
User memory stores facts about a person across bots. It is written and read with SET USER MEMORY / GET USER MEMORY; see the keyword pages for syntax.
Bot Memory
Bot memory holds state shared by conversations of one bot. It is written and read with SET BOT MEMORY / GET BOT MEMORY. Use it for counters and feature flags, not for secrets.
Session Memory
Session memory is temporary state for the current conversation. SET and GET operate on it; values disappear when the session ends.
Episodic Memory
EpisodicMemoryManager summarises older turns into an Episode with topics, decisions, action items, sentiment and resolution, driven by the episodic-memory-* configuration keys. See Episodic Memory.
Memory Patterns
| Pattern | Suitable scope |
|---|---|
| Personalised greeting | User memory |
| Cross-bot preference | User memory |
| Bot statistics | Bot memory |
| Multi-turn state | Session memory |
| Shift handoff summary | Episodic memory |
Limits
- Session state does not survive a new session.
- Bot and user memory are distinct scopes; a key in one is not visible in the other.
- Episodic summaries need a configured LLM and are bounded by retention settings.
- Do not store credentials or personal secrets in any memory scope.
Related
- Chapter overview - Index of this chapter.
See Also
- SET USER MEMORY - Store user memory
- GET USER MEMORY - Retrieve user memory
- SET BOT MEMORY - Store bot memory
- GET BOT MEMORY - Retrieve bot memory
- Episodic Memory - Automatic summarisation