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.43.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 mentedb-crewai 0.43.0
File Size Uploaded Provenance
mentedb_crewai-0.43.0.tar.gz 2.9 kB With provenance Details

Built distribution (wheel)

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

Total release size: 7.0 kB

Release files / mentedb_crewai-0.43.0.tar.gz

Download URL mentedb_crewai-0.43.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6879b67620e8270f0ae5ac3a12ec7eaa1bee23b9784b11ab899758d34ba6f96a
BLAKE2b-256 checksum
How to use checksums
f9525b526c373f4c54b2ecfe97d4319ab76fce49449d07578fa9a43167276744
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

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

Download URL mentedb_crewai-0.43.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35d7dcedc151c4be96ef7e37da6548f0164a0b2d7c05324bd2836f39f3a27ead
BLAKE2b-256 checksum
How to use checksums
9cd5374dfc114606447caccad52bdec951c3dd5bc907a4efc6f3479c7daefe7d
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

Security for mentedb-crewai 0.43.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mentedb_crewai-0.43.0.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 Oct 19, 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.

Release history Release notifications | RSS feed

This release

0.43.0 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