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

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

Built distribution (wheel)

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

Total release size: 32.1 kB

Release files / superb_memory-0.2.5.tar.gz

Download URL superb_memory-0.2.5.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9ff123e09c2b13357e7da619155ca9e38d88d107ad18a8fc67c12fcbc6e8485f
BLAKE2b-256 checksum
How to use checksums
fb8fcad7851391b2acc44081fba204e76491ea09bbc87b1b00678cc26d1ad754
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 4, 2026.

Transparency log

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

Download URL superb_memory-0.2.5-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f9bf55186070698195831de7e00b740a0554e07eb325c8dc009251f688ac9da
BLAKE2b-256 checksum
How to use checksums
10fee7368dc875d93c6d63ce4d106ba701bb4cd141d3a1b0157e318a59991d8f
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 4, 2026.

Transparency log

Security for superb-memory 0.2.5

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