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.42.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mentedb_crewai-0.42.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mentedb_crewai-0.42.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / mentedb_crewai-0.42.0.tar.gz
| Download URL | mentedb_crewai-0.42.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e09c902e59e19b105098e8eaf21f9652135dbc9efea9302e706cdb9effbf3322
|
|
BLAKE2b-256 checksum How to use checksums |
0729f7cc52cd8baf48222b11f09fc6403a8c4a81afc541781f4979255c0e7de6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / mentedb_crewai-0.42.0-py3-none-any.whl
| Download URL | mentedb_crewai-0.42.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f77070a63f61cee67c87e4cc86bd99a42c5a30927db47dfa5e2fd4bb72af059a
|
|
BLAKE2b-256 checksum How to use checksums |
cd7d7d72e37949237eb74051e1bd07fe87cb96bf570004b6a582323286f8be0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency log