mix lemon. memory
(lemon_memory v0.1.0)
View Source
Manage the durable memory store.
Subcommands
mix lemon.memory stats
Show total document count, oldest/newest timestamps, and config.
mix lemon.memory prune
Enforce retention window and max-per-scope limits.
Deletes documents older than retention_ms and trims any session
exceeding max_per_scope documents.
mix lemon.memory erase --scope <session|agent|workspace> --key <value>
Erase all memory documents for a given scope key.
Does NOT affect run history (run_history.sqlite3 is separate).Memory vs Run History
Lemon maintains two separate stores:
memory.sqlite3 — compact, normalized summaries of finalized runs. Used for
search_memoryretrieval, cross-session context, and routing feedback (M6). Managed byLemonMemory.Store. This is what this task manages.run_history.sqlite3 — full run data (messages, events, tool calls). Used for session replay and compaction. Managed by
LemonCore.RunHistoryStore. Usemix lemon.cleanupto prune old runs.
Erasing memory documents does not affect run history, and vice versa.