Skip to main content

Python client for MentisDB - semantic hash-chained memory for agents

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymentisdb-0.9.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymentisdb-0.9.0-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file pymentisdb-0.9.0.tar.gz.

File metadata

  • Download URL: pymentisdb-0.9.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pymentisdb-0.9.0.tar.gz
Algorithm Hash digest
SHA256 e0c239ba68b46daaca4520709a6484946e684a8e68b1a9488b45b7afcdd36da8
MD5 b378397727715c5a49ad111979fc8b35
BLAKE2b-256 bf5de577eb1ac0a77f751513e6d0613bf3bc5a424bcd99c707fd00a835130e46

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymentisdb-0.9.0.tar.gz:

Publisher: publish.yml on CloudLLM-ai/mentisdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymentisdb-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: pymentisdb-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pymentisdb-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5410789ecbd7323df9ddfeaec9bf722bce03c65681efb2b84dead27fd9ac1e6
MD5 0249b1c6d3a6dd210d29644076c17800
BLAKE2b-256 d71e8e0ff73509a702a8cf37e0a7c68d0900c15c3e4214a64f1994b4b6c83751

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymentisdb-0.9.0-py3-none-any.whl:

Publisher: publish.yml on CloudLLM-ai/mentisdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page