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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0c239ba68b46daaca4520709a6484946e684a8e68b1a9488b45b7afcdd36da8
|
|
| MD5 |
b378397727715c5a49ad111979fc8b35
|
|
| BLAKE2b-256 |
bf5de577eb1ac0a77f751513e6d0613bf3bc5a424bcd99c707fd00a835130e46
|
Provenance
The following attestation bundles were made for pymentisdb-0.9.0.tar.gz:
Publisher:
publish.yml on CloudLLM-ai/mentisdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymentisdb-0.9.0.tar.gz -
Subject digest:
e0c239ba68b46daaca4520709a6484946e684a8e68b1a9488b45b7afcdd36da8 - Sigstore transparency entry: 1296598007
- Sigstore integration time:
-
Permalink:
CloudLLM-ai/mentisdb@47670484722ac572fdcf12d6915d5d08a06407d7 -
Branch / Tag:
refs/tags/pymentisdb-v0.9.0 - Owner: https://github.com/CloudLLM-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47670484722ac572fdcf12d6915d5d08a06407d7 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5410789ecbd7323df9ddfeaec9bf722bce03c65681efb2b84dead27fd9ac1e6
|
|
| MD5 |
0249b1c6d3a6dd210d29644076c17800
|
|
| BLAKE2b-256 |
d71e8e0ff73509a702a8cf37e0a7c68d0900c15c3e4214a64f1994b4b6c83751
|
Provenance
The following attestation bundles were made for pymentisdb-0.9.0-py3-none-any.whl:
Publisher:
publish.yml on CloudLLM-ai/mentisdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymentisdb-0.9.0-py3-none-any.whl -
Subject digest:
c5410789ecbd7323df9ddfeaec9bf722bce03c65681efb2b84dead27fd9ac1e6 - Sigstore transparency entry: 1296598074
- Sigstore integration time:
-
Permalink:
CloudLLM-ai/mentisdb@47670484722ac572fdcf12d6915d5d08a06407d7 -
Branch / Tag:
refs/tags/pymentisdb-v0.9.0 - Owner: https://github.com/CloudLLM-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47670484722ac572fdcf12d6915d5d08a06407d7 -
Trigger Event:
push
-
Statement type: