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.42.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.42.1
File Size Uploaded Provenance
mentedb_crewai-0.42.1.tar.gz 2.9 kB With provenance Details

Built distribution (wheel)

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

Total release size: 7.0 kB

Release files / mentedb_crewai-0.42.1.tar.gz

Download URL mentedb_crewai-0.42.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ca716c3b42e080d74df39ecf084c91127b976145c14d7bd6575a481deb0064d8
BLAKE2b-256 checksum
How to use checksums
8678a71ae9ff826c09f459816b0b5415a7339efbbb0e5323ce91d12ecec1b34c
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.42.1-py3-none-any.whl

Download URL mentedb_crewai-0.42.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a38014cc6bc063feed9e3cae3e493a2cd7c435f9af796633586ddce71d2911a
BLAKE2b-256 checksum
How to use checksums
5d8b544bbef9eeb91b6a69806ca7fabe028f8220cec69f6ae4d5fb5c5647801d
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.42.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

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

Select from 2 files

Attestation for mentedb_crewai-0.42.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 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.42.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