Quickstart
Build a local memory loop and inspect the first action-safe recall.
Read quickstart →Python quickstart
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
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
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
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
Read the source, evals, policy matrix, and host patterns directly. The SDK repository is the authority for public SDK behavior.
Build a local memory loop and inspect the first action-safe recall.
Read quickstart →See how source, confidence, confirmation, and corroboration affect trust.
Read policy matrix →Inspect the tests that pin the public trust behavior.
Open evals →Pass user scope per call instead of sharing mutable global state.
Read host guide →Run the open SDK against an open Postgres-backed store.
Read Postgres guide →Review implementation, releases, issues, and contribution history.
Open GitHub →Hosted alpha
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.
Model its evidence, run the policy, and make the host obey the result.