A self-hosted memory engine for AI agents. You send it chats, notes, URLs or files. It pulls out short facts, keeps them current as things change, and gives them back to your agents through a REST API, an MCP server and a web dashboard.
Note
Recall is experimental and still early. Things may change between releases, so keep a backup of anything you care about.
I built it so Claude Code, claude.ai and my own apps share one memory about me and my projects, on hardware I control. It runs in production at https://recall.zakiego.com (sign-in is invite-only).
- Facts that stay current. When new content contradicts an old fact, Recall writes a new version and closes the old one. History is kept. When it can't tell which one is right, it flags both for review.
- Fast local search. SQLite FTS5 and sqlite-vec, merged with reciprocal rank fusion. No LLM call on the search path.
- Ask with citations. One LLM call over the top facts, answered only from them, with every claim linked to a fact.
- MCP server. Streamable HTTP at
/mcpwith an API key, or OAuth 2.1 (PKCE, dynamic client registration) so it works as a claude.ai custom connector. - People. Extraction links facts to the people they mention and matches them by email, handle, name or alias. The dashboard can merge duplicates.
- Dates and reminders. Facts can carry an event or due date. An hourly job emails a daily digest of what's due.
- Connectors. Import Gmail messages, and pull changes from apps that expose a changes feed.
- Multi-user. Workspaces with owner, admin and member roles. Sign in with a password or a passkey. No public sign-up: accounts come from the admin CLI or an invite link.
- Claude Code hooks. Inject the profile at session start and send the session back at the end (
integrations/claude-code).
POST /v1/memoriesstores the document and queues an ingest job. It returns 202 right away.- Ingest fetches or parses the content (readable HTML, PDF, text, chat), chunks it and embeds the chunks.
- Extract sends the new content plus the 20 closest current facts to the LLM, which answers with facts to add, update or close.
- A profile job rewrites the container's short summary.
Embeddings run on the box with multilingual-e5-small in a child process that exits when idle, so memory goes back to the OS between bursts. The LLM is reached through any OpenAI-compatible /v1/chat/completions endpoint.
| Part | Tech |
|---|---|
Server (apps/server) |
Go, net/http, SQLite (mattn/go-sqlite3 with FTS5, sqlite-vec), ONNX Runtime, hand-written SQL migrations |
Dashboard (apps/app) |
React, Vite, TanStack Router, Tailwind 4, embedded into the Go binary |
Site and docs (apps/site) |
Next.js static export with Fumadocs, on Cloudflare Pages |
Edge (apps/edge) |
Cloudflare Worker that splits traffic between the site and the app |
Hooks (integrations/claude-code) |
Node, no dependencies |
| Deploy | Distroless Docker image, Docker Compose |
You need Docker and an OpenAI-compatible LLM endpoint. Recall uses it to pull facts out of what you send.
git clone https://github.com/zakiego/recall.git && cd recall
cp env.example .env # set SESSION_SECRET, GATEWAY_URL, GATEWAY_KEY and EXTRACT_MODEL
docker compose up -d --build # serves on 127.0.0.1:4800
docker compose exec app recall create-user alice # asks for a password, 12 characters or moreOpen http://localhost:4800/app and log in. Create a key under API keys in the sidebar, then:
export RECALL_KEY=rcl_...
curl -X POST "http://localhost:4800/v1/memories?wait=1" \
-H "Authorization: Bearer $RECALL_KEY" -H "Content-Type: application/json" \
-d '{"content":"I switched to Puma running shoes."}'
curl -X POST http://localhost:4800/v1/search \
-H "Authorization: Bearer $RECALL_KEY" -H "Content-Type: application/json" \
-d '{"q":"what shoes"}'Connect Claude Code over MCP:
claude mcp add --transport http recall http://localhost:4800/mcp --header "Authorization: Bearer $RECALL_KEY"The quickstart has what each step should print and what to check when it doesn't. The port is published on loopback only. Put a reverse proxy or tunnel with TLS in front of it for anything beyond your own machine, and set RECALL_URL to that public origin.
All configuration is environment variables. These are the ones to set first.
| Variable | Required | What it does |
|---|---|---|
RECALL_URL |
yes | Public origin (no /app). Used for cookies, passkeys, the trusted origin and invite links. Default http://localhost:4800 |
SESSION_SECRET |
yes | 32+ random characters (openssl rand -base64 48). Signs OAuth hand-offs and encrypts OAuth client secrets. Without it, login is off |
GATEWAY_URL |
yes | OpenAI-compatible base URL serving streamed /v1/chat/completions |
GATEWAY_KEY |
yes | Bearer key for the gateway |
EXTRACT_MODEL |
no | Model for extraction, profiles and Ask. Default claude-haiku-5-5 |
The configuration page lists every variable. env.example has each with a placeholder.
Every /v1 route takes Authorization: Bearer rcl_.... A key belongs to one workspace and only sees that workspace's data. The main routes:
| Route | What |
|---|---|
POST /v1/memories |
Add text, a chat, a URL or a file (up to 20 MB). ?wait=1 waits for the facts |
GET /v1/memories |
Current facts, ?history=1 for every version, ?review=1 for flagged ones |
PATCH, DELETE /v1/memories/:id |
Edit (writes a new version) or soft-delete a fact |
POST /v1/search |
Hybrid search over facts and document chunks |
POST /v1/ask |
A cited answer from the container's facts |
GET /v1/profile |
The container's summary and top facts |
GET /v1/people, GET /v1/upcoming |
People in the facts, and what's due soon |
MCP tools: get_playbook, add_memory, search_memories, ask_memory, get_profile, list_memories, upcoming, list_people, get_person, list_documents, retry_document. The full reference is in the docs (source in apps/site/content/docs).
The Quick start's docker compose setup is the deployment. docs/operations.md and the self-hosting docs cover configuration, backups, restores and upgrades.
The JS side is a pnpm workspace pinned to pnpm 10.17.0. Run it as npx -y pnpm@10.17.0 (a newer global pnpm breaks this repo's node_modules). Every Go command takes -tags sqlite_fts5.
npx -y pnpm@10.17.0 install
apps/server/scripts/fetch-onnxruntime.sh
7F99
# ONNX Runtime, once per checkout
(cd apps/server && go run -tags sqlite_fts5 ./tools/fetch-model ../app/data/models) # the e5 model (~120 MB), once
(cd apps/server && go build -tags sqlite_fts5 -o bin/recall ./cmd/recall)
(cd apps/server && DATA_DIR=../app/data bin/recall serve) # API, MCP and jobs on :3000
(cd apps/app && npx vite dev) # dashboard at http://localhost:4800/app, API proxied to :3000
(cd apps/site && npx next dev --port 4810) # the landing page and docs at http://localhost:4810The server reads only its process environment, not an env file. Export your values first (set -a; . ../app/.env; set +a).
The binary listens on port 3000 (PORT, HOST), and RECALL_URL defaults to http://localhost:4800, the Vite dev server. To serve a built dashboard from the binary instead, set RECALL_WEB_DIR to the build folder and RECALL_URL to the binary's own address. Admin commands need the same DATA_DIR as the server: DATA_DIR=../app/data bin/recall list-users.
Tests:
(cd apps/server && go test -tags sqlite_fts5 ./...) # needs the model and ONNX Runtime above
(cd apps/app && npx tsc --noEmit && npx vitest run)
node --test integrations/claude-code/test/*.test.mjsAGENTS.md has the repo conventions (migrations, goldens, the RPC contract). docs/GO-PORT.md tells how the server was ported from TypeScript to Go with byte-for-byte golden tests. docs/operations.md covers deploys, backups and restores.
Bug reports and small fixes are welcome. CONTRIBUTING.md has the setup and the conventions, and the code of conduct applies. Report a vulnerability privately, the way SECURITY.md describes.