{"slug": "anamnesis-local-archive-of-your-ai-chats-searchable-by-any-agent", "title": "Anamnesis – Local archive of your AI chats, searchable by any agent", "summary": "Anamnesis, a command-line tool from developer devhaitham481, archives every AI conversation locally in SQLite and exposes the archive to Claude Code, Codex, Gemini CLI and Cursor over the Model Context Protocol (MCP), so any connected tool can search prior work done in another. The tool collects history in the background from session files the tools already write, searches by keyword and meaning locally in about a tenth of a second using a 70 MB local model, and requires no account, API keys or telemetry; it also offers `anam keep` to stop Claude Code deleting sessions after 30 days. Anamnesis installs via a curl script that provisions Python through uv, supports importing ChatGPT, claude.ai and Gemini exports, and lets users deploy a self-hosted \"node\" to sync machines and connect web apps as an MCP connector.", "body_md": "**Never lose an AI conversation again.**\n\nEvery conversation with every AI tool, kept on your computer and searchable by all of them.\n\nAI tools forget. Claude Code deletes sessions after 30 days, and none of your tools knows what you worked out in the others. Anamnesis keeps a permanent, word-for-word archive of all of them on your computer and gives it back to every tool over [MCP](https://modelcontextprotocol.io). Ask Claude Code *\"what did we decide about auth?\"* and it finds the answer, even if you worked it out in ChatGPT months ago.\n\n- **Keeps** every conversation, even after the tool itself deleted it.\n- **Collects** in the background, from the history your tools already write.\n- **Searches** by keyword and meaning, locally, in about a tenth of a second.\n- **Stays yours:** local SQLite and a small local model. No account, no API keys, no telemetry. It never calls an AI model itself.\n\n*Anamnesis* (Greek ἀνάμνησις) means \"recollection\": in Plato, learning as remembering what you already knew; in medicine, a patient's history, taken so nobody starts from scratch.\n\n```\ncurl -LsSf https://devhaitham481.github.io/anamnesis/install.sh | sh\n```\n\nmacOS or Linux (Windows: WSL). Nothing to preinstall: the [script](https://devhaitham481.github.io/anamnesis/install.sh) brings its own Python via [uv](https://docs.astral.sh/uv/), then runs `anam setup`, which finds your AI tools, archives their history, and asks before it connects them or changes anything. **Then restart your AI tools.** That's it.\n\n## Other ways, updating, uninstalling, troubleshooting\n\n**Without the script:** `uv tool install anamnesis-cli` (or `pipx install anamnesis-cli`), then `anam setup`.\n\n**Update:** run the install command again; setup is safe to re-run.\n\n**Uninstall:**\n\n```\nanam disconnect all          # remove Anamnesis from your AI tools' configs\nuv tool uninstall anamnesis-cli\nrm -rf ~/.anamnesis          # your memory; skip this to keep it\n```\n\n**Troubleshooting**\n\n- `anam: command not found` : open a new terminal.\n- A tool doesn't use the memory: restart it. If `anam status` shows it as*outdated* , run`anam setup` .\n- Semantic search is off: the 70 MB model downloads on first run and needs internet once. Keyword search always works.\n\nJust keep working. Connected tools archive new conversations in the background and search the memory when earlier work comes up.\n\n```\nanam status                  # what's archived per tool, and what's missing\nanam auth decision           # search from the shell\nanam                         # browse everything in the terminal (vim keys, / to filter)\nanam import chatgpt.zip      # add a ChatGPT, claude.ai or Gemini export\nanam keep                    # stop Claude Code deleting sessions after 30 days\n```\n\n| Tool | How | \n|---|---|\n| Claude Code, Codex, Gemini CLI, Cursor | automatic (their session files, read-only) | \n| ChatGPT | export: Settings → Data controls → Export data, then `anam import` | \n| claude.ai / Claude Desktop | export: Settings → Privacy → Export data, then `anam import` | \n| Gemini (web) | Google Takeout → My Activity → *Gemini Apps* , format**JSON** , then`anam import` | \n\nOnly what you and the assistant said is kept; tool output, reasoning and injected system context are skipped. Re-importing is safe.\n\nWeb apps can't reach your laptop, so you run a **node**: your own always-on copy of the memory, on a server you control. There is no Anamnesis cloud. It also keeps your computers in sync.\n\n```\nanam node deploy fly             # 1. deploy once and link this computer (or Docker, below)\nanam node link https://your-node # 2. on each other computer; you choose what it uploads\nanam connect claude-web          # 3. prints the steps (also: chatgpt-web)\n```\n\nIn the app you add `https://your-node/mcp` as a custom connector and sign in with the node password (needs a paid claude.ai or ChatGPT plan; Gemini doesn't support connectors). `anam node status` and `anam node activity` show who used it; `anam node revoke` cuts an app off.\n\n## Docker, security, cost\n\n**Any server with Docker** (VPS, NAS, home server); point a domain at it first:\n\n```\ncurl -O https://raw.githubusercontent.com/devHaitham481/anamnesis/main/docker-compose.yml\nprintf 'ANAMNESIS_DOMAIN=memory.example.com\\nANAMNESIS_NODE_PASSWORD=%s\\n' \"$(openssl rand -base64 18)\" > .env\ndocker compose up -d         # HTTPS via Caddy\n```\n\n- **Security:** HTTPS plus end-to-end encryption (AES-256-GCM) of synced data, with a key only your computers and your node hold. Apps get revocable OAuth tokens, never the password. Wrong passwords are rate-limited.\n- **Cost:** one small machine. On Fly.io: 1 shared CPU, 1 GB memory and volume, stopped when idle.\n- **Updates:**`docker compose pull && docker compose up -d` , or re-run`anam node deploy fly --app <name>` .\n\n## Only need your computers in sync? Use a folder\n\n`anam share` on the first computer prints a pairing code; `anam join <code>` on the others. The default folder is `iCloud Drive/Anamnesis`; pass a path for Dropbox, Syncthing or anything else. Everything in it is end-to-end encrypted.\n\n## All commands\n\n```\nanam setup                guided setup; safe to re-run\nanam                      terminal memory browser\nanam QUERY | search QUERY search from the shell  [--source chatgpt]\nanam status               archive per tool, what's missing, connected tools\nanam sync [--watch]       import new local history now (or keep watching)\nanam import FILE...       import ChatGPT / claude.ai / Gemini Takeout exports\nanam keep                 stop Claude Code deleting its sessions after 30 days\nanam connect [TOOL|all]   claude-code, claude-desktop, cursor, gemini-cli, codex\nanam disconnect TOOL|all\nanam share | join | devices | unshare      sync computers through a folder\nanam node deploy fly | link URL | status | activity | revoke | scope | wipe\nanam connect claude-web   use your memory in claude.ai (also chatgpt-web)\nanam mcp                  the MCP server (connected tools start it for you)\n```\n\n`connect` merges into each tool's config and writes a `.bak` first. MCP tools: `search_memory`, `recent_conversations`, `get_conversation`, `remember`.\n\n## Terminal UI keys\n\n| Key | Action | \n|---|---|\n| `j`` k` ·`g`` G` ·`Ctrl+D`` Ctrl+U` | Move and scroll | \n| `l` /`h` | Open a conversation / back to the list | \n| `/` | Fuzzy-filter the list as you type; Enter searches every message | \n| `Esc` | Clear the box, then back to the list | \n| `/history [source]` ,`/sync` ,`/rename` ,`/delete` ,`/help` | Commands in the box | \n| `Ctrl+Q` | Quit | \n\n## Web UI, API and configuration\n\n`anam-web`, then open [http://127.0.0.1:8000](http://127.0.0.1:8000). Endpoints: `GET /api/sources`, `/api/threads`, `/api/threads/{id}/messages`, `/api/search?q=&source=`, `PATCH`/` DELETE /api/threads/{id}`, and `WS /ws` for live updates. To reach it from other devices, set `ANAMNESIS_HOST=0.0.0.0`, `ANAMNESIS_ALLOWED_HOSTS` and `ANAMNESIS_AUTH_TOKEN`.\n\nNothing needs configuring. Settings come from the environment or `.env` (see [`.env.example`](https://github.com/devHaitham481/anamnesis/blob/main/.env.example)). Data and logs live in `~/.anamnesis`.\n\nIssues and PRs are welcome, especially importers for tools that aren't covered yet (Antigravity, Cursor's agent CLI).\n\n```\ngit clone https://github.com/devHaitham481/anamnesis && cd anamnesis\nuv venv -p 3.13 .venv && uv pip install -p .venv -e \".[dev]\"\n.venv/bin/pytest -q && .venv/bin/ruff check . && .venv/bin/mypy src\n```\n\nCode is in `src/anamnesis/`: `ingest/` (one parser per tool), `memory_mcp/`, `core/` (storage, search, sync), `node/`, `cli/` and `web/`.", "url": "https://wpnews.pro/news/anamnesis-local-archive-of-your-ai-chats-searchable-by-any-agent", "canonical_source": "https://github.com/devHaitham481/anamnesis", "published_at": "2026-11-18 11:12:49+00:00", "updated_at": "2026-11-18 12:15:42.260558+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "agent-protocols", "developer-tools", "ai-products"], "entities": ["Anamnesis", "devhaitham481", "Claude Code", "Codex", "Gemini CLI", "Cursor", "ChatGPT", "Model Context Protocol"], "also_reported_by": [], "takeaway": "Anamnesis archives AI chat history in local SQLite and serves it to Claude Code, Codex, Gemini CLI and Cursor over MCP, giving cross-tool keyword and semantic search in about 0.1 seconds with no API keys or telemetry.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/anamnesis-local-archive-of-your-ai-chats-searchable-by-any-agent", "markdown": "https://wpnews.pro/news/anamnesis-local-archive-of-your-ai-chats-searchable-by-any-agent.md", "text": "https://wpnews.pro/news/anamnesis-local-archive-of-your-ai-chats-searchable-by-any-agent.txt", "jsonld": "https://wpnews.pro/news/anamnesis-local-archive-of-your-ai-chats-searchable-by-any-agent.jsonld"}}