SDK available Cloud alpha View status

Python quickstart

Run the decision loop locally.

Install the Apache-2.0 SDK, store a memory with an explicit source, then ask what evidence is trusted before your host takes action.

Step 1. Install

One package. No account.

The local SDK works without a cloud key or phone-home. Use it to understand the trust semantics before considering hosted operation.

pip install pycontextdb

Step 2. Remember

Store evidence, not anonymous text.

Source and confidence are part of the memory. They give the policy something explicit to evaluate later.

import contextdb

db = contextdb.init(user_id="caller-1")

await db.factual.add(
    "Thursday afternoon works",
    source="user_stated",
    confidence=0.95,
)

Step 3. Check before action

Recall only what policy trusts.

Your host still owns enforcement. Treat an empty trusted result as a reason to ask or abstain, never as permission to improvise.

trusted = await db.factual.recall_for_action(
    "book the caller's next appointment"
)

if not trusted:
    return ask_for_confirmation()

return book_using(trusted)

Go deeper

The trust rules are part of the product.

Read the source, evals, policy matrix, and host patterns directly. The SDK repository is the authority for public SDK behavior.

Quickstart

Build a local memory loop and inspect the first action-safe recall.

Read quickstart →

Trust policy

See how source, confidence, confirmation, and corroboration affect trust.

Read policy matrix →

Executable evals

Inspect the tests that pin the public trust behavior.

Open evals →

Multi-tenant hosts

Pass user scope per call instead of sharing mutable global state.

Read host guide →

SDK source

Review implementation, releases, issues, and contribution history.

Open GitHub →

Hosted alpha

A narrow server-side API for design partners.

Hosted access remains Alpha. Project keys stay server-side. The key selects the organization and project; user_id selects a memory partition and is not end-user authentication.

GET  /health
GET  /ready
POST /v1/remember
POST /v1/remember_many
POST /v1/recall
POST /v1/recall_for_action
GET|POST /v1/pending_confirmations

Hosted confirmation, deletion, and MCP routes remain blocked until the gateway can prove partition ownership for those mutations. Use the SDK host-side for those paths today.

Start with one action you cannot afford to infer.

Model its evidence, run the policy, and make the host obey the result.