Skip to main content

Official Python SDK for Memyx — governed shared memory for AI agent fleets (multi-agent, multi-tenant, MCP-native).

Project description

memyx-client

Official Python SDK for Memyxgoverned shared memory for AI agent fleets (multi-agent, multi-tenant, MCP-native).

Your application depends on this SDK, never on raw HTTP — a stable, versioned surface (the anti-corruption layer) so the engine can evolve without breaking you. Point it at a managed (https://memyx.app) or self-hosted (http://localhost:8000) deployment.

Install

pip install memyx-client

Requires Python 3.9+.

Quickstart

from memyx_client import Memyx

mc = Memyx("mc_xxx", tenant_id="my-team", agent_id="my-agent")

# Write a memory — enriched server-side with type, title, entities, importance.
m = mc.write("Q3 revenue target is $4M, set on 2026-04-15.", memory_type="fact")

# Recall — an LLM-synthesized context brief plus the supporting memories.
brief = mc.recall("Q3 revenue target")
print(brief.summary)

# RAG knowledge base — documents live in named collections.
mc.doc.put("kb", "faq-1", {"summary": "Support hours", "content": "Mon–Fri 9–6"})

# Governance — load the tenant's keystones (rules) at agent-session start.
for k in mc.keystones():
    print(k.title, "—", k.content)

Self-hosted? Pass base_url:

mc = Memyx("standalone", tenant_id="default", base_url="http://localhost:8000")

The v1 surface

Frozen, semver-versioned. Eight operation groups, identical in the Python and TypeScript SDKs:

Group Methods
write write(content, ...), write_batch(items, ...)
recall / search recall(query, ...), search(query, ...)
list list(...) — cursor-paginated
manage manage.read/update/transition/delete(memory_id, ...)
doc (RAG) doc.put/get/delete/list(collection, ...), doc.collections()
entities entity_get(entity_id)
keystones keystones(...)
stats stats()

Plus mcp_config(...) — the "connect in 30 seconds" helper that emits the MCP config block for Claude/Cursor and other AI clients.

Robust by default

  • Typed errors: AuthError, TenantIsolationError, ValidationError, QuotaExceeded, NotFoundError, ConflictError, ServerError, and MemyxTransportError when the engine is unreachable (never a raw socket error).
  • Retries with backoff on idempotent operations only — writes carry an auto-generated idempotency key so a retry replays instead of duplicating.
  • Every result exposes the full API payload on .raw.
from memyx_client import ConflictError

try:
    mc.write(inbound_message)          # e.g. a WhatsApp webhook
except ConflictError:
    pass  # duplicate (redelivery) — already recorded, idempotent

Docs

Credentials, scopes, and the full API surface: https://memyx.app/docs. Production fleets should use per-agent keys.

License

Apache-2.0 © 2026 Memyx (Rubén Bolívar)

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

memyx_client-1.0.0rc1.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

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

memyx_client-1.0.0rc1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file memyx_client-1.0.0rc1.tar.gz.

File metadata

  • Download URL: memyx_client-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for memyx_client-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 00a59043dc8abce09e0a543612e082ce0a929687a2aca486075c4d29982f4b3b
MD5 c478203c80ea0dad20af087b42e6cda8
BLAKE2b-256 ed4a73fcfce8b8f0762ad73074626b33a6d2e5e32013918cadb843864bc3b6c7

See more details on using hashes here.

File details

Details for the file memyx_client-1.0.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for memyx_client-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 5dacbae3161989ebeb03ae137f0567cdf39f09069b5bff2ff0f93802ee150a8b
MD5 a858cdd56163df9804087cc39505b8c5
BLAKE2b-256 3e4df69b0d228a1718dc59e3e34bf8ca178b2fb2b0a3f6e0bae6e6e618c1b5f7

See more details on using hashes here.

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