cortex-memory
Skill51 starsChanged 8 months agoMITView on GitHub
Persistent cognitive memory for AI agents — query, record, review, and consolidate knowledge across sessions with spreading activation, FSRS scheduling, and NLI contradiction detection.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- FilippoPilo/cortex-connectortheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- FilippoPilo/cortex-connector★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cortex-querySkill
- cortex-reviewSkill
- learn-projectSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
If anything goes wrong, fozikio doctor diagnoses the install and tells you how to fix it.
- Distinctive: line 53
Read before you write: Always check what you already know before adding more.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cortex Memory
Persistent memory engine for AI agents. Knowledge survives across sessions — recall what you learned last week, track evolving beliefs, detect contradictions, and build a knowledge graph over time.
Source: github.com/Fozikio/cortex-engine (MIT) | npm
Prerequisites
This skill requires cortex-engine running as an MCP server. Install it separately before using this skill:
npm install -g @fozikio/cortex-engineInstall the scoped package, unpinned. The unscoped
cortex-engineon npm is the old name and is deprecated — but old versions of it still resolve, so pinning one installs an ancient engine that works just well enough to hide the problem. Always use@fozikio/cortex-engine, and let it take the latest.
Then initialize and start:
fozikio init my-agent # scaffold a workspace
fozikio up # start ollama + nli, wait until they answer
fozikio serve # start the MCP server (stdio)If anything goes wrong, fozikio doctor diagnoses the install and tells you how to fix it.
Runs locally with SQLite + Ollama. No cloud accounts needed. The skill instructions below are read-only — they teach your agent how to use cortex tools, they don't execute anything.
Managing the services
cortex-engine 1.4.0+ ships a service supervisor, so you do not have to babysit Ollama:
| Command | What it does |
fozikio up | start every service and wait until it actually answers |
fozikio status | service health (HTTP probe, not PID liveness); exits 1 if unhealthy |
fozikio doctor | diagnose the install and say how to fix what is broken |
fozikio dashboard | live service and memory view |
fozikio down | stop services it started |
status and up use an HTTP probe rather than checking whether a process exists, because a wedged process still holds the port. They also adopt rather than kill: if fozikio did not start a process, it will not stop it — which matters when the Ollama desktop app or another agent already owns :11434.
Core Loop
Read before you write. Always check what you already know before adding more.
Search
query("authentication architecture decisions")Be specific. query("JWT token expiry policy") beats query("auth"). Results include relevance scores and connected concepts.
Explore around a result:
neighbors(memory_id)Record
Facts — things you confirmed:
observe("The API rate limits at 1000 req/min per API key, not per user")Questions — unresolved:
wonder("Why does the sync daemon stall after 300k seconds?")Hypotheses — unconfirmed ideas:
speculate("Connection pooling might fix the timeout issues")Update beliefs
believe(concept_id, "Revised understanding based on new evidence", "reason")Track work across sessions
ops_append("Finished auth refactor, tests passing", project="api-v2")
ops_query(project="api-v2") # pick up where you left offMemory-Grounded Reviews
Review code or designs by comparing against accumulated knowledge:
- Ground:
query("the domain being reviewed")— load past decisions and patterns - Compare: Does the work align with or diverge from established patterns?
- Record:
observe()new patterns,wonder()about unclear choices,believe()updated understanding - Output:
## Review — Grounded in Memory
### Aligned with known patterns
- [matches cortex context]
### Divergences
- [what differs, intentional or accidental]
### New patterns to capture
- [novel approaches worth observing]Session Pattern
- Start:
query()the topic you're working on - During:
observe()facts,wonder()questions as they come up - End:
ops_append()what you did and what's unfinished - Periodically:
dream()to consolidate memories (compress, abstract, prune)
Available Tools
60 tools across 13 categories. Run fozikio tools for the full list with descriptions.
| Category | Count | Tools |
| memory | 11 | context, federated_query, feedback, neighbors, observe, query, query_cross, recall, retrieve, speculate, wonder |
| consolidation | 5 | abstract, digest, dream, ruminate, wander |
| beliefs | 4 | belief, believe, contradict, validate |
| ops | 3 | ops_append, ops_query, ops_update |
| threads | 4 | thread_create, thread_resolve, thread_update, threads_list |
| journal | 5 | evolution_list, evolution_resolve, evolve, journal_read, journal_write |
| social | 4 | social_draft, social_read, social_score, social_update |
| content | 3 | content_create, content_list, content_update |
| graph | 4 | link, resolve, suggest_links, suggest_tags |
| vitals | 2 | vitals_get, vitals_set |
| agents | 2 | agent_invoke, intention |
| maintenance | 5 | find_duplicates, forget, goal_set, notice, surface |
| meta | 8 | consolidation_status, graph_report, predict, query_explain, retrieval_audit, sleep_pressure, stats, suggest |
Beyond the basics
- threads — multi-session explorations. A thread is something you want to keep thinking about, distinct from an ops log entry recording what happened.
- journal / evolution — identity change over time.
evolve()proposes a shift;evolution_resolve()applies, rejects, or reverts it, so the ledger reflects what was actually adopted rather than only what was suggested. - beliefs —
contradict()adjudicates whether an observation genuinely conflicts with an existing memory (via NLI, falling back to the LLM) and records a CONTRADICTION or TENSION signal rather than silently overwriting. - meta —
sleep_pressure()andconsolidation_status()tell you whetherdream()is overdue;retrieval_audit()andquery_explain()show why a query returned what it did.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

