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.6

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.6
File Size Uploaded Provenance Actions
superb_memory-0.2.6.tar.gz 15.9 kB With provenance Details for superb_memory-0.2.6.tar.gz

Built distribution (wheel)

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

Total release size: 32.1 kB

Release files / superb_memory-0.2.6.tar.gz

Download URL superb_memory-0.2.6.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
64673b2c8e858968efc19dc98f32c8e99507cea2680494aa56e53863ebcff58b
BLAKE2b-256 checksum
How to use checksums
97fd5cf7a9ebe17a058b025238ff8ec197ae2b0a188ac78924697eff0aebe767
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 5, 2026.

Transparency log

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

Download URL superb_memory-0.2.6-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fd98ec8346cad86c1c03e1d48834f17d88b7363f8485419b4519fa375e7a7c1
BLAKE2b-256 checksum
How to use checksums
c440b94ec15311bb20b52cb32ff118f1d7c95f5ba47cf1e4dde2868f9dbc2f1b
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 5, 2026.

Transparency log

Security for superb-memory 0.2.6

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.6.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 5, 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