SDK available Cloud alpha View status

ContextDB Formation · Hosted Alpha

Turn completed conversations into durable memory off the realtime path.

Submit structured turns after a call, chat, or workflow. ContextDB removes PII before the provider, extracts quote-backed candidates, applies blocking gates, and either returns them for review or commits them to the correct user partition.

The direct answer: Formation is asynchronous memory creation. The agent finishes its realtime turn; a durable job decides what deserves to become memory afterward.

Why it exists

Do not make a voice agent wait while a transcript becomes memory.

A direct remember call is right when your application already knows the exact fact. Formation is for raw interaction turns that still need extraction, provenance, confidence, evidence, deduplication, and a decision about whether anything should be stored.

Submit turns POST /v1/formation/jobs
Remove PII before provider execution
Extract and gate quote · source · confidence
Propose or commit review candidates or write
Poll terminal state succeeded or named failure

The API object

Submit once. Poll without resending the transcript.

Every submission requires an idempotency key. Repeating the same request resolves to the same job; changing the payload under that key fails closed.

The poll response shows provider attempts, elapsed time, accepted and rejected counts, terminal reason, candidate evidence, and committed memory IDs when commit mode succeeds.

# enqueue
POST /v1/formation/jobs
Idempotency-Key: call-456-formation-v1
{
  "user_id": "customer-123",
  "mode": "propose",
  "turns": [
    {"speaker": "user",
     "content": "I prefer Saturday mornings."}
  ]
}
→ 202 {"job_id":"frm_…","status":"queued"}

# poll
GET /v1/formation/jobs/frm_…
→ succeeded · completed · candidate accepted

Two modes

Review first or commit automatically.

propose

Return candidates for review

Inspect candidate content, source, confidence, evidence quote, turn indexes, action relevance, and rejection reason without writing memory.

turns → encrypted candidate review
commit

Write candidates that pass every gate

Accepted candidates enter the scoped memory store with stable commit identity. The result carries memory IDs and a read-your-writes consistency token.

validated stage → idempotent memory write

Durability and safety

A queue is useful only when every job has an inspectable ending.

Encrypted job state

Request, staged candidate, and result payloads use project and job-bound authenticated encryption. Raw turns and candidates do not enter plaintext control columns.

Bounded worker recovery

Jobs carry leases, deadlines, provider-attempt limits, and worker limits. Expired leases produce named worker-loss attempts instead of a permanent running state.

Recoverable commits

A staged candidate has one commit identity. If a worker exits after the memory write, the next lease owner recovers that memory instead of writing another copy.

Use cases

Formation begins where the live interaction ends.

Voice call completion

Extract stable caller preferences after the phone conversation without adding turn latency.

Support conversation review

Propose durable account context for operator review before it reaches future agents.

Workflow event batches

Turn structured human and agent events into sourced memories with a named failure state.

Agent-platform memory

Offer post-session memory creation while keeping the platform's realtime runtime independent.

Verified behavior

What has actually been proved.

  • Real PostgreSQL tests cover claim, lease, synthetic terminal, encrypted result, retry budget, and partial commit recovery.
  • A bounded production proof passed propose, identical replay, commit, recall, and plaintext control-state scan.
  • Cleanup returned zero proof jobs, attempts, commits, memories, and orphan keys.

This is functional evidence, not a quality benchmark, COGS result, sustained-load test, worker-failover proof, or availability commitment.

Questions

Formation questions, answered directly.

Should I use Formation instead of remember?

Use remember when your host knows the exact fact. Use Formation when structured turns still need extraction and validation.

Does the realtime agent wait?

No. Submission returns a job ID immediately. The host polls after the interaction while the worker runs independently.

Can I upload audio?

No. The Hosted Alpha contract accepts structured text turns only.

Can I cancel or list jobs?

No. Cancellation, job listing, retention cleanup, and scheduling are not part of the current contract.

Is commit exactly once?

The implementation uses idempotent enqueue, staged candidates, stable commit identity, and recovery tests. ContextDB does not claim exactly-once infrastructure or an availability SLO.

Create memory after the conversation, not during it.

Start with propose mode, inspect one candidate, then decide whether commit fits your workflow.