🧠 Memory System
When ENABLE_MEMORY=true, LemonClaw maintains persistent memory in the single SQLite database:
- Long-term memory chunks — facts, preferences, and knowledge stored as searchable chunks, retrieved at query time via TF-IDF.
- Session archival — at session end, the conversation is summarized and archived so it can be recalled later.
- Memory tools — use
recall_memoryfor historical facts and decisions, andlist_memoryfor core preferences and project context. - History maintenance — after each turn, only oversized tool text/argument strings outside the protected recent-message group are shortened (
CONTEXT_TOOL_MAX_CHARS, default 12000 characters per string). Older history is summarized together only at 80% context pressure. At leastCONTEXT_MIN_FULL_MESSAGESrecent messages, extended to keep tool calls/results paired, remain intact.
To manage memory live via the /memory, /chunk, and /session commands.