Skip to main content

MemoryDB Python client

superb-memory gives you the Python client, the mdb command-line tool and the memorydb-mcp stdio server for MemoryDB — a single-binary Go document database that also stores AI-agent memory (facts with evidence, summaries, tool traces, hybrid BM25 + vector search).

One line to a running database

pip install superb-memory
mdb serve                    # fetches the server binary, starts it on 127.0.0.1:8080

mdb serve prints the connection string; every client reads it from the environment:

export MEMORYDB_URL=memorydb://TOKEN@127.0.0.1:8080

Documents

from memorydb import MemoryDB

db = MemoryDB()                       # reads MEMORYDB_URL
db.collections.create("customers",
                      fields={"email": {"type": "string", "required": True},
                              "age": {"type": "integer"}},
                      unique=["email"], indexes=["age"])

customers = db.collection("customers")
row = customers.objects.create(email="demo@example.com", age=24, idempotency_key="customer-demo-1")
customers.objects.filter(age__gte=18).order_by("-age").only("email").all()
customers.objects.increment(pk=row["id"], views=1)     # atomic counter, no version needed

Django-style lookups: eq ne gt gte lt lte in contains icontains prefix iequals exists, plus or_q, Sum/Avg/Min/Max with group_by, cursor pagination and optimistic version checks.

Agent memory

db.ingest([{"role": "user", "content": "I prefer terse answers in Hindi"}],
          facts=[{"subject": "user", "predicate": "answer_style", "value": "terse Hindi",
                  "quote": "terse answers in Hindi", "message_index": 0, "confidence": 0.95}])
db.objects.search("terse")

Facts need an exact quote from a user message, so a stored memory always carries its evidence.

CLI and MCP

mdb health; mdb search "fridays"; mdb memory add --content "user ships on fridays"
memorydb-mcp          # stdio MCP server for Claude Desktop, Qoder, IDE agents

Companion packages: memorydb-django (cache + session backends) and memorydb-langchain (chat message history). Docs: docs/QUICKSTART.md and docs/CONNECTING.md in the repository.

Metadata

Release files for superb-memory 0.2.8

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

Source distribution (sdist)

Source distribution for superb-memory 0.2.8
File Size Uploaded Provenance Actions
superb_memory-0.2.8.tar.gz 16.2 kB With provenance Details for superb_memory-0.2.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for superb-memory 0.2.8
File Interpreter ABI Platform Actions
superb_memory-0.2.8-py3-none-any.whl Python 3 none any Details for superb_memory-0.2.8-py3-none-any.whl

Total release size: 32.8 kB

Release files / superb_memory-0.2.8.tar.gz

Download URL superb_memory-0.2.8.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
682b1c41b84b0e9b8fc3c4eba66ba20e0ffd102fac2795e7ca926653305a1d65
BLAKE2b-256 checksum
How to use checksums
de30f685e7f85e3b0aa2eb3d03299fddc10c01e169ebe7ca67d4422664617472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / superb_memory-0.2.8-py3-none-any.whl

Download URL superb_memory-0.2.8-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b43b9841b0d151d0b058a04213b2d1b7de5e86c846d49cd4e4ae22d72e4d0e3c
BLAKE2b-256 checksum
How to use checksums
530c4384c166844c543217827320545aae2e2bcc2f3e7c0f06e025a580b85c79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for superb-memory 0.2.8

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for superb_memory-0.2.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

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