Persistent, searchable memory for Claude Code conversations.
Memlayer gives Claude Code perfect recall across sessions. Every conversation is automatically indexed and searchable — Claude can remember what you worked on, how you solved problems, and what decisions were made.
Start a Claude Code session and ask "Do you remember how we fixed the SSH tunnel issue last week?" — Claude searches your indexed conversation history and returns the exact session where you debugged it together.
Your Claude Code sessions Memlayer server
~/.claude/projects/**/*.jsonl (FastAPI + PostgreSQL)
| |
v v
+-------------+ HTTP/JSON +----------------------+
| daemon | ------------------> | PostgreSQL 16 |
| (Rust) | batch ingest | + pgvector |
| | | |
| 1. Watches | | 3. Stores entries |
| 2. Parses | | FTS + vectors |
+-------------+ +----------+-----------+
|
+-------------+ search API |
| Claude | <------------------------------+
| Code | via `memlayer` CLI
| session | (TypeScript, Bash tool)
+-------------+
4. Claude recalls
- Watch — The daemon tails Claude Code's JSONL logs in real time.
- Parse — Each line is parsed into structured entries and batched to the server over HTTP.
- Store — The server stores entries in PostgreSQL with full-text search vectors. Optionally, embeddings are generated asynchronously for semantic search. Search uses Reciprocal Rank Fusion (RRF) to combine both methods.
- Recall — Claude calls the
memlayerCLI (memlayer search,memlayer session) to query the server and pull relevant history into the current session.
Two commands. The server sets up the database and API; the client installs the daemon and connects Claude Code.
Server (needs Docker):
git clone https://github.com/mikeydotio/memlayer.git
cd memlayer
./setup_server.shClient (on each machine, or the same one):
./setup_client.shDeploy to Supabase (database) + Fly.io (server) — no Docker or VPS needed:
git clone https://github.com/mikeydotio/memlayer.git
cd memlayer
./setup_cloud_hosted.shClient-only — downloads everything automatically:
curl -fsSL https://raw.githubusercontent.com/mikeydotio/memlayer/main/install.sh | bashTest it. Start a new Claude Code session and ask:
Do you remember what we worked on last week?
- Getting Started (Self-Hosted) — Full server + client setup
- Cloud Setup (Supabase + Fly.io) — Fully cloud-hosted deployment
- Generic VPS Setup — Deploy on any Linux VPS with Docker
- Architecture — Components, data flow, search algorithm
- Configuration — All environment variables
- CLI Reference —
memlayer-serveradmin commands - CLI Tools & Search —
memlayersearch CLI and search filters
- Server Migration — Zero-downtime server migration
- Upgrading — Version upgrade guides
- Troubleshooting — Common issues and fixes
- Uninstalling — Clean removal
- Development — Dev setup, project structure, API endpoints
MIT