Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

crewai-mimir

Long-term, local-first, encrypted memory for CrewAI agents — as explicit, agent-callable tools.

crewai-mimir wraps Mimir (an open-source, MIT-licensed persistent memory engine with 40+ MCP tools, FTS5 + dense hybrid search, and optional AES-256-GCM encryption) as standard CrewAI BaseTools. Your agents get two first-class actions they can deliberately call:

  • mimir_remember — persist a fact, decision, insight, or note that survives across runs.
  • mimir_recall — search what was stored earlier.

Why tools (and not CrewAI's built-in memory)?

CrewAI ships implicit memory (auto-captured short/long-term memory) and a generic MCP adapter. crewai-mimir is deliberately different: it exposes explicit, controllable memory the agent chooses to invoke, with a typed args_schema so the LLM sees exactly what each call needs. Use it when you want the agent to reason about what to remember and when to recall — backed by a durable, encryptable store you own on disk.

Prerequisite: the mimir binary

The tools talk to a local mimir process over JSON-RPC (MCP stdio). You need the mimir binary on your PATH (or pass an absolute path).

Install it from the Mimir repository (build from source, or grab a release). Verify:

mimir --version

The tools spawn mimir serve --db <db_path> for you — you do not start it manually.

Install

pip install crewai-mimir

(or, from source: pip install -e ".[test]")

Quickstart

from crewai import Agent, Crew, Task
from crewai_mimir import build_mimir_tools

# One shared mimir process backs both tools.
memory_tools = build_mimir_tools(db_path="~/.mimir/data/crew.db")

researcher = Agent(
    role="Research Analyst",
    goal="Answer questions, remembering durable facts for next time.",
    backstory="You persist key findings to long-term memory and check it before answering.",
    tools=memory_tools,
    verbose=True,
)

remember_task = Task(
    description="Remember that the project deadline is 2026-08-15. Store it under key 'project-deadline'.",
    expected_output="Confirmation the deadline was stored.",
    agent=researcher,
)

recall_task = Task(
    description="What is the project deadline? Check your long-term memory.",
    expected_output="The project deadline date.",
    agent=researcher,
)

crew = Crew(agents=[researcher], tasks=[remember_task, recall_task])
result = crew.kickoff()
print(result)

Using the tool classes directly

from crewai_mimir import MimirRememberTool, MimirRecallTool, MimirClient

client = MimirClient(db_path="~/.mimir/data/crew.db")          # one shared process
remember = MimirRememberTool(client=client)
recall = MimirRecallTool(client=client)

agent = Agent(..., tools=[remember, recall])

If you omit client, each tool lazily starts its own mimir serve on first use (configurable via db_path and mimir_binary).

Encryption at rest

tools = build_mimir_tools(
    db_path="~/.mimir/data/crew.db",
    encryption_key="~/.mimir/key.b64",   # base64-encoded 32-byte AES-256-GCM key
)

Tool reference

Tool Required args Optional args
mimir_remember content, key category (default insight), tags, importance (0.0–1.0)
mimir_recall query limit (default 5), category

Both return a JSON string. mimir_recall returns {"query": ..., "results": [...]}.

How it works

MimirClient spawns mimir serve --db <path>, performs the MCP initialize handshake, and issues id-correlated JSON-RPC requests with a per-call timeout over stdin/stdout. The client core is adapted from the proven adk-mimir-memory package.

Development

pip install -e ".[test]"
pytest -q

Unit tests mock the mimir subprocess, so they run with no binary installed. tests/test_smoke_real_binary.py runs an end-to-end round-trip against a real mimir binary when one is found on PATH (otherwise it is skipped).

License

MIT © 2026 Perseus Computing LLC. Mimir is MIT-licensed by Perseus Computing LLC.

Metadata

Release files for crewai-mimir 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crewai-mimir 0.1.0
File Size Uploaded
crewai_mimir-0.1.0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crewai-mimir 0.1.0
File Interpreter ABI Platform
crewai_mimir-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / crewai_mimir-0.1.0.tar.gz

Download URL crewai_mimir-0.1.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
29950c594f998b1ab5ed6e92ced30def344a58da61b234782024c6fd2448e7e5
BLAKE2b-256 checksum
How to use checksums
949d15c1c98a7b4164dea8501ccea06d90c07db04d48c90b604e8fc23c3ef704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.

Transparency log

Release files / crewai_mimir-0.1.0-py3-none-any.whl

Download URL crewai_mimir-0.1.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0aec85b86d7e5c8213058079d092cd93f070bd8bbdd8cc8675c436e26e26c5d
BLAKE2b-256 checksum
How to use checksums
ce4e9c10c962050d9cdc0c60abc3239392d277606034e926c7dbb6d4352c99f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page