{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "jordyzomer-lemmalog--schedule-fact-ingestion-from-scripts",
 "repo": "JordyZomer/lemmalog",
 "repo_url": "https://github.com/JordyZomer/lemmalog",
 "repo_slug": "jordyzomer-lemmalog",
 "title": "Feed facts into memory from scripts and cron",
 "page_title": "How to feed facts into memory from scripts and cron with Lemmalog",
 "summary": "Use the headless lemmalog-cli to observe facts and run queries from shell scripts or scheduled jobs.",
 "who": "An operator with a scheduled job or shell pipeline that produces structured facts and needs them in a shared memory for later agent queries.",
 "problem": "Agents cannot always reach MCP, and scheduled jobs need a way to write to the same memory without an interactive session.",
 "outcome": "A script writes triples to the snapshot with lemmalog-cli observe, and a later step reads derived answers with lemmalog-cli query.",
 "steps": [
  "Run `cargo build --release` to 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."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The README says the MCP server and CLI hold separate in-process copies, so concurrent writes to one snapshot can conflict.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/jordyzomer-lemmalog/schedule-fact-ingestion-from-scripts/",
 "md": "https://dedupedai.com/use-cases/jordyzomer-lemmalog/schedule-fact-ingestion-from-scripts/index.md",
 "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 hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/jordyzomer-lemmalog--schedule-fact-ingestion-from-scripts.json",
 "api_version": "v1"
}
