Cortex Mem MCP
sopaco/cortex-mem
Persistent memory enhancement for AI agents. An agent skill from sopaco/cortex-mem.
Externalize working memory and logical state into the lemmalog Datalog engine (MCP).
$ npx skills add JordyZomer/lemmalog --skill lemmalog -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install JordyZomer/lemmalog lemmalog --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/JordyZomer/lemmalog.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/lemmalog .claude/skills/lemmalog && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "lemmalog" agent skill from https://github.com/JordyZomer/lemmalog/tree/main/skills/lemmalog into .claude/skills/lemmalog/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "lemmalog", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/JordyZomer/lemmalog/tree/main/skills/lemmalogType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add JordyZomer/lemmalog --skill lemmalog -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install JordyZomer/lemmalog lemmalog --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JordyZomer/lemmalog.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/lemmalog .agents/skills/lemmalog && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "lemmalog" agent skill from https://github.com/JordyZomer/lemmalog/tree/main/skills/lemmalog into .agents/skills/lemmalog/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "lemmalog", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add JordyZomer/lemmalog --skill lemmalog -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install JordyZomer/lemmalog lemmalog --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JordyZomer/lemmalog.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/lemmalog .cursor/skills/lemmalog && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "lemmalog" agent skill from https://github.com/JordyZomer/lemmalog/tree/main/skills/lemmalog into .cursor/skills/lemmalog/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "lemmalog", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/JordyZomer/lemmalog.git --path skills/lemmalog--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add JordyZomer/lemmalog --skill lemmalog -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install JordyZomer/lemmalog lemmalog --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JordyZomer/lemmalog.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/lemmalog .gemini/skills/lemmalog && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "lemmalog" agent skill from https://github.com/JordyZomer/lemmalog/tree/main/skills/lemmalog into .gemini/skills/lemmalog/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "lemmalog", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install JordyZomer/lemmalog lemmalogInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add JordyZomer/lemmalog --skill lemmalog -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/JordyZomer/lemmalog.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/lemmalog .github/skills/lemmalog && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "lemmalog" agent skill from https://github.com/JordyZomer/lemmalog/tree/main/skills/lemmalog into .github/skills/lemmalog/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "lemmalog", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add JordyZomer/lemmalog --skill lemmalog -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install JordyZomer/lemmalog lemmalog --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/JordyZomer/lemmalog.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/lemmalog .opencode/skills/lemmalog && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "lemmalog" agent skill from https://github.com/JordyZomer/lemmalog/tree/main/skills/lemmalog into .opencode/skills/lemmalog/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "lemmalog", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
lemmalogExternalize working memory and logical state into the lemmalog Datalog engine (MCP).
Lemmalog is an agent skill from JordyZomer/lemmalog. Externalize working memory and logical state into the lemmalog Datalog engine (MCP). Use for ANY multi-step task where state should outlive one context window or span agents: long investigations, debugging sessions, audits, multi-agent searches, systematic explorations, planning with many interdependent constraints, anything needing provenance for its conclusions. Trigger when lemmalog MCP tools are available and the task involves accumulating verified facts, tracking hypotheses or status over time, or repeatedly…
Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Agent Workflows, covering MCP servers, Context engineering and Agent memory. It works with Model Context Protocol. The repository describes itself as: A Datalog engine for LLM agent memory: stratified rules, provenance-tracked facts, incremental derivation, and an MCP server that lets your harness use it as a shared brain. The licence is MIT.
9 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9cc2cf1. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Lemmalog loads about 2.8k tokens when it runs. Until then it costs about 141 tokens; SKILL.md has 1,426 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from JordyZomer/lemmalog at commit 9cc2cf1, republished under its MIT licence (© JordyZomer). 1,426 words, ~2,806 tokens.
.claude/skills/lemmalog/SKILL.md (or your agent's skills folder).lemmalog is a Datalog engine exposed as MCP tools. It is your working
memory: assertions with provenance and confidence, derived consequences
computed by rules, hypotheses with lifecycles — persistent across agents
and context resets.
The division of labor: the engine owns state and consequence; you own perception and choice; every choice's outcome returns to the engine. A claim that isn't in the engine doesn't exist — nothing durable lives in your context.
lemmalog_* tools must be registered (see the README of the
lemmalog repo). If they are absent, tell the user the one-line
registration command and continue without memory — never block the task.LEMMALOG_MCP_PATH was set at
registration; lemmalog_save forces a snapshot. Snapshots carry rule
batches too — installed analyses survive restarts under their batch ids.lemmalog-cli works on the SAME snapshot:
LEMMALOG_MCP_PATH=... lemmalog-cli observe --facts 'S --rel--> O',
plus query/retract/context/why/rules/dump. Mutations are visible to
the MCP server on its next load and vice versa — but the two hold
separate in-process copies, so don't write from both at once: hand
sub-agents the CLI and keep the parent on it too, or have the parent
only read while a sub-agent writes.S --rel[conf]--> O. Tag read-and-verified facts [1.0] and inferences
[0.4]–[0.7]. Do not omit the tag on anything you expect to derive over:
the default is 0.9 and confidence is a product down the proof chain, so four
hops of "verified" facts land at 0.66 and a deep closure decays to noise.
Anchor evidence with located(Entity, "file:line") (or any stable
reference) so provenance survives derivation — source references are valid
entity tokens as long as they contain no spaces. Never assert what you
haven't checked.count/min/max/sum aggregates. Rules
are experiments: one named batch per analysis idea, validated on
install (rejections are spec feedback), backfilled against everything
already asserted, lemmalog_uninstall when the idea dies.lemmalog_query —
never mental closure, and never re-deriving what a prior agent derived.
For grounded answering, lemmalog_context retrieves the question-relevant
facts plus their verbatim source episodes under a token budget, with an
attribution contrast (which subjects hold facts on the topic — a
question-mentioned party with zero topic facts is a false-premise
signal) and, for current-state questions, the latest value per slot
with supersessions as history — use it instead of lemmalog_dump when
preparing answers; selection beats dumping.lemmalog_why before trusting any derived fact. The proof tree
shows which asserted edges carry it; a chain is only as good as its
lowest-confidence edge. Re-verify the weakest edges against their
located anchors.H --hypothesis--> claim,
H --status--> proposed|supported|refuted|validated (supersedes),
H --evidence--> ref (accumulates).
Test counterfactuals with lemmalog_what_if — temporary facts,
answered goal, store untouched.lemmalog_retract it: the response
lists every derived conclusion that died with it, so the repair is
visible, not silent. (A value that merely changed is re-asserted
under the same relation; see "State that changes".) After a context
reset or another agent's turn, lemmalog_changes with your last
epoch resyncs you without re-reading the store.local --alias_of[conf]--> canonical
via lemmalog_canonicalize. Conflicts surface as alias_conflict
facts; they never silently merge.why trees, not from memory. A conclusion's confidence is the product
of its edges (the engine multiplies down the proof chain) — deep
derivations need high-confidence inputs to stay believable.The only shared vocabulary (everything else: invent precisely, and assert
describes(Relation, "one-line meaning") so others discover it):
All asserted through the line protocol (the predicate forms below are descriptions, not assertable syntax):
kernel_func --located--> vm/vm_map.c:3052 % evidence anchor (multi-valued)
works_at --describes--> person is employed at % self-documenting schema
hyp_1 --hypothesis--> claim in plain words % lifecycle-tracked claim
hyp_1 --status--> proposed % supersedes on change:
% proposed|supported|refuted|validated
hyp_1 --evidence--> vm_map.c:3052 % multi-valued: accumulates
decision_7 --decision--> chose scope X because YEvidence objects take a bare source reference (space-free) or a
punctuation-free phrase; spaces plus punctuation read as leaked prose
and are dropped. Symmetric quotes around subjects/objects are stripped
("mean field" lands as mean field) — multi-word values are fine up
to 8 words; compress longer prose into a short name or split it.
Values, quantities, and sets evolve — assert them so the engine can maintain them (these conventions are what the update policy and the aggregates need):
uses → switched_to) — that leaves
both values open, and every current-state query gets flaky. If you
need the history, the superseded fact is still queryable by its
validity interval.launch --monthly_cost--> 120 (never
$120 or 120 dollars) — digit-only objects feed sum/count
aggregates and </>= comparisons. Mixed forms are opaque symbols.moved_on with YYYY-MM-DD (or
YYYY-MM) objects; derive orderings with a rule
(earlier(A, B) :- on(A, D1), on(B, D2), D1 < D2) rather than
judging from prose.added(X) per item and watched(X)/done(X)
when consumed; current membership is then a rule —
pending(X) :- added(X), !watched(X). — not something you recount.prefers_when(user, lively, with_friends) — never assert the
condition itself as a fact unless the source says it holds now.reports_to("Alice", Y), never reports_to(Alice, Y).S --rel[conf]--> O, one per line.current(S, rel, O), not rel(S, O). Rule bodies
match the triple: reaches(X, Y) :- current(X, depends_on, Y). Writing
depends_on(X, Y) instead installs cleanly, reports a backfill count, and
then derives nothing — the failure is silent, so check a new rule with one
lemmalog_query before building on it.head(X, Y) :- atom(X, Y), X \= Z. with !atom negation,
now(T), comparisons, arithmetic; aggregates only in heads.ts on
lemmalog_observe is the valid-from time of the facts in that call;
asserted_at (written for you, unix seconds) is when the store
learned them; now(T) in a rule is the reader's present, synced to the
wall clock on every read. Backdating a batch is safe — it dates those
facts without hiding anything asserted after them, and the wall-clock
stamp preserves when you learned them. "What did we know at time T?"
is believed(E, R, O, T) (query with T bound, e.g.
lemmalog_query_deep) — a fact counts only after its asserted_at,
even if it was valid earlier. Omit ts unless the facts really are
about the past, and give one call one coherent timestamp rather than
mixing eras in a single batch.isError result carries the offending
input, the reason, and a hint — fix and resend; lemmalog_observe
reports dropped lines with reasons, so a zero-add result is loud, not
silent.why.Stays in your head: in-flight reading, semantic judgment.
Must land in the engine: conclusions, state changes, decisions — before
you move on — and dead ends most of all: a searched-and-ruled-out
avenue is the most valuable thing a future agent can inherit (X --dead_end--> why it failed, where confirmed). Assert them in bulk —
one observe call, one line each; fifty at once is fine.
Scope honesty: for a short task that fits one context window, working memory in your head is cheaper — lemmalog pays when state must outlive a window, span agents, or survive a restart. A single-session audit with four items to track is overhead; a multi-day investigation or a swarm reading each other's dead-ends is the payoff case.
© JordyZomer, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/lemmalog of JordyZomer/lemmalog.
Open the folder on GitHubat commit 9cc2cf1
Lemmalog next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Lemmalog this skillJordyZomer/lemmalog | 329 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Cortex Mem MCPsopaco/cortex-mem | 313 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Context Mode Searchmksglu/context-mode | 26k | — | ~250 | Automated safety check: Pass | Custom licence | |
| Context Mode Output Sandboxmksglu/context-mode | 26k | — | ~4.1k | Automated safety check: Pass | Custom licence | |
| MemPalace Setup and OperationMemPalace/mempalace | 60k | — | ~2.2k | Automated safety check: Pass | MIT | |
| agentmemory Setup and Diagnosticsrohitg00/agentmemory | 29k | — | ~1k | Automated safety check: Notes | Apache-2.0 |
sopaco/cortex-mem
Persistent memory enhancement for AI agents. An agent skill from sopaco/cortex-mem.
mksglu/context-mode
Search context-mode's persistent FTS5 knowledge base for previously indexed local project content, documentation, or session memory. Trigger…
mksglu/context-mode
Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.
MemPalace/mempalace
Installs and configures MemPalace as a private local palace, a shared-brain hub or a client of an existing hub, including MCP registration and version-correct initialization.
rohitg00/agentmemory
Sets up and troubleshoots a local agentmemory install, covering the MCP connection, environment variables, ports, authentication and optional feature flags.
mksglu/context-mode
Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.
Works with
Categories
Externalize working memory and logical state into the lemmalog Datalog engine (MCP). Lemmalog is an agent skill from JordyZomer/lemmalog. Externalize working memory and logical state into the lemmalog Datalog engine (MCP).
Lemmalog fits situations like: ANY multi-step task where state should outlive one context window; span agents: long investigations; debugging sessions; multi-agent searches.
Run `npx skills add JordyZomer/lemmalog --skill lemmalog -a claude-code`. Or copy the skill folder (skills/lemmalog in JordyZomer/lemmalog) into .claude/skills/lemmalog in your project. Claude Code loads it when a task matches its description.
Run `npx skills add JordyZomer/lemmalog --skill lemmalog -a codex`. Or copy the skill folder (skills/lemmalog in JordyZomer/lemmalog) into .agents/skills/lemmalog in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JordyZomer/lemmalog --skill lemmalog -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lemmalog, .gemini/skills/lemmalog, .github/skills/lemmalog and .opencode/skills/lemmalog in your project.
SKILL.md names no scripts, command-line tools or credentials: Lemmalog is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Lemmalog is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Lemmalog: Cortex Mem MCP (sopaco/cortex-mem, 313 stars), Context Mode Search (mksglu/context-mode, 26k stars), Context Mode Output Sandbox (mksglu/context-mode, 26k stars) and MemPalace Setup and Operation (MemPalace/mempalace, 60k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
JordyZomer (a GitHub user) maintains it in JordyZomer/lemmalog, which has 329 GitHub stars. The repository was last updated on October 1, 2026.
Source: JordyZomer/lemmalog on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.