DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to feed facts into memory from scripts and cron with Lemmalog

Use the headless lemmalog-cli to observe facts and run queries from shell scripts or scheduled jobs.

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

  1. Run cargo build --release to produce the lemmalog-cli binary. (inferred, check the README)
  2. Choose one snapshot path and export it: export LEMMALOG_MCP_PATH=/tmp/lemmalog.snapshot. (inferred, check the README)
  3. 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.
  4. Read derived answers: LEMMALOG_MCP_PATH=/tmp/lemmalog.snapshot lemmalog-cli query --goal 'current("s", R, O)'.
  5. 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.

Share: 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