Skip to main content

Memory orchestration

Cortex derives memory from the canonical executable transcript and other eligible retained sources. The backend owns extraction, fact resolution, summaries, chunking, embedding and optional graph projection. Your UI submits a turn and observes its run.

Response and indexing are separate​

responseStatus reports execution; memoryStatus and graphStatus report asynchronous stages. A completed response can have pending or failed indexing. Render each status independently rather than keeping a response spinner open until all work finishes.

Facts, canonical chunks and profile-specific vectors retain tenant/space, source revision and hash provenance. Current authority and source versions are checked before context use and publication. An edit or deletion invalidates stale derivations and fences in-flight work.

Pending context​

The indexed-plus-pending memory mode combines authorized indexed results with eligible approved transcript history and authorized pending sources. This allows recent information to participate before indexing catches up. Pending context still obeys source revision, approval, visibility, retention and token bounds.

Contiguous watermarks​

Ordered commits advance a stage's watermark only through consecutive completed events. A later success cannot jump over an earlier pending, failed or missing event. A captured cutoff identifies the point in history required by a consistency check.

memoryReadiness() reports cutoff, graphCutoff, selected profile and stage watermarks. Each stage includes indexedThrough, complete and an optional hole with sequence/state. It does no inference.

import type { CortexRuntimeClient } from '@cortexmemory/sdk/runtime';

export async function requireIndexedMemory(client: CortexRuntimeClient) {
return client.memoryReadiness({ strictStages: ['facts', 'vectors'] });
}

Scope-wide counters require a space or tenant grant. An own-only actor uses its run's memory/graph status instead of reading the whole space's counters.

Strict Agent barriers​

A published Agent can select strict with explicit required stages, a captured cutoff and bounded barrier behavior. Failure can fail the run or return explicitly incomplete context according to its published policy. Strict execution never silently switches to a weaker mode. Missing graph or other required capability remains an explicit error.

Every extraction, resolution, summary and embedding call is qualified and budgeted. Applications do not call memory.remember() after a remote response or configure a second extractor. See runtime client for profile, readiness and recall APIs.