Official Python client for the Memind memory engine API
Project description
Memind Python Client
Official Python client for the Memind memory engine API.
Installation
pip install memind
Synchronous Usage
from memind import MemindClient, Message, Strategy
from memind.types import ConversationContent
with MemindClient(base_url="http://localhost:8080") as client:
health = client.health()
client.memory.extract(
user_id="user-1",
agent_id="agent-1",
raw_content=ConversationContent(messages=[Message.user("I like coffee")]),
)
client.memory.commit(user_id="user-1", agent_id="agent-1")
result = client.memory.retrieve(
user_id="user-1",
agent_id="agent-1",
query="What does the user like?",
strategy=Strategy.SIMPLE,
trace=True,
)
Asynchronous Usage
from memind import AsyncMemindClient, Strategy
async with AsyncMemindClient(base_url="http://localhost:8080") as client:
result = await client.memory.retrieve(
user_id="user-1",
agent_id="agent-1",
query="What does the user like?",
strategy=Strategy.DEEP,
)
Configuration
Configuration precedence:
- Constructor arguments
- Environment variables:
MEMIND_BASE_URL,MEMIND_API_TOKEN - Defaults: connect timeout
5s, read timeout30s, max retries2
base_url is required. api_token is optional; when omitted no Authorization header is sent.
Development
pip install -e ".[dev]"
ruff format .
ruff check .
mypy src
pytest --cov=memind --cov-fail-under=90 -q
python -m build
twine check dist/*
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 memind-0.2.0.tar.gz.
File metadata
- Download URL: memind-0.2.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3a8e603e3691cd090e09409f81c45d60c0a1a821d7b5d6f0cedf19a972f58f2
|
|
| MD5 |
853f48314688d85b42242b63f8011c50
|
|
| BLAKE2b-256 |
0ddccdd61055659905c2d749633baadb626654b8cadf61e7c82ea26836ce74e3
|
Provenance
The following attestation bundles were made for memind-0.2.0.tar.gz:
Publisher:
release-python-client.yml on openmemind/memind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memind-0.2.0.tar.gz -
Subject digest:
c3a8e603e3691cd090e09409f81c45d60c0a1a821d7b5d6f0cedf19a972f58f2 - Sigstore transparency entry: 1496607936
- Sigstore integration time:
-
Permalink:
openmemind/memind@a02084c84b396eaa59305caf3fb0339c16aa071f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/openmemind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python-client.yml@a02084c84b396eaa59305caf3fb0339c16aa071f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file memind-0.2.0-py3-none-any.whl.
File metadata
- Download URL: memind-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.9 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 |
9b85a01ae8dde670bcf271cd0ccd1b7059e43e68ec29350dad1bc4400f1ee80f
|
|
| MD5 |
4c89380380bede9dfce316d335fb5cc2
|
|
| BLAKE2b-256 |
45cf9fe75cf4634e19874708acc7dde6c9a188003e646fcd460a23adfd338366
|
Provenance
The following attestation bundles were made for memind-0.2.0-py3-none-any.whl:
Publisher:
release-python-client.yml on openmemind/memind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memind-0.2.0-py3-none-any.whl -
Subject digest:
9b85a01ae8dde670bcf271cd0ccd1b7059e43e68ec29350dad1bc4400f1ee80f - Sigstore transparency entry: 1496608463
- Sigstore integration time:
-
Permalink:
openmemind/memind@a02084c84b396eaa59305caf3fb0339c16aa071f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/openmemind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python-client.yml@a02084c84b396eaa59305caf3fb0339c16aa071f -
Trigger Event:
workflow_dispatch
-
Statement type: