Skip to main content

mentedb-crewai

MenteDB helpers for CrewAI and AutoGen style multi agent setups: a memory class that stores and searches team memories in MenteDB, and a tool class that runs MQL queries.

Installation

pip install mentedb-crewai

Status

MenteDBCrewMemory and MenteDBTool are plain Python classes. They do not subclass CrewAI's memory or BaseTool types, so CrewAI rejects them when they are passed directly as Agent(memory=...) or Agent(tools=[...]) (checked with CrewAI 1.15). Call them from your own code, or wrap them in a CrewAI tool yourself, as shown below.

Only one MenteDB instance can open a data directory at a time. Give every MenteDBCrewMemory and MenteDBTool its own data_dir, or share one object between agents.

Components

MenteDBCrewMemory

Stores memories tagged with a space name (and the optional agent_name) and searches within that space.

from mentedb_crewai import MenteDBCrewMemory

memory = MenteDBCrewMemory(data_dir="./crew-memory", space="dev-team")

# Store context from agent work
memory.store("The team decided to use PostgreSQL for the main database.")

# Search for relevant memories in this space
results = memory.search("database decision", k=5)
# -> [{"content": ..., "score": ..., "id": ..., "memory_type": ...}]

# Text of memories matching the task (MQL recall, up to 10 memories)
context = memory.get_context("Plan the database migration")

Memory is stored on disk, so a later run that opens the same data_dir can search what earlier runs stored.

MenteDBTool

Runs an MQL (Mente Query Language) query and returns the assembled text.

from mentedb_crewai import MenteDBTool

memory_tool = MenteDBTool(data_dir="./tool-memory")
print(memory_tool.run("RECALL similar(\"database decision\") LIMIT 5"))

Using it from a CrewAI agent

Wrap the call in a CrewAI tool:

from crewai import Agent
from crewai.tools import tool
from mentedb_crewai import MenteDBCrewMemory

memory = MenteDBCrewMemory(data_dir="./crew-memory", space="research-team")

@tool("Team memory search")
def team_memory(query: str) -> str:
    """Search what the team already knows about a topic."""
    return "\n".join(r["content"] for r in memory.search(query, k=5))

analyst = Agent(
    role="Analyst",
    goal="Analyze data using historical context",
    backstory="Knows the team's past decisions.",
    tools=[team_memory],
)

Configuration

Parameter Default Description
data_dir ./mentedb-data Path to the MenteDB data directory
space default Tag used to group and filter memories (MenteDBCrewMemory)
agent_name None Extra tag added to stored memories (MenteDBCrewMemory)

get_context accepts a token_budget argument, but it is currently ignored.

License

Apache 2.0

Metadata

Release files for mentedb-crewai 0.47.1

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

Source distribution (sdist)

Source distribution for mentedb-crewai 0.47.1
File Size Uploaded Provenance Actions
mentedb_crewai-0.47.1.tar.gz 2.9 kB With provenance Details for mentedb_crewai-0.47.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mentedb-crewai 0.47.1
File Interpreter ABI Platform Actions
mentedb_crewai-0.47.1-py3-none-any.whl Python 3 none any Details for mentedb_crewai-0.47.1-py3-none-any.whl

Total release size: 7.0 kB

Release files / mentedb_crewai-0.47.1.tar.gz

Download URL mentedb_crewai-0.47.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e91feb2d6698ea9e55e8fa4e796fe29c8c60747c9ab4906c7b1a887abf7003ba
BLAKE2b-256 checksum
How to use checksums
749b187ebea3742bb8c61504708fef86dd9075f48c4f0b6641bf747ac159e4f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

Release files / mentedb_crewai-0.47.1-py3-none-any.whl

Download URL mentedb_crewai-0.47.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16864db3dc0c2478bca18cfa26d640dbc174b63e20d59dc34225729f02f051cd
BLAKE2b-256 checksum
How to use checksums
0fc64bdb0e745158d36002a84f7ce27d3a55f8db03de7c8871cbe80653667490
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

Security for mentedb-crewai 0.47.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mentedb_crewai-0.47.1.tar.gz

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 Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.47.1 This release

2 release files Full provenance

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