Who it is forA developer running Claude Code on a multi-session project who keeps losing track of decisions, people and facts established in earlier sessions.
The problemChat context is lost between sessions, and a vector store retrieves text without showing how a conclusion was derived.
The outcomeClaude Code stores facts with lemmalog_observe, derives conclusions with rules, and uses lemmalog_why to show the proof tree back to the episodes that support each conclusion.
What you need first
- Rust toolchain with cargo, and a clone of the lemmalog repo
- Claude Code (or Kimi CLI) installed if you want MCP tools
- A writable path for the memory snapshot, for example /tmp/lemmalog.snapshot or the default ~/.lemmalog/memory.snap
Steps
- Run
cargo build --releasein the repo to produce the lemmalog-cli binary used by later steps. (inferred, check the README) - Run
cargo build --release --features mcp. - Run
claude mcp add lemmalog -- $(pwd)/target/release/lemmalog-mcp. - Optionally register with persistence:
claude mcp add lemmalog --env LEMMALOG_MCP_PATH=/tmp/lemmalog.snapshot -- $(pwd)/target/release/lemmalog-mcp. (inferred, check the README) - In Claude Code, call lemmalog_observe with facts such as
Alice --works_at--> Acmeand then lemmalog_query with a goal such ascurrent("Alice", R, O), quoting entity names. (inferred, check the README)
Prompt for your agent
Using the lemmalog MCP server in <project>, assert the facts stated in this session with lemmalog_observe, then run lemmalog_query for each decision made. Expected output: the query results for each decision, plus a lemmalog_why proof tree for one derived fact. Verify that every observed line returned no dropped-line warning.
Caveat. The README warns that the MCP server and headless CLI hold separate in-process copies, so do not write from both at the same time against one snapshot.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page