Skip to main content

pymentisdb

Official Python client for MentisDB — a durable semantic memory engine for AI agents.

Installation

pip install pymentisdb

With LangChain integration:

pip install pymentisdb[langchain]

Quick Start

from pymentisdb import MentisDbClient, ThoughtType

client = MentisDbClient()

# Append a thought
thought = client.append_thought(
    thought_type=ThoughtType.INSIGHT,
    content="Rate limiting is the real bottleneck."
)
print(f"Appended: {thought.id}")

# Semantic search
results = client.ranked_search(text="performance optimization")
for hit in results.results:
    print(f"[{hit.score.total:.3f}] {hit.thought.content}")

# Context bundles
bundles = client.context_bundles(text="cache invalidation", limit=5)

LangChain Integration

from pymentisdb import MentisDbMemory
from langchain_openai import ChatOpenAI

memory = MentisDbMemory(
    chain_key="my-project",
    agent_id="assistant"
)

llm = ChatOpenAI(model="gpt-4")
chain = llm.with_memory(memory)

Configuration

# Remote server
client = MentisDbClient(base_url="http://my.mentisdb.com:9472")

Full Documentation

Release files for pymentisdb 0.9.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 pymentisdb 0.9.0
File Size Uploaded
pymentisdb-0.9.0.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymentisdb 0.9.0
File Interpreter ABI Platform
pymentisdb-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.3 kB

Release files / pymentisdb-0.9.0.tar.gz

Download URL pymentisdb-0.9.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e0c239ba68b46daaca4520709a6484946e684a8e68b1a9488b45b7afcdd36da8
BLAKE2b-256 checksum
How to use checksums
bf5de577eb1ac0a77f751513e6d0613bf3bc5a424bcd99c707fd00a835130e46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 14, 2026.

Transparency log

Release files / pymentisdb-0.9.0-py3-none-any.whl

Download URL pymentisdb-0.9.0-py3-none-any.whl
Size 2.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5410789ecbd7323df9ddfeaec9bf722bce03c65681efb2b84dead27fd9ac1e6
BLAKE2b-256 checksum
How to use checksums
d71e8e0ff73509a702a8cf37e0a7c68d0900c15c3e4214a64f1994b4b6c83751
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

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