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

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

Built distribution (wheel)

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

Total release size: 32.2 kB

Release files / superb_memory-0.2.4.tar.gz

Download URL superb_memory-0.2.4.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
825293dcfdfc3458f5b119d76ae111b47efbbfebe897c40dcf0aadc512475652
BLAKE2b-256 checksum
How to use checksums
c96444bcc2d4d934d4f3d81442bad3dde90d59d7769d1ef15f923043e7b8a5e9
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.4-py3-none-any.whl

Download URL superb_memory-0.2.4-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdc6244a9f4b1a47d6fb0bafab63d525e84efc2f0022065e04e605ff8b4db24e
BLAKE2b-256 checksum
How to use checksums
06fe8289a6560dd6986857078903a7ca2d76ba07617f78df538722ca46832973
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.4

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