memorylayer.ai
Persistent, queryable memory for stateless LLMs.
Website ·
Docs ·
GitHub
LLMs forget everything between sessions. MemoryLayer fixes that.
Store memories with a single call, recall them with semantic search, and let the knowledge graph surface connections that vector similarity alone can't find. Works with any LLM framework or directly via REST API.
from memorylayer import sync_client
with sync_client() as memory:
memory.remember("User prefers dark mode and TypeScript")
results = memory.recall("What are the user's preferences?")
Why MemoryLayer
- Cognitive memory types -- episodic, semantic, procedural, and working memory mirror how humans organize knowledge
- Knowledge graph -- 63 typed relationships across 11 categories enable multi-hop causal queries
- Semantic tiering -- memories are progressively summarized so you retrieve the right detail level without wasting context
- Context sandbox -- process hundreds of memories server-side in a persistent Python sandbox without consuming your context window
- Recursive reasoning -- inspired by RLM, the server iteratively executes code and LLM queries over memory data
- Smart extraction -- every memory stored automatically extracts facts, builds associations, deduplicates, and categorizes
- Adaptive decay -- memory importance adjusts over time based on usage and feedback
- Document ingestion -- upload PDFs / DOCX / images and turn them into memories; optional ColPali multi-vector page search via the embed-server peer
- Repository Planning Graph -- sync code structure, traverse symbols and dependencies, maintain task overlays, and detect file/symbol conflicts
- Skills + MCP registries -- workspace-scoped libraries of agent skills and MCP server entries with 4-tier scope precedence (user / workspace / tenant / global)
- MCP integration -- first-class Model Context Protocol server (28 tools by default, 40 in the
full profile) for Claude Code, Claude Desktop, OpenCode, Cursor, and other MCP-compatible tools
- Optional Aether transport -- run behind an Aether mesh for mTLS, signed identity headers, on-behalf-of delegation, durable task scheduling, and cross-datacenter routing
Packages
| Package | Install | Description |
|---|
| memorylayer-core-python | pip install memorylayer-server | FastAPI server with SQLite + sqlite-vec storage; optional Turso/libSQL backend |
| memorylayer-server-rpg-python | pip install memorylayer-server-rpg | Repository Planning Graph plugin: sync, traversal, overlays, conflicts, maintenance, and enrichment |
| memorylayer-embed-server | Container image, or pip install "./memorylayer-embed-server[local]" from a checkout (not on PyPI) | Stateless embedding peer. [local] = CPU (sentence-transformers + ColPali); [gpu] adds vLLM, OCR, transcription |
| memorylayer-sdk-python | pip install memorylayer-client | Python client SDK (async/sync, optional Aether transport) |
| memorylayer-sdk-typescript | npm i @scitrera/memorylayer-sdk | TypeScript/JavaScript client SDK |
| memorylayer-mcp-typescript | npm i @scitrera/memorylayer-mcp-server | MCP server -- 28 tools (default), up to 40 in full |
| memorylayer-sdk-langchain-python | pip install memorylayer-langchain | LangChain integration |
| memorylayer-sdk-llamaindex-python | pip install memorylayer-llamaindex | LlamaIndex integration |
| memorylayer-cc-plugin | see README | Claude Code plugin -- captures memory before compaction |
| memorylayer-opencode-plugin | npm i @scitrera/memorylayer-opencode-plugin | OpenCode plugin -- session briefings, recall hooks, compaction capture |
| memorylayer-explorer | see README | (Work in Progress) WebUI |