Feature request: Mimir as persistent cross-session memory backend (refs #6050, #6159)
Summary
Proposal: add Mimir as a memory backend for CrewAI, addressing feature request #6050 ("persistent cross-session memory via Agent Magnet").
What Mimir brings to CrewAI
Mimir is an open-source (MIT) persistent memory engine with 23 MCP tools. It's a single Rust binary (~8MB) with embedded SQLite — no Docker, Postgres, or cloud dependencies.
Key capabilities relevant to CrewAI:
- Cross-session persistence: agents remember across crew kickoffs, not just within a flow
- Hybrid search: BM25 (FTS5) + dense embeddings + RRF fusion for accurate recall
- Confidence decay: memories naturally decay unless reinforced
- Encryption: AES-256-GCM at rest for production deployments
- MCP-native: 23 tools accessible directly from CrewAI agents via MCP
Integration path
CrewAI has a memory abstraction in src/crewai/memory/. A Mimir backend would:
- Implement the memory storage interface (like the existing Qdrant/Chroma backends)
- Provide
remember(),recall(),search()via Mimir's MCP tools or Python client - Enable cross-crew and cross-session memory by scoping on
app_name/user_id
Why this helps CrewAI
- #6050 explicitly asks for persistent cross-session memory — Mimir is purpose-built for this
- #6159 asks for behavioral memory (capturing agent action patterns) — Mimir's confidence decay and entity categorization are designed for exactly this
- #5057 flags memory prompt injection — Mimir's encryption and structured entity types prevent injection surfaces
- No cloud lock-in — runs alongside CrewAI locally
Happy to contribute a PR implementing the integration.
From building agent memory infrastructure, a few things matter more than the specific storage engine: cross-agent isolation (each agent needs its own memory space but may need shared namespaces for coordination), decay-weighted importance scoring (without it, old irrelevant context crowds out useful recent information), and hybrid retrieval combining keyword and semantic search. We settled on BM25 + vector similarity fusion, which consistently outperforms either alone in our LoCoMo benchmarks across 1,540 conversational queries. The persistent cross-session requirement is the right call — agents that forget between crew kickoffs are fundamentally limited. Our full deploy stack runs as a single binary with Docker: https://github.com/dakera-ai/dakera-deploy/blob/main/docker/docker-compose.yml
Hey team! I would love to work on this feature request and implement the Mimir integration for the unified memory system. Please assign this issue to me!
@Jacopos311 that's great — thanks for offering to pick this up! A couple of pointers so you don't start from zero:
- There's already a published adapter,
crewai-mimir(pip install crewai-mimir), that wraps Mimir as a CrewAI storage backend via the MCP tools. It's a solid starting point / reference for the storage-interface wiring — happy to hand off context on it. - Canonical repo is Perseus-Computing-LLC/mimir (the
tcconnally/mimirlink and "23 tools" in the issue body are stale — current is 43 MCP tools, v2.7.0).
The most useful next step is probably aligning with the maintainers on whether this lands as a first-party backend in src/crewai/memory/ or stays an external package, since that shapes the interface. I'm glad to review PRs, answer Mimir-side questions, or pair on the integration.
@ferhimedamine — agreed on decay-weighted scoring + BM25/vector fusion; Mimir does exactly that (FTS5 + dense embeddings + RRF), so it should slot into those requirements well.
Okay, thanks!
For CrewAI, I’d make the memory backend contract explicit around scope and authority.
A crew can have several memory lanes:
agent_private_memory = local observations / tool history
crew_memory = shared working knowledge for one crew
project_memory = durable decisions and constraints
user_memory = cross-project preferences, carefully promoted
Those should not all be recalled or written the same way.
Given the prompt-injection concerns in #5057, I’d also avoid treating recalled memory as instruction by default. A memory record should carry metadata like:
memory_type: observation | inference | verified_fact | decision | directive
source: tool | user | agent | file | external
status: candidate | accepted | superseded | rejected
last_confirmed_at
Then CrewAI can render memory as prior context, evidence, or constraint depending on type and status.
The important distinction is:
persistent memory != durable authority
I’ve been exploring a similar Personal AI OS / Memory Vault pattern: raw traces and agent observations are useful, but durable memory needs scope, provenance, and promotion rules.
Refs:
- https://github.com/hegu-1/personal-memory-vault-starter
- https://github.com/hegu-1/personal-ai-os
Reliability note
Production automation failures usually reduce to a contract issue before a model/prompt issue:
- Success criteria — durable artifact id (message/booking/row), not only node green
- Side-effect before complete — never blind-retry without an idempotency key on the business object
- Tool vs path split — external action can succeed while the node/agent path still errors (silent-green / false-red)
If you have one failing execution + expected vs actual, reply with stack/version and I will send a free root-cause checklist.
Saw the proposal for Mimir as a persistent backend for CrewAI. I have experience building pluggable, high-performance memory layers.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.