Who it is forAn operator with a scheduled job or shell pipeline that produces structured facts and needs them in a shared memory for later agent queries.
The problemAgents cannot always reach MCP, and scheduled jobs need a way to write to the same memory without an interactive session.
The outcomeA script writes triples to the snapshot with lemmalog-cli observe, and a later step reads derived answers with lemmalog-cli query.
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 --releaseto produce the lemmalog-cli binary. (inferred, check the README) - Choose one snapshot path and export it:
export LEMMALOG_MCP_PATH=/tmp/lemmalog.snapshot. (inferred, check the README) - Write facts from your script:
LEMMALOG_MCP_PATH=/tmp/lemmalog.snapshot lemmalog-cli observe --facts 'S --rel--> O', replacing S, rel and O with real values. - Read derived answers:
LEMMALOG_MCP_PATH=/tmp/lemmalog.snapshot lemmalog-cli query --goal 'current("s", R, O)'. - Route every writer through the CLI and keep MCP-based writers out of the same snapshot while the job runs.
Prompt for your agent
Using lemmalog-cli with snapshot <snapshot path>, observe the facts in <input file> and then run a query for <entity>. Expected output: the observe report with any dropped lines and the query results. Verify that no line was silently dropped.
Caveat. The README says the MCP server and CLI hold separate in-process copies, so concurrent writes to one snapshot can conflict.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for JordyZomer/lemmalog and "Feed facts into memory from scripts and cron"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer