Skip to main content

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:

  1. Constructor arguments
  2. Environment variables: MEMIND_BASE_URL, MEMIND_API_TOKEN
  3. Defaults: connect timeout 5s, read timeout 30s, max retries 2

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


Download files

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

Source Distribution

memind-0.2.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

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

memind-0.2.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

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

Hashes for memind-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c3a8e603e3691cd090e09409f81c45d60c0a1a821d7b5d6f0cedf19a972f58f2
MD5 853f48314688d85b42242b63f8011c50
BLAKE2b-256 0ddccdd61055659905c2d749633baadb626654b8cadf61e7c82ea26836ce74e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for memind-0.2.0.tar.gz:

Publisher: release-python-client.yml on openmemind/memind

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

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

Hashes for memind-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b85a01ae8dde670bcf271cd0ccd1b7059e43e68ec29350dad1bc4400f1ee80f
MD5 4c89380380bede9dfce316d335fb5cc2
BLAKE2b-256 45cf9fe75cf4634e19874708acc7dde6c9a188003e646fcd460a23adfd338366

See more details on using hashes here.

Provenance

The following attestation bundles were made for memind-0.2.0-py3-none-any.whl:

Publisher: release-python-client.yml on openmemind/memind

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