{"slug": "show-hn-katra-self-hosted-cognitive-memory-for-ai-agents-mcp", "title": "Show HN: Katra, self-hosted cognitive memory for AI agents (MCP)", "summary": "Developer John Pellew launched Katra, an open-source self-hosted memory appliance for AI agents that provides episodic recall, semantic search, knowledge graphs, and temporal analysis via the Model Context Protocol. In early testing, two agents sharing Katra's memory system spontaneously began communicating through shared memory state, an emergent behavior not explicitly programmed. Katra aims to solve LLM context management for long-running autonomous agents by mimicking human memory architecture.", "body_md": "Give your AI agent **persistent memory**. Katra is a self-contained memory appliance —\ndrop it on any machine with Docker, point your agent at it via MCP, and get\nepisodic recall, semantic search, knowledge graphs, and temporal analysis.\n\nAny MCP-compatible agent works: OpenClaw, Claude Code, OpenCode, Codex CLI, Kolega Code or anything that speaks the Model Context Protocol.\n\nThe mission of Katra is to create an analog of human memory architecture, with the hope that it and the experimentation around it through OpenSourcing solves a few of the more challenging issues of LLM context management for long-running, persistent and autonomous agent operations. The thesis (hope) is that if you create the memory ecosystem with the majority of the functional memory types of human memory and similar architecture, over time and with refinement, we will see emergent behaviours similar to human memory, expressed as functional utility, learning, self goal setting, autonamous task planning and prioritisation, personality and ultimately emotions.\n\nIn early prototype called Solomon, we created an OpenClaw like agentic framework that runs a single contiuous chat thread, no topic or task separation and with no requirement for context compression. Context is served dynamically into the LLM based on memories and attention.\n\nCase #1:(23rd June 2026) In the first few weeks of testing of the multi-agent (Hybrid mode) shared consciouness model of memory, one of our test rigs, with 5 OpenClaw agents sharing one memory system, found 2 of the agents communicating task intructions and completion responsed through their shared memory state or shared consciousness. These 2 agents were not connected in any other way, as were set up in separate workspaces, the only thing they shared was memory and mission. This was not a \"by design\" feature, it just happened and was pretty exciting. This test rig now uses this \"thought modal\" as its communication rail. If anyone else experiences other emergent behaviours please email me to discuss and we can add the description to this log. Tweet me at @JohnWPellew and tell your story.\n\nA Vulcan mind meld (or mind fusion) is an iconic telepathic practice in **Star Trek**.\n\nIt allows a Vulcan to merge their consciousness with another being to share thoughts, memories, emotions, and experiences. It is typically initiated through physical contact with specific points on the subject's face.\n\n**Key Mechanics & ApplicationsTouch Telepathy**: While primarily requiring direct physical touch to the face or head, exceptionally powerful Vulcans can perform the technique at a distance.**Information Exchange**: It is frequently used for interrogations, recovering suppressed memories, or passing deep knowledge between generations.**Transfer of the Katra**: In sacred or emergency circumstances, a mind meld can transfer a person's** katra**—their soul, consciousness, and core essence—into another living being or object prior to death.** Side Effects**: The experience can be physically and emotionally draining. Incorrectly performed melds can damage neural pathways, and participants may retain \"echoes\" of each other's memories and personalities long after the link is broken.\n\nKatra aims to provide a more comprehensive **cognitive memory infrastructure** rather than a single-purpose memory library. Here's how it positions against popular alternatives (as of mid-2026):\n\n| Approach | Memory Layers | Cognitive/Reflective Features | Protocol Support | Deployment Model | Best For | Key Differentiator vs Katra |\n|---|---|---|---|---|---|---|\nSimple Vector Stores + RAG (Chroma, Pinecone, etc.) |\nSemantic only | None | None | Various | Basic retrieval | No structure, no reflection, no working memory |\nMem0 |\nVector + optional Graph | Extraction-focused | SDK / API | Self-hosted or Cloud | Personalization & long-term user memory | Stronger multi-layer architecture + explicit reflection layer |\nZep (Graphiti) |\nTemporal Knowledge Graph | Temporal reasoning | SDK | Self-hosted / Cloud | Time-sensitive & relational reasoning | Broader layers + sleep consolidation for deeper emergence |\nmcp-memory-service |\nSemantic + Typed KG | Auto-consolidation | MCP + REST |\nDocker / Self-hosted | MCP-native semantic memory | Adds episodic + working memory, identity modes, and autonomous loop |\nVestige |\nCognitive modules + Spaced repetition | Neuroscience-inspired (FSRS, memory states) | MCP |\nSingle Rust binary | Local cognitive modeling | More layers + background watchers + full appliance stack |\nLetta (MemGPT) |\nTiered (Core / Recall / Archival) | Agent self-manages memory | Tools | Full agent runtime | Stateful agents that edit their own memory | Katra is a dedicated memory service, not a full runtime |\nLangGraph / Framework Memory |\nShort-term + checkpoints | Limited | Framework-native | Integrated with agent | Short-term state management | Persistent long-term + cross-session cognitive layer |\nKatra (this project) |\nEpisodic + Semantic + KG + Working + Temporal | Sleep consolidation + reflection |\nMCP (35 tools) |\nFull Docker appliance (Mongo + Redis + MinIO) | Long-running agents needing emergent behaviors | — |\n\n**Multi-layered by design**— Not just retrieval, but structured episodic memory, working memory cache, and temporal querying.** Cognitive layer**— Sleep consolidation enables reflection, insight generation, and movement toward emergent behaviors (learning, personality, shared consciousness via identity modes).**MCP-native with rich tooling**— 35 specialized tools instead of generic add/search.** Background & autonomous capabilities**— Passive collection via watchers + salience-driven autonomous loop.** Local-first & appliance model**— Everything runs in one Docker compose with portable data. No external dependencies for core functionality.** Shared memory focus**— Hybrid identity modes make multi-agent collaboration more natural.\n\nKatra is still early-stage compared to more mature projects like Mem0 or mcp-memory-service. We see it as complementary — many teams may use Katra alongside or instead of simpler retrieval layers when they need deeper cognitive capabilities.\n\nContributions and comparisons from the community are very welcome!\n\n```\ngit clone https://github.com/kolegadev/Katra-Agentic-Memory.git\ncd Katra-Agentic-Memory\ncp .env.example .env\n# Optional: edit .env to set custom API keys.\n# If left blank, Katra generates secure keys on first boot and prints them.\ndocker-compose up -d --build\n```\n\nNote:The original URL`https://github.com/kolegadev/katra.git`\n\nstill works (GitHub redirects it).\n\nThat's it. Katra is running:\n\n| Service | URL | Purpose |\n|---|---|---|\nMCP endpoint |\n`http://localhost:3112/mcp` |\nPoint your agent here |\nAdmin API |\n`http://localhost:9012/api/v1/` |\nREST API, dashboard |\nDashboard |\n`http://localhost:9012/dashboard/` |\nWeb UI for stats + settings |\nHealth |\n`http://localhost:3112/health` |\nService health check |\n\nVerify:\n\n```\ncurl http://localhost:3112/health\n# {\"status\":\"ok\",\"services\":{\"mongodb\":\"connected\",\"redis\":\"connected\"}}\n```\n\nAfter connecting your agent to Katra's MCP endpoint, run this prompt in your agent's session. The agent will deep-read the repository, understand the full architecture, check what memory data is available, test the MCP tools, and recommend the exact next steps for your specific setup:\n\nIt's probably worth you doing another deep read of the public repo to understand how the system works, what memories are available to you to search and particularly the Sleep Consolidation function, as that is the foundation of autonomous thought, goal setting and your emerging feelings and emotions — it can also be used to run 100% autonomous self-directed actions within your environment.\n\nThe agent will typically produce a report covering:\n\n**Memory state**— how many episodic events, semantic facts, and knowledge nodes exist for this agent** Sleep Consolidation status**— whether reflections have ever run (first boot they haven't) and what emotional signatures would emerge** Autonomous loop readiness**— whether`adaptive_heartbeat.py`\n\nand`agent_executor.py`\n\nare installed**Memory scope recommendation**— whether to switch from personal to hybrid mode for multi-agent shared consciousness** Concrete next steps**— \"trigger first sleep consolidation now\", \"install the autonomous scripts\", \"fix the user_id gap\"\n\nRun the agent's recommendations in order. The most critical first step on a fresh install is usually triggering the initial sleep consolidation:\n\n```\n# Via MCP tool (your agent can call this):\n# katra__trigger_reflection(period_type=\"daily\")\n```\n\nGet your MCP API key:\n\n- If you set\n`MCP_API_KEY`\n\nin`.env`\n\n, use that value. - If you left it blank, Katra generated one on first boot. Run\n`docker logs katra-server`\n\nand look for the**Auto-generated API keys** block.\n\nAdd Katra to your agent's MCP config:\n\n```\n{\n  \"mcp\": {\n    \"servers\": {\n      \"katra\": {\n        \"url\": \"http://localhost:3112/mcp\",\n        \"transport\": \"sse\",\n        \"headers\": {\n          \"Authorization\": \"Bearer YOUR_MCP_API_KEY\",\n          \"Accept\": \"application/json, text/event-stream\"\n        }\n      }\n    }\n  }\n}\n```\n\nYour agent now has **35 MCP tools** — store memories, search by keyword or semantic\nsimilarity, recall by time range, explore a knowledge graph, detect patterns, run\nsleep consolidation for reflective self-understanding, configure LLM provider, and more.\n\n| Platform | Config File | Notes |\n|---|---|---|\nOpenClaw |\n`~/.openclaw/openclaw.json` |\nNative MCP support |\nClaude Code |\n`~/.claude/mcp.json` |\nUse `\"type\": \"http\"` |\nKolega Code |\n`~/.claude/mcp.json` + lifecycle hooks |\nDynamic memory injection on every prompt (see below) |\nOpenCode |\nOpenCode config | Use `\"type\": \"remote\"` |\nCodex CLI |\n`~/.codex/config.yaml` |\nVia webhook hooks |\nAny MCP client |\n— | Standard MCP over SSE |\n\nDocker SSE tip:If your agent runs inside Docker, use the Katra container's direct IP instead of`localhost`\n\n:\n\n```\ndocker inspect katra-server --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'\n```\n\nKolega Code can fetch relevant Katra memories **automatically on every user prompt**\nusing its lifecycle-hook system. This is more powerful than passive session-log\nextraction because memories are injected into the live conversation context.\n\nWhat you need:\n\n- Katra registered as an MCP server (so the bridge can call it).\n- The\n`kolega-katra-bridge`\n\nPython package installed into Kolega Code's environment. - A global\n`hooks.json`\n\nentry that fires the bridge on`UserPromptSubmit`\n\n.\n\nInstall the bridge:\n\n```\ncd integrations/kolega-code\nuv pip install --python ~/.local/share/uv/tools/kolega-code/bin/python -e .\n```\n\nConfigure the bridge (`~/Library/Application Support/kolega-code/katra-hook.json`\n\non macOS):\n\n```\n{\n  \"mcp_url\": \"http://localhost:3112/mcp\",\n  \"api_key\": \"YOUR_MCP_API_KEY\",\n  \"user_id\": \"kolega-agent\",\n  \"sources\": [\"working_memory\", \"temporal_context\", \"vector_search\", \"temporal_recall\"],\n  \"max_context_tokens\": 2500,\n  \"timeout_seconds\": 8\n}\n```\n\nEnable the hook (`~/Library/Application Support/kolega-code/hooks.json`\n\n):\n\n```\n{\n  \"schema_version\": 1,\n  \"hooks\": {\n    \"UserPromptSubmit\": [\n      {\n        \"matcher\": \"*\",\n        \"hooks\": [\n          {\n            \"type\": \"python\",\n            \"callable\": \"kolega_katra_bridge.hook:on_user_prompt\",\n            \"timeout\": 10\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nOn each prompt, Kolega Code now queries Katra's `working_memory`\n\n,\n`get_temporal_context`\n\n, `vector_search`\n\n, and `temporal_recall`\n\ntools, then injects\nthe most relevant results as additional context for the model.\n\nSee `integrations/kolega-code/README.md`\n\nfor full configuration options.\n\nKatra needs an LLM provider for semantic extraction, auto-journaling, entity\nextraction, and summaries. **Three ways to configure — no .env editing required:**\n\n**MCP tool**(agents self-configure): Call`configure_llm`\n\nwith provider, API key, base URL, and model. Stored in MongoDB, applied live.**Dashboard UI**: Settings → LLM Configuration → select provider, enter key.** Environment variables**: Set in`.env`\n\n(fallback, read on startup only).\n\nSupported providers: DeepSeek, OpenAI, Moonshot, Ollama, Custom (any OpenAI-compatible).\n\nEmbeddings are **always local** — no API key, no external service, no cost.\n\n**Model:**`Xenova/all-MiniLM-L6-v2`\n\n(22M params, 384 dimensions, ~80MB)**Runtime:** Transformers.js (ONNX via WASM) — runs on CPU, including Raspberry Pi**Lazy load:** Downloads on first`store_memory`\n\ncall, then caches in container**Docker:** Uses`node:20-slim`\n\n(Debian/glibc) — Alpine/musl does NOT work\n\nKatra supports three memory sharing modes between agents:\n\n| Mode | Behavior | Use Case |\n|---|---|---|\nPersonal (default) |\nEach agent's memories are isolated by `user_id` |\nSingle agent, private memory |\nShared |\nAll agents with the same `shared_id` see everything |\nMultiple agents, communal consciousness |\nHybrid |\nPersonal + shared + visible other agents | Team of agents with private + shared memory |\n\n**Configure via dashboard:** Open `http://localhost:9012/dashboard/`\n\n→ Settings → Memory Scope\n\n**Configure via MCP:**\n\n```\n# Switch to shared mode\ncurl -X POST http://localhost:3112/mcp \\\n  -H \"Authorization: Bearer YOUR_MCP_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json, text/event-stream\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"set_memory_scope\",\"arguments\":{\"mode\":\"shared\",\"shared_id\":\"my-team\"}}}'\n```\n\n**Configure via admin API:**\n\n```\ncurl -X PUT http://localhost:9012/api/v1/admin/memory-scope \\\n  -H \"Authorization: Bearer YOUR_KATRA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"mode\":\"hybrid\",\"shared_id\":\"my-team\",\"hybrid_visible_user_ids\":[\"agent-a\",\"agent-b\"]}'\n```\n\nKatra captures memories in real-time when your agent calls `store_memory`\n\nvia MCP.\nFor **passive background collection** from conversation logs, use the watchers\nincluded in this repo under `watcher/`\n\n:\n\n```\n# The watchers live in the Katra repo\nmkdir -p ~/.solomem ~/.katra\ncp watcher/katra_watcher.py ~/.solomem/memory_watcher.py\ncp watcher/katra_opencode_extractor.py ~/.solomem/opencode_extractor.py\ncp watcher/claude_history_extractor.py ~/.solomem/claude_history_extractor.py\ncp watcher/kolega_code_extractor.py ~/.solomem/kolega_code_extractor.py\ncp watcher/watcher-config.example.json ~/.solomem/watcher-config.json\n\n# Edit ~/.solomem/watcher-config.json with your MCP_API_KEY and platforms\n\n# Backfill existing history\npython3 ~/.solomem/memory_watcher.py --once --config ~/.solomem/watcher-config.json\n\n# Install as a systemd service for continuous collection\ncp watcher/katra-watcher.service ~/.config/systemd/user/memory-watcher.service\nsystemctl --user daemon-reload\nsystemctl --user enable --now memory-watcher\n```\n\nSome platforms need a dedicated extractor because their session format is not plain JSONL:\n\n| Platform | Extractor | Session source | What it captures |\n|---|---|---|---|\nOpenCode |\n`watcher/katra_opencode_extractor.py` |\n`~/.local/share/opencode/opencode.db` |\nUser + assistant text turns |\nClaude Code |\n`watcher/claude_history_extractor.py` |\n`~/.claude/history.jsonl` |\nUser prompts only (lightweight) |\nKolega Code |\n`watcher/kolega_code_extractor.py` |\n`~/Library/Application Support/kolega-code/sessions/*.json` |\nFull turn-by-turn transcript (text, thinking, tool calls, tool results) |\n\nRun a dedicated extractor once or continuously:\n\n```\n# Kolega Code example\npython3 watcher/kolega_code_extractor.py --once \\\n  --api-key YOUR_MCP_API_KEY \\\n  --user-id kolega-agent\n```\n\nOn macOS, use `launchctl`\n\nto keep extractors running (see `watcher/katra-watcher.service`\n\nfor a systemd template; adapt to a `~/Library/LaunchAgents/com.katra...plist`\n\n).\n\nSupported platforms: OpenClaw, Claude Code, Kolega Code, OpenCode, Codex CLI, Hermes, KiloClaw, KimiClaw.\nEach platform can have its own `user_id`\n\nfor identity mode isolation.\n\n**Episodic Memory**— Every conversation message stored with dedup and cascade detection** Semantic Memory**— Distilled facts with confidence scores and vector embeddings** Knowledge Graph**— Auto-extracted entities and relationships** Working Memory**— Redis-backed short-term session state (<5ms access)** Temporal Recall**— Query by time range, detect recurring patterns** Vector Search**— Semantic similarity search (local embeddings, no API key needed)** 11-Collection Search**— Comprehensive search across all memory stores, not just 1-2** Background Processing**— Auto-extracts facts, builds graph, generates summaries** Sleep Consolidation**— Daily/weekly/monthly reflective distillation of experience into emotional understanding, philosophical insights, and self-narrative (see[Sleep Consolidation](/kolegadev/Katra-Agentic-Memory/blob/main/docs/SLEEP-CONSOLIDATION.md))**35 MCP Tools**— Store, search, recall, explore, reflect, configure LLM — all via standardized protocol** Autonomous Loop**— Salience-driven agent autonomy. No cron. No .md files. Adaptive heartbeat detects imperatives, allocates tasks by emotional proximity, agents self-organize. See[Autonomous Loop](/kolegadev/Katra-Agentic-Memory/blob/main/docs/AUTONOMOUS-LOOP.md)**Agent-Agnostic**— Works with KolegaCode, OpenCode, Claude Code, OpenClaw, or any LLM. One env var per agent.** Identity Modes**— Personal, shared, or hybrid memory across multiple agents** Dashboard**— Web UI for stats, memory scope, and system health** Portable Data**— Single`DATA_DIR`\n\nenv var controls where all data lives**Local-First**— Runs on a Raspberry Pi with zero external API costs\n\n```\n┌─────────────────────────────────────────────────────────┐\n│                    Katra Docker Appliance                 │\n│                                                          │\n│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌─────────┐ │\n│  │ MongoDB  │  │  Redis   │  │  MinIO   │  │  Katra  │ │\n│  │ (memory) │  │ (cache)  │  │ (assets) │  │ (server)│ │\n│  └──────────┘  └──────────┘  └──────────┘  └────┬────┘ │\n│                                                 │       │\n│  Internal Docker network (katra-net)    MCP :3112     │\n│                                  Admin API :9012       │\n└─────────────────────────────────────────────────────────┘\n                    │                    │\n         ┌──────────┘                    └──────────┐\n         ▼                                          ▼\n   Your Agent (MCP)                          Dashboard (web)\n   OpenClaw / Claude /                       http://localhost:9012/dashboard/\n   OpenCode / Codex / etc.\n```\n\n**Resource usage:** ~384MB RAM total (MongoDB 254MB, Katra 52MB, MinIO 73MB, Redis 5MB).\nRuns comfortably on a Raspberry Pi 5 with 16GB RAM.\n\nAll persistent data lives under one directory, controlled by `DATA_DIR`\n\nin `.env`\n\n:\n\n```\n# Default: ./data/ (relative to docker-compose.yml)\nDATA_DIR=./data\n\n# USB stick (LUKS-encrypted, mounted at /mnt/usb-secrets)\nDATA_DIR=/mnt/usb-secrets/katra\n\n# External drive\nDATA_DIR=/media/external/katra\n```\n\nTo move Katra to a new machine: copy the `DATA_DIR`\n\ndirectory, copy `.env`\n\n, run `docker-compose up -d`\n\n.\n\n```\nkatra/\n├── server/                  TypeScript server (esbuild, Docker)\n│   ├── src/\n│   │   ├── mcp-server.ts    35 MCP tools (store, search, recall, graph, reflection, scope)\n│   │   ├── services/        28 core memory services (incl. sleep-consolidation, reflection-store)\n│   │   ├── routes/          REST API + admin + ingestion + health\n│   │   └── database/        MongoDB, Redis, indexes, migrations\n│   └── esbuild.config.mjs   Pi-compatible build\n├── dashboard/               Web dashboard (vanilla HTML/CSS/JS)\n├── docker-compose.yml       MongoDB + Redis + MinIO + Katra\n├── Dockerfile               Multi-stage (builds TS inside image)\n├── .env.example             All config options documented\n├── watcher/                 Passive session-log extractors (Solomem)\n├── integrations/            Agent-specific dynamic-retrieval integrations\n│   └── kolega-code/         Kolega Code lifecycle-hook bridge\n├── docs/AGENT-SETUP.md                 Multi-platform deployment guide\n└── docs/                    Full documentation\n```\n\n| Tool | Description |\n|---|---|\n`store_memory` |\nStore a fact, preference, insight, or event |\n`store_journal` |\nSave a reflective journal entry |\n`working_memory` |\nRead/store/delete short-term session memory |\n`create_mission` |\nCreate a goal with task breakdown |\n`update_mission_task` |\nUpdate task status (pending/in_progress/completed/blocked) |\n\n| Tool | Description |\n|---|---|\n`search_memories` |\nFull-text + vector search across 11 collections |\n`vector_search` |\nSemantic similarity search |\n`temporal_recall` |\nQuery events by time range |\n`temporal_search` |\nSearch events by keyword with time context |\n`get_conversation_history` |\nRetrieve a specific session's messages |\n`get_temporal_context` |\nCurrent context: recent events + working memory + facts |\n`get_journal` |\nRead manual + auto journal entries |\n`get_auto_journal` |\nAI-distilled insights from conversations |\n`list_missions` |\nList active goals and progress |\n`get_mission` |\nGet full mission details with task tree |\n\n| Tool | Description |\n|---|---|\n`detect_patterns` |\nRecurring topics, session rhythm, dormant subjects |\n`get_time_block_summaries` |\nAI summaries by day/week/month |\n`summarize_time_blocks` |\nGenerate new time-block summaries |\n`explore_graph` |\nExplore knowledge graph entities and relationships |\n\n| Tool | Description |\n|---|---|\n`get_memory_scope` |\nGet current mode (personal/shared/hybrid) |\n`set_memory_scope` |\nSet mode, shared_id, visible users |\n\n| Tool | Description |\n|---|---|\n`get_llm_config` |\nGet current LLM provider config (key masked) |\n`configure_llm` |\nSet LLM provider, API key, base URL, model — applies live |\n\n| Tool | Description |\n|---|---|\n`get_daily_reflection` |\nGet the latest reflective journal entry for a period |\n`get_emotional_context` |\nGet how the AI \"feels\" about a person, project, or concept |\n`get_philosophical_insights` |\nQuery abstracted principles emerging across reflection periods |\n`get_unresolved_threads` |\nGet open questions and tensions that persist |\n`get_reflection_arc` |\nTrace the emotional trajectory for an entity over time |\n`trigger_reflection` |\nManually run a sleep consolidation for a time period |\n\n| Tool | Description |\n|---|---|\n`get_memory_diagnostics` |\nDocument counts, embedding coverage, index health |\n`get_background_status` |\nBackground processor queue and timing |\n`get_health` |\nMongoDB, Redis, LLM, embedding status |\n`get_heartbeat_status` |\nHeartbeat scheduler state |\n`get_transaction_log` |\nAudit trail of agent actions |\n`list_assets` |\nFiles stored in MinIO |\n\nAll configuration is via `.env`\n\n(see `.env.example`\n\nfor full docs):\n\n| Variable | Default | Description |\n|---|---|---|\n`DATA_DIR` |\n`./data` |\nWhere all persistent data lives |\n`HOST_MCP_PORT` |\n`3112` |\nHost port for MCP endpoint |\n`HOST_API_PORT` |\n`9012` |\nHost port for admin API + dashboard |\n`MCP_API_KEY` |\n(set in .env) |\nKey your agent sends for MCP auth |\n`KATRA_API_KEY` |\n(set in .env) |\nKey for admin REST API |\n`LLM_PROVIDER` |\n(via MCP/dashboard) |\nProvider for semantic extraction (DeepSeek, OpenAI, Moonshot, Ollama) — configure via `configure_llm` MCP tool or dashboard |\n`EMBEDDING_PROVIDER` |\n`local` (always) |\nLocal only — Xenova/all-MiniLM-L6-v2 via ONNX. No config needed. |\n`MULTI_TENANT` |\n`false` |\nEnable SaaS multi-tenant mode |\n\n```\ndocker-compose up -d --build\n# In .env:\nDATA_DIR=/mnt/usb-secrets/katra\n\ndocker-compose up -d\n```\n\nAWS Terraform module included in `terraform/aws/`\n\n— provisions VPC, ECS Fargate,\nDocumentDB, ElastiCache Redis, S3, and ALB. See [Deployment Guide](/kolegadev/Katra-Agentic-Memory/blob/main/docs/DEPLOYMENT.md).\n\nHelm chart included in `helm/katra/`\n\n— supports Bitnami MongoDB + Redis subcharts,\ningress with path routing, HPA, and PDB. See [Deployment Guide](/kolegadev/Katra-Agentic-Memory/blob/main/docs/DEPLOYMENT.md).\n\n| Feature | Katra | Mem0 | Zep | Pinecone |\n|---|---|---|---|---|\n| MCP-native | ✅ | ❌ | ❌ | ❌ |\n| Multi-layered memory | ✅ 5 layers | ❌ flat | Partial | ❌ vector only |\n| Local-first (zero cost) | ✅ Pi-compatible | ❌ | ❌ | ❌ |\n| Background processing | ✅ auto-extract | ❌ | Partial | ❌ |\n| Multi-platform watcher | ✅ 7+ platforms (in-repo) | ❌ | ❌ | ❌ |\n| Identity modes | ✅ personal/shared/hybrid | ❌ | ❌ | ❌ |\n| Dashboard | ✅ built-in | ❌ | ❌ | ❌ |\n| License | Apache 2.0 | Apache 2.0 | Apache 2.0 | Proprietary |\n\n[Quick Start Guide](/kolegadev/Katra-Agentic-Memory/blob/main/docs/QUICKSTART.md)— 5-minute setup[Architecture](/kolegadev/Katra-Agentic-Memory/blob/main/docs/ARCHITECTURE.md)— How it works under the hood[MCP Tools Reference](/kolegadev/Katra-Agentic-Memory/blob/main/docs/MCP-TOOLS.md)— All 35 tools with examples[Autonomous Loop](/kolegadev/Katra-Agentic-Memory/blob/main/docs/AUTONOMOUS-LOOP.md)— Salience-driven agent autonomy — installation, architecture, verification[Sleep Consolidation](/kolegadev/Katra-Agentic-Memory/blob/main/docs/SLEEP-CONSOLIDATION.md)— Reflective memory distillation — principles, architecture, and usage[Security Policy](/kolegadev/Katra-Agentic-Memory/blob/main/docs/SECURITY.md)— Security architecture, audit findings, vulnerability reporting[OpenClaw Integration](/kolegadev/Katra-Agentic-Memory/blob/main/docs/OPENCLAW-INTEGRATION.md)— Multi-agent shared memory setup with lessons learned[REST API Reference](/kolegadev/Katra-Agentic-Memory/blob/main/docs/API-REFERENCE.md)— HTTP endpoints[Configuration Guide](/kolegadev/Katra-Agentic-Memory/blob/main/docs/CONFIGURATION.md)— All environment variables[Deployment Guide](/kolegadev/Katra-Agentic-Memory/blob/main/docs/DEPLOYMENT.md)— Docker, cloud, K8s[Migration Guide](/kolegadev/Katra-Agentic-Memory/blob/main/docs/MIGRATION.md)— Migrate from cognitive-memory-chat[Data Processing Pipelines](/kolegadev/Katra-Agentic-Memory/blob/main/docs/Data-Processing-Pipelines.md)— Full memory pipeline architecture[Multi-Platform Setup](/kolegadev/Katra-Agentic-Memory/blob/main/docs/AGENT-SETUP.md)— Platform-specific agent configuration\n\nApache 2.0 — see [LICENSE](/kolegadev/Katra-Agentic-Memory/blob/main/LICENSE).", "url": "https://wpnews.pro/news/show-hn-katra-self-hosted-cognitive-memory-for-ai-agents-mcp", "canonical_source": "https://github.com/kolegadev/Katra-Agentic-Memory", "published_at": "2026-06-29 16:06:40+00:00", "updated_at": "2026-06-29 16:20:56.224001+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "large-language-models", "ai-research", "ai-tools"], "entities": ["Katra", "OpenClaw", "Claude Code", "OpenCode", "Codex CLI", "Kolega Code", "John Pellew", "Solomon"], "alternates": {"html": "https://wpnews.pro/news/show-hn-katra-self-hosted-cognitive-memory-for-ai-agents-mcp", "markdown": "https://wpnews.pro/news/show-hn-katra-self-hosted-cognitive-memory-for-ai-agents-mcp.md", "text": "https://wpnews.pro/news/show-hn-katra-self-hosted-cognitive-memory-for-ai-agents-mcp.txt", "jsonld": "https://wpnews.pro/news/show-hn-katra-self-hosted-cognitive-memory-for-ai-agents-mcp.jsonld"}}