{"id":51180243,"url":"https://github.com/perseus-computing-llc/mimir","last_synced_at":"2026-06-27T07:00:25.258Z","repository":{"id":362993014,"uuid":"1261564890","full_name":"Perseus-Computing-LLC/mimir","owner":"Perseus-Computing-LLC","description":"Mimir — persistent memory for AI agents. MCP-native. SQLite + FTS5. Fully local.","archived":false,"fork":false,"pushed_at":"2026-06-24T13:56:56.000Z","size":526,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-24T14:21:59.201Z","etag":null,"topics":["ai-agents","encryption","fts5","knowledge-graph","local-first","mcp","mimir","persistent-memory","python","rust","sqlite"],"latest_commit_sha":null,"homepage":"http://mimir.perseus.observer/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Perseus-Computing-LLC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T21:31:46.000Z","updated_at":"2026-06-24T13:57:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Perseus-Computing-LLC/mimir","commit_stats":null,"previous_names":["tcconnally/engram-rs","tcconnally/mneme","tcconnally/mimir","perseus-computing-llc/mimir"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Perseus-Computing-LLC/mimir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perseus-Computing-LLC%2Fmimir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perseus-Computing-LLC%2Fmimir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perseus-Computing-LLC%2Fmimir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perseus-Computing-LLC%2Fmimir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Perseus-Computing-LLC","download_url":"https://codeload.github.com/Perseus-Computing-LLC/mimir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perseus-Computing-LLC%2Fmimir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34844346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","encryption","fts5","knowledge-graph","local-first","mcp","mimir","persistent-memory","python","rust","sqlite"],"created_at":"2026-06-27T07:00:18.153Z","updated_at":"2026-06-27T07:00:25.251Z","avatar_url":"https://github.com/Perseus-Computing-LLC.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mimir\n\n\u003c!-- mcp-name: io.github.Perseus-Computing-LLC/mimir --\u003e\n\n\u003e **Persistent Memory for AI Agents — MCP-Native. Local-First. Zero Dependencies.**\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![Rust](https://img.shields.io/badge/rust-stable-orange.svg)](https://rust-lang.org)\n[![Version](https://img.shields.io/badge/version-2.2.1-green.svg)](https://github.com/Perseus-Computing-LLC/mimir/releases)\n[![LangGraph](https://img.shields.io/badge/integrations-LangGraph-blue)](integrations/langgraph/)\n[![CrewAI](https://img.shields.io/badge/integrations-CrewAI-orange)](integrations/crewai/)\n[![AutoGen](https://img.shields.io/badge/integrations-AutoGen-purple)](integrations/autogen/)\n[![MCP Tools](https://img.shields.io/badge/MCP%20tools-40-brightgreen)]()\n\nMimir is a single Rust binary that gives AI agents durable memory across sessions.\n**One binary. One file. No Docker. No Postgres. No cloud.** Just persistent memory\nthat works with any MCP host.\n\n## One-Line Install\n\n```bash\ncurl -sSf https://raw.githubusercontent.com/Perseus-Computing-LLC/mimir/main/scripts/install.sh | sh\n```\n\nThat's it. Mimir is installed to `~/.local/bin/mimir`. Start it:\n\n```bash\nmimir serve --db ~/.mimir/data/mimir.db\n```\n\nConnect any MCP host (Claude Desktop, Cursor, Hermes Agent, Perseus, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"mimir\": {\n      \"command\": \"mimir\",\n      \"args\": [\"serve\", \"--db\", \"~/.mimir/data/mimir.db\"]\n    }\n  }\n}\n```\n\n## 30-Second Quickstart\n\n```bash\n# Start Mimir\nmimir serve --db memory.db \u0026\nsleep 1\n\n# Remember a fact (via MCP JSON-RPC on stdio)\necho '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"mimir_remember\",\"arguments\":{\"category\":\"demo\",\"key\":\"hello\",\"body_json\":\"{\\\"text\\\":\\\"Hello from Mimir!\\\"}\"}}}' | mimir serve --db memory.db\n\n# Search for it\necho '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"mimir_recall\",\"arguments\":{\"query\":\"Hello\"}}}' | mimir serve --db memory.db\n```\n\n## Why Mimir\n\nMimir is the **only** memory engine that is simultaneously MCP-native,\nlocal-first, zero-dependency, AND agent-first.\n\n### Comparison Matrix\n\n| | Mimir | Mem0 | Letta | Zep |\n|---|---|---|---|---|\n| **Deployment** | Single binary (~8MB) | Cloud + self-host | Docker/Postgres | Docker/Postgres |\n| **Dependencies** | None (SQLite embedded) | Python + vector DB | Postgres + Python | Postgres + Go |\n| **MCP-Native** | ✅ 40 tools | ❌ Not MCP-native | ❌ Not MCP-native | ❌ Not MCP-native |\n| **Offline/Local** | ✅ Fully local | Cloud-dependent | Docker needed | Docker needed |\n| **Encryption** | AES-256-GCM ✅ | ❌ | ❌ | ❌ |\n| **Hybrid Search** | BM25 + Dense + RRF | Vector only | Vector only | Vector + Graph |\n| **Entity Lifecycle** | Decay + Promote + Archive | ❌ | ❌ | ❌ |\n| **Entity Graph** | Link + Traverse | ❌ | ❌ | ✅ |\n| **Journal Audit Trail** | ✅ Immutable | ❌ | ❌ | ❌ |\n| **State Management** | ✅ Key-value + TTL | ❌ | ❌ | ❌ |\n| **MCP Tools** | 40 | 5 | 8 | 0 |\n| **GitHub Stars** | ~20 | ~55K | ~15K | ~3K |\n| **License** | MIT | Apache 2.0 | Apache 2.0 | Apache 2.0 |\n\n[Full comparison: Mimir vs Mem0 →](docs/comparison/mimir-vs-mem0.md)\n[vs Letta →](docs/comparison/mimir-vs-letta.md)\n[vs Zep →](docs/comparison/mimir-vs-zep.md)\n\n### Stress Test: 100K Entities\n\nMimir handles production workloads on modest hardware:\n\n| Metric | Result |\n|---|---|\n| **100K entity insert** | 1.01s (98,732 entities/s) |\n| **FTS5 recall (10 results)** | 0.022s |\n| **Decay tick (100K entities)** | 1.317s (batched, transactional) |\n| **Memory (100K entities)** | ~85MB RSS |\n| **DB file size (100K)** | ~45MB (with FTS5 index) |\n\nRun it yourself: `cargo test stress_100k --release -- --ignored --nocapture`\n\n## Framework Integrations\n\nReady-to-use adapters that make Mimir the default memory backend for\npopular AI agent frameworks:\n\n| Framework | Integration | Type |\n|---|---|---|\n| [**LangGraph**](integrations/langgraph/) | `MimirStore` | `BaseStore` implementation |\n| [**CrewAI**](integrations/crewai/) | `MimirMemoryTool` | Agent tool |\n| [**AutoGen**](integrations/autogen/) | `MimirMemory` | `Memory` implementation |\n\nEach adapter:\n- Connects via MCP stdio subprocess (persistent session)\n- Maps the framework's memory interface to Mimir tools\n- Comes with a README quickstart (5 minutes to working)\n- Has passing tests with mocked MCP transport\n\nAny MCP-compatible framework works with Mimir directly. See\n[Awesome Mimir](awesome-mimir.md) for the full list.\n\n## 40 MCP Tools\n\n### Entity CRUD\n| Tool | Description |\n|---|---|\n| `mimir_remember` | Store/update entity. Idempotent by (category, key). |\n| `mimir_recall` | Search with FTS5/dense/hybrid modes, filters, stemming expansion. |\n| `mimir_recall_when` | Proactive just-in-time recall: surface entities whose `recall_when` triggers match. |\n| `mimir_get_entity` | Fetch one entity by ID with full `body_json`. |\n| `mimir_forget` | Soft-delete (archived=1). |\n\n### Search \u0026 RAG\n| Tool | Description |\n|---|---|\n| `mimir_ask` | RAG: recall context, query LLM, return grounded answer with sources. |\n| `mimir_embed` | Generate dense vectors via Ollama or OpenAI-compatible endpoint. |\n| `mimir_context` | Pre-formatted markdown block for session injection. |\n| `mimir_ingest` | Trigger connector syncs (GitHub, file watcher). |\n\n### Graph\n| Tool | Description |\n|---|---|\n| `mimir_link` | Create typed relationship links between entities. |\n| `mimir_unlink` | Remove entity links. |\n| `mimir_traverse` | Walk entity link graph up to configurable depth. |\n\n### Journal\n| Tool | Description |\n|---|---|\n| `mimir_journal` | Append structured event with actor attribution. |\n| `mimir_timeline` | Query journal by time range with filters. |\n\n### State\n| Tool | Description |\n|---|---|\n| `mimir_state_set` | Set key-value state with optional TTL. |\n| `mimir_state_get` | Get state value. Returns null if expired. |\n| `mimir_state_delete` | Delete state entry. |\n| `mimir_state_list` | List state keys, optionally filtered by prefix. |\n\n### Lifecycle\n| Tool | Description |\n|---|---|\n| `mimir_decay` | Recalculate Ebbinghaus decay scores (batched 1000-entity transactions). |\n| `mimir_prune` | Bulk archive by category, decay threshold, or age. |\n| `mimir_purge` | Permanently delete archived entities + VACUUM. Destructive. |\n| `mimir_cohere` | Autonomous coherence grooming pass — promote, decay, link, archive. |\n| `mimir_autocohere` | Full atomic grooming: cohere → decay → compact in one pass (supports dry-run). |\n| `mimir_compact` | Archive entities below decay threshold. |\n| `mimir_reindex` | Rebuild FTS5 search index from entities table. |\n\n### Quality\n| Tool | Description |\n|---|---|\n| `mimir_score` | Assign quality score (0.0-1.0). |\n| `mimir_conflicts` | Detect near-duplicate entities via trigram similarity. |\n| `mimir_correct` | Structured correction capture for learning from errors. |\n| `mimir_supersede` | Mark a new fact as superseding an old one (sets the old entity to `deprecated`). |\n\n### Vault \u0026 Federation\n| Tool | Description |\n|---|---|\n| `mimir_vault_export` | Export entities to .md files with YAML frontmatter. |\n| `mimir_vault_import` | Import from .md vault directory (idempotent). |\n| `mimir_federate` | Copy entities between workspaces. |\n| `mimir_share` | Share one entity (by category + key) into another workspace, preserving content. |\n| `mimir_workspace_list` | List all distinct entity categories. |\n\n### Metrics \u0026 Ops\n| Tool | Description |\n|---|---|\n| `mimir_stats` | Full DB statistics across all tables. |\n| `mimir_health` | Server and DB health check. |\n| `mimir_bench` | Performance benchmark tracking. |\n| `mimir_maintenance` | DB maintenance: dedup, orphan detection, VACUUM, FTS5 reindex (supports dry-run). |\n| `mimir_synthesize` | LLM session synthesis — extract lessons from transcripts. |\n| `mimir_migrate` | Migrate v0.1.x DB to current schema. |\n\n## CLI\n\n```bash\n# Server\nmimir serve --db /data/mimir.db\nmimir serve --web --port 8767 --encryption-key ~/.mimir/secret.key\nmimir serve --llm-endpoint http://localhost:11434/api/generate --llm-model llama3\nmimir serve --transport sse --port 8787 --mcp-token my-secret-token\n\n# Maintenance (operate directly on DB, no server needed)\nmimir stats          --db /data/mimir.db\nmimir forget         --db /data/mimir.db --category decision --key stale-choice --reason \"superseded\"\nmimir prune          --db /data/mimir.db --category junk --min-decay 0.1 --dry-run\nmimir purge          --db /data/mimir.db --dry-run\nmimir decay          --db /data/mimir.db\nmimir reindex        --db /data/mimir.db\nmimir vault-export   --db /data/mimir.db --vault-dir ./export/\nmimir vault-import   --db /data/mimir.db --vault-dir ./export/\n\n# Key management\nmimir keygen --key-file ~/.mimir/secret.key\n```\n\n### Flags\n\n| Flag | Description |\n|---|---|\n| `--db` | SQLite database path (default: `~/.mimir/data/mimir.db`) |\n| `--web` | Start web dashboard |\n| `--port` | Dashboard port (default: 8767) |\n| `--web-bind` | Dashboard bind address (default: 127.0.0.1) |\n| `--transport` | MCP transport: `stdio` (default), `sse`, or `http` |\n| `--mcp-token` | Bearer token for SSE/HTTP transport auth |\n| `--encryption-key` | AES-256-GCM key file path |\n| `--llm-endpoint` | LLM API endpoint for `mimir_ask` and embeddings |\n| `--llm-model` | LLM model name (default: llama3) |\n| `--llm-api-key` | API key for LLM endpoints (OpenAI, Azure, etc.) |\n| `--embedding-endpoint` | OpenAI-compatible embedding endpoint |\n| `--connectors-config` | Path to connectors.yaml |\n\n## Features\n\n### Hybrid Search\n- **Offline dense search out of the box** — a quantized all-MiniLM-L6-v2 model is\n  compiled into the binary, so semantic recall works with **zero config and zero\n  network** (no Ollama, no API key, no model download). Build a lean binary\n  without it via `cargo build --no-default-features`.\n- **FTS5 keyword search** with LIKE fallback and Porter stemming expansion\n- **Dense vector search** via cosine similarity on stored embeddings\n- **Reciprocal Rank Fusion (RRF)** — combine keyword + vector results\n- **Query expansion** — automatic stemming variants for broader recall\n\n### Memory Lifecycle\n- **Ebbinghaus decay** — memories naturally fade unless retrieved (refresh on access)\n- **Layer promotion** — buffer → working → core based on access frequency\n- **Automatic archival** — stale entities archive; purge to permanently delete + VACUUM\n- **Always-on entities** — pin critical memories for unconditional session injection\n\n### RAG \u0026 Embeddings\n- **`mimir_ask`** — natural language Q\u0026A over stored memories via any LLM (Ollama, OpenAI, etc.)\n- **`mimir_embed`** — generate and store dense vectors via Ollama or OpenAI-compatible `/v1/embeddings`\n- Supports single-entity and batch-category embedding\n\n### Encryption\n- **AES-256-GCM** transparent encryption for entity `body_json`\n- Opt-in via `--encryption-key` flag\n- `mimir keygen` subcommand for key generation\n- FTS5 index stays plaintext for search\n\n### Web Dashboard\n- Built-in Axum HTTP server (`mimir serve --web --port 8767`)\n- Dark-themed dashboard with search, entity table, vis.js graph, timeline\n- Default bind: `127.0.0.1` (use `--web-bind 0.0.0.0` to expose)\n- Separate SQLite connection in WAL mode for concurrent reads\n\n### External Connectors\n- **GitHub issues connector** — ingest issues/PRs by repo, rate-limit aware\n- **File watcher** — scan directories for `.md`/`.txt`/`.json` files with content-hash dedup\n- YAML-based connector config via `--connectors-config`\n\n### Multi-Transport\n- **stdio** (default) — zero-config, works with any MCP host\n- **SSE** — Server-Sent Events for HTTP-based MCP clients\n- **HTTP** — REST-style MCP endpoint\n- **Bearer token auth** — for SSE/HTTP transports\n\n## Perseus Integration\n\nMimir is the default memory backend for [Perseus](https://perseus.observer):\n\n```yaml\nmimir:\n  enabled: true\n  transport: \"stdio\"\n  command: [\"mimir\", \"serve\", \"--db\", \"~/.mimir/data/mimir.db\"]\n  timeout_s: 30.0\n  merge_strategy: \"local_first\"\n  fallback_to_local: true\n  context_categories: [\"decision\", \"architecture\", \"convention\"]\n  context_limit: 10\n```\n\n## Government \u0026 Federal Procurement\n\nMimir is built for government deployment from the ground up.\n\n| Capability | Status |\n|---|---|\n| **License** | MIT — no copyleft, no GPL/AGPL |\n| **SBOM** | [Published](./docs/SBOM.md) — NTIA minimum elements |\n| **Air-gapped** | Fully offline — no telemetry, no API calls, no network by default |\n| **Encryption at rest** | AES-256-GCM, transparent, opt-in |\n| **Audit trail** | Immutable journal with chain-of-custody |\n| **Supply chain** | SLSA attestation in progress |\n\n**For federal buyers:** See [docs/federal-buyers.md](./docs/federal-buyers.md) for\nprocurement information, compliance status, and deployment models (air-gapped,\non-premises, classified environments).\n\nPerseus Computing LLC is a US-owned small business. SAM.gov registration in progress.\nNAICS: 541715, 541511, 541512.\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperseus-computing-llc%2Fmimir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperseus-computing-llc%2Fmimir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperseus-computing-llc%2Fmimir/lists"}