Skip to main content

MayaMemo — Python SDK

Zero-dependency Python client for the MayaMemo API: projects, memories (with tags), semantic search, the context compiler, checkpoints and cross-agent resume.

# from the repo
pip install -e sdk/python        # or: pip install -e "sdk/python[langchain]"

Quickstart

from mayamemo import MayaMemo

client = MayaMemo(api_key="mm_sk_...", api_url="http://localhost:4000")

project = client.create_project("my-app")

client.add_memory(
    project["id"],
    "Checkout retries go through an idempotency table keyed by cart_id + attempt",
    type="decision",
    tags=["checkout", "billing"],
)

hits = client.search_memories(project["id"], "how do we avoid double charges?")
print(hits[0]["statement"], hits[0]["score"])

checkpoint = client.create_checkpoint(
    project["id"], "billing groundwork",
    "Idempotency decision captured; outbox worker noted.",
    next_steps=["wire refund metrics"], agent="my-agent",
)

briefing = client.resume_checkpoint(checkpoint["id"], agent="another-agent")["briefing_markdown"]
print(briefing)

Environment defaults: MAYAMEMO_API_KEY (or MAYAMEMO_TOKEN) and MAYAMEMO_API_URL (http://localhost:4000). API keys are created in the workspace (POST /v1/keys), scoped per workspace and revocable.

Framework adapters

mayamemo.integrations ships a LangChain-style retriever and chat-memory adapter. They subclass the real langchain-core classes when it is installed (true drop-in) and work standalone otherwise.

from mayamemo import MayaMemo, MayaMemoRetriever, MayaMemoMemory

retriever = MayaMemoRetriever(client, project["id"], tags=["checkout"])
docs = retriever.invoke("how do retries work?")        # [{page_content, metadata}, …]

memory = MayaMemoMemory(client, project["id"])         # BaseMemory-compatible
memory.load_memory_variables({"input": "how do deploys work?"})  # {"mayamemo_context": "…"}
memory.save_context({"input": "…"}, {"output": "…"})    # recorded as a `discovery` memory

MayaMemoMemory.clear() is a no-op by design — the MayaMemo ledger is append-only (use retention windows or supersession; history is evidence).

Tests

Live tests run against a real API (they skip without a key):

cd sdk/python
MAYAMEMO_TEST_KEY_FILE=/path/to/.ctxkey python -m pytest tests -q

Each run creates its own project (sdk-suite-<run>) — semantic dedupe (0.92 cosine) correctly treats near-identical statements as duplicates, so per-run isolation keeps re-runs meaningful. Point the test key at a workspace with project-quota headroom (the runs consume project slots by design). examples/quickstart.py is idempotent: a duplicate is reported as already captured — semantic dedupe and reused.

Coverage

projects · memories (add / search / list / patch / tags) · compile_context · checkpoints (create / list / resume) · events · public_status · branded MayaMemoError(status, code, message, request_id) on every non-2xx.

Metadata

Release files for mayamemo 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mayamemo 0.1.0
File Size Uploaded Provenance Actions
mayamemo-0.1.0.tar.gz 11.4 kB Without provenance Details for mayamemo-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mayamemo 0.1.0
File Interpreter ABI Platform Actions
mayamemo-0.1.0-py3-none-any.whl Python 3 none any Details for mayamemo-0.1.0-py3-none-any.whl

Total release size: 20.4 kB

Release files / mayamemo-0.1.0.tar.gz

Download URL mayamemo-0.1.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c4dbdfa524d77680305a45c81f376b6d19f85586aa0858fb30679255b1a96b57
BLAKE2b-256 checksum
How to use checksums
76d9ce20a5aea1abcbe1ede8eb88ddebe3fb9ac4090efff2f402c5fabb201d42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mayamemo-0.1.0-py3-none-any.whl

Download URL mayamemo-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd9d49adfa347a135e86a2c68e4fdd0de0c7dc45be6a3be208b2b2a8a58b5207
BLAKE2b-256 checksum
How to use checksums
1b358744bf2e9b2205a0dd96c36f46b69af9999e1f08dd073c9f3560a21c265a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mayamemo 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page