PROJECT_01
MemoryOS
A persistent memory layer for LLMs, built as an MCP server
Standard LLMs are stateless — every session starts from zero. MemoryOS sits between you and the model as a memory layer, storing conversations, extracting structured facts, and injecting relevant context back at the start of each new session. It runs entirely on your machine: no API keys, no cloud, no cost.
How it works
- Three memory tiers, each chosen for a different access pattern: working memory in a process dict for zero-latency exact lookup, episodic memory in ChromaDB for semantic recall without exact keywords, and semantic memory in SQLite for deterministic fact lookup.
- Entity extraction runs on every message — spaCy NER plus regex relationship patterns, with a tech-term blocklist so "Python" never gets stored as a person's name.
- Calibrated confidence scores per source: PERSON detection 85%, GPE 80%, ORG and regex matches 75%, so downstream reads know how much to trust a fact.
- Exposed over MCP as a JSON-RPC server on stdio, which means it plugs straight into Claude Desktop as a tool provider.
Memory tiers
user message │ ▼ extractor.py spaCy NER + regex │ ├─► working dict exact, 0-latency ├─► episodic ChromaDB semantic search └─► semantic SQLite structured facts │ ▼ context injected into next session