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

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.1
File Size Uploaded Provenance Actions
superb_memory-0.2.1.tar.gz 14.2 kB With provenance Details for superb_memory-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 28.6 kB

Release files / superb_memory-0.2.1.tar.gz

Download URL superb_memory-0.2.1.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
06f0a90f20c188c1cc9f7c9429be5323b1c8743118d2d4eaa28a428a3e135a1a
BLAKE2b-256 checksum
How to use checksums
33b8e25b9008fb31eb4b6d70eea72543b73497b06d5c5411c8d67bfa9ea1c100
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 Oct 31, 2026.

Transparency log

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

Download URL superb_memory-0.2.1-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d998bfdc71a6d9b2971bafa48ee945155bf774783fe0752a854f088916d87fb9
BLAKE2b-256 checksum
How to use checksums
4151c182d9bb6c3b2200f63d20d51c5170525052a1669c371316b7cc45293445
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 Oct 31, 2026.

Transparency log

Security for superb-memory 0.2.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for superb_memory-0.2.1.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 Oct 31, 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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

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