Skip to main content

Perseus Vault long-term memory as CrewAI tools — local-first, encrypted, persistent memory the agent can explicitly call.

Project description

crewai-perseus-vault

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

crewai-perseus-vault wraps Perseus Vault (formerly "Mimir"/"Mneme" — 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:

  • perseus_vault_remember — persist a fact, decision, insight, or note that survives across runs.
  • perseus_vault_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-perseus-vault 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 perseus-vault binary

The tools talk to a local perseus-vault process over JSON-RPC (MCP stdio). You need the perseus-vault binary on your PATH (or pass an absolute path). (Older installs may expose a mimir compat symlink, but perseus-vault is canonical and always present.)

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

perseus-vault --version

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

Install

pip install crewai-perseus-vault

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

Quickstart

from crewai import Agent, Crew, Task
from crewai_perseus_vault import build_perseus_vault_tools

# One shared perseus-vault process backs both tools.
memory_tools = build_perseus_vault_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_perseus_vault import (
    PerseusVaultRememberTool,
    PerseusVaultRecallTool,
    PerseusVaultClient,
)

client = PerseusVaultClient(db_path="~/.mimir/data/crew.db")   # one shared process
remember = PerseusVaultRememberTool(client=client)
recall = PerseusVaultRecallTool(client=client)

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

If you omit client, each tool lazily starts its own perseus-vault serve on first use (configurable via db_path and perseus_vault_binary).

Encryption at rest

tools = build_perseus_vault_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
perseus_vault_remember content, key category (default insight), tags, importance (0.0–1.0)
perseus_vault_recall query limit (default 5), category

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

How it works

PerseusVaultClient spawns perseus-vault 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 perseus-vault subprocess, so they run with no binary installed. tests/test_smoke_real_binary.py runs an end-to-end round-trip against a real perseus-vault binary when one is found on PATH (otherwise it is skipped).

License

MIT © 2026 Perseus Computing LLC. Perseus Vault (formerly Mimir/Mneme) is MIT-licensed by Perseus Computing LLC.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_perseus_vault-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_perseus_vault-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file crewai_perseus_vault-0.1.0.tar.gz.

File metadata

  • Download URL: crewai_perseus_vault-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crewai_perseus_vault-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8443aeabbe7d8565c6a417a066760d22c12c7234a6c61c58202ac2b0313f89cf
MD5 8c0c0ec704b2532b1b6c9bd08bcaae75
BLAKE2b-256 2fae3038bcbefd716cd4d35f5ed074e5c06093a14ff03b9ed98b1481cda9641f

See more details on using hashes here.

Provenance

The following attestation bundles were made for crewai_perseus_vault-0.1.0.tar.gz:

Publisher: publish.yml on Perseus-Computing-LLC/crewai-mimir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file crewai_perseus_vault-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_perseus_vault-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea6b39194070a0fa71c91e2c133cf5cef1c568b2bae8a0e408b7efd75d16339
MD5 3bf102153fa2467c7147c73dccb20707
BLAKE2b-256 84a862ce2721bfad79b49340f89b2ddbbfd2744da69fdea1a26a91c2ebf47aa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for crewai_perseus_vault-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Perseus-Computing-LLC/crewai-mimir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page