Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ContextDB Cloud Python SDK for AI agent memory

Remote client for the ContextDB Cloud data plane. The hosted API and this package are alpha and do not carry a production availability commitment.

from contextdb_cloud_client import CloudClient

async with CloudClient("https://api.contextdb.ai", api_key="cdb_…") as cdb:
    saved = await cdb.remember(
        "caller-1", "Thursday works", source="user_stated",
        confidence=0.9, idempotency_key="call-456-preference-v1",
    )
    context = await cdb.recall(
        "caller-1",
        "when can they come in?",
        min_memory_version=saved.memory_version,
        min_primary_wal_lsn=saved.primary_wal_lsn,
    )
    decision = await cdb.evaluate_action("caller-1", "book the visit")
    if decision.outcome == "act":
        # Execute in your host, then close the Action Ledger.
        await cdb.report_execution(
            "caller-1", decision.decision_id, "appointment.book", "succeeded",
            idempotency_key=f"receipt-{decision.decision_id}",
            external_ref="appt-8842",
        )
    pending = await cdb.pending_confirmations("caller-1")

LocalClient wraps the in-process memory calls for offline development. Cloud-only control-plane features such as durable action decisions and execution receipts require CloudClient.

The API key is a project-wide server credential (cdb_…). Keep it in your server's secret store; never in a browser or client-side code.

Pass a stable idempotency_key when retrying remember, remember_many, confirm, or extract_memories(..., mode="commit"). Reuse the key only for the exact same logical request.

Delete one bad memory with forget(user_id, memory_id=...). Whole-partition erasure is deliberately harder: pass erase_partition=True, confirmation=user_id, and an idempotency_key; Cloud deletes the partition and verifies that no memory rows or vector-index IDs remain.

Use cases

  • AI voice agents: remember caller preferences and confirmed constraints across calls.
  • Customer support agents: retrieve prior context while requiring trusted evidence before consequential actions.
  • Workflow agents: record act/ask/abstain decisions and report execution outcomes.
  • Privacy operations: delete one memory, a stable slot, or a complete user partition with verification.

Python starter kits

Each starter installs this package and is checked against the documented framework imports in CI.

Links

Is this package production-ready?

No. contextdb-cloud-client and the hosted service are alpha. The package does not claim a public availability SLA.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contextdb_cloud_client-0.1.0a4.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contextdb_cloud_client-0.1.0a4-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file contextdb_cloud_client-0.1.0a4.tar.gz.

File metadata

  • Download URL: contextdb_cloud_client-0.1.0a4.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for contextdb_cloud_client-0.1.0a4.tar.gz
Algorithm Hash digest
SHA256 2f2e2f834de67b0cd0d13c4d4a11a7bc9f3820c1ffbe46067691daa7949dfce9
MD5 1e6d213aa0071f7a37194f9a043a5fd0
BLAKE2b-256 eb0821054a561cd57e328dc663d95694b9a475ab8dca0cc6617cf0e868220942

See more details on using hashes here.

Provenance

The following attestation bundles were made for contextdb_cloud_client-0.1.0a4.tar.gz:

Publisher: publish-python.yml on atomsai/contextdb-clients

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file contextdb_cloud_client-0.1.0a4-py3-none-any.whl.

File metadata

File hashes

Hashes for contextdb_cloud_client-0.1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 96d5b326226f04b1bde8a77435f4fd058eac57ee24b7d7858c2458622e7a3248
MD5 dbbf83912ff969d8fae261cacc46df18
BLAKE2b-256 a472f0e281427732356de6fbec55334bee7100d44626b498dfae2117f3225d7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for contextdb_cloud_client-0.1.0a4-py3-none-any.whl:

Publisher: publish-python.yml on atomsai/contextdb-clients

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page