CortexDB 0.15.0 — governed memory formation: you decide what memory learns
0.15.0 is 0.14.2 plus governed memory formation: control over what CortexDB's background enrichment learns from your events, recorded decisions you can read back, and corrections that stay corrected. Customer logic enters as data, never as code inside CortexDB:
- Derivation policies. Typed rules per scope subtree (what may be learned, from which sources, which topics and sensitive values are never kept, how a field's values supersede each other, who may set a field, what waits for review, which model and how much it may spend), staged and previewed through change sets, with templates, a sensitive-topic taxonomy and a sandbox that tests a draft on real events before you activate it. A subject's own settings (memory off, explicit-only, review, a denied topic, a consent) tighten one scope at once.
- Recorded judgments. Every candidate memory the extraction model proposes is judged against the policy, and the verdict is recorded with the rule that decided it. Denied content is never stored; only rule ids and counts are.
- Corrections. Reject, replace, pin or confirm a claim, and undo it. A rejected memory stays rejected through re-enrichment, rebuilds, failovers and scope moves, on every replica.
- Review before commit. A policy can hold candidates for a person or a service to approve or reject.
- Re-derivation. When a policy changes, bring what was learned before in line with it:
regateapplies a tightened policy to the stored facts with no model call, andreextractruns the model again over the events, priced by a dry run and capped. - Outside workers. An ordered change feed, a write-back stamp (
derived_by), declared episodes, a reference worker in the SDKs and a Claude memory-tool handler: your own code derives on your compute, and its results inherit CortexDB's permissions, replication and erasure. - A read-time use rule for New York's General Business Law Article 48, opt-in.
- Importers that replay. A Mem0, Zep, Letta or OpenAI export sent again replays instead of duplicating, and can keep the memories the source extracted.
This is a breaking release: its first start upgrades the data directory one way. Like 0.14.0, 0.15.0 arms the data directory at its first start, now for format 11: no 0.14.x binary opens the directory afterwards, and the way back is the backup taken before the upgrade. Read "Upgrade (one-way)" before you upgrade.
Without a policy, nothing you read changes. A deployment that stages no derivation policy, writes no subject
settings and makes no correction gets the same recall packs, answers and default reads as 0.14.2, but for what
"Breaking changes" lists (chiefly the directives.extract fixes and the warnings on directives nothing reads). New
provenance is stored on every derived fact and served only when a read asks for it (include=derivation). We
compared the two releases on the same data with no policy: every recall pack, answer context, compose result, write
acknowledgement and default read of facts, beliefs, episodes, events, claims and conflicts was 0.14.2's, byte for
byte apart from request ids and times, with the data directory held at format 10 and armed for 11.
Getting 0.15.0. It is released on the customer channel only. Customers download it from the customer portal,
https://customer.cortexdb.ai (Releases), with their company's license: the Linux amd64 and arm64 binaries, a
docker load image file per platform, and the image in the private registry the portal names. Release builds
enforce the license, and the install commands on the portal carry yours. There is no public download: no Docker Hub
image, no latest tag and no public GitHub release. Every new capability is experimental in 0.15.0: its responses
carry X-Cortex-Stability: experimental.
The routes are in docs/API_REFERENCE_V1.md (§8.7.22 to §8.7.28, §8.22.7 and §8.32; §16 lists every error code) and
docs/schemas/openapi.json. This page is the summary an operator needs.
Breaking changes
What a 0.14.x deployment that sets none of the new variables sees change at the upgrade.
-
The first start arms the data directory for format 11, one way. 0.15.0's format ceiling (
CORTEX_FORMAT_CEILING) defaults to the newest format, as 0.14.0's did. A plain node arms itself at its first start, before it serves: it writes<data_dir>/format_armed.json({"format": 11}) and logsSHARD_ARMED_ONE_WAYwithformat11. From then on a 0.14.x binary refuses the directory at its start (exit 78SHARD_FORMAT_UNSUPPORTED). On a cluster, a shard's leader arms it once every member runs 0.15.0.Do: take a cold backup first ("Upgrade (one-way)").
CORTEX_FORMAT_CEILING=10holds the directory at format 10: 0.15.0 then serves everything 0.14.2 served, and the new features that need format 11 answer 503FORMAT_UPGRADE_PENDING(details.reason: "arming_disabled"). The Docker image's one-way label is now 0.15.0 (io.cortexdb.one-way-below), so the one-click updater needs your consent and the backup. -
directives.extractlimits what is derived to the stages it names. Until 0.15.0 a list that named any offacts,entities,beliefsorunderstandingran the whole extraction:["entities"]produced facts too, and["understanding"]ran extraction as well. Now each stage yields only its own outputs:entities: entities, the edges between them and the names the resolver keeps; no facts;facts: facts, triples, their English glosses, the extraction summary and question-answer pairs; no entities, and the facts build no belief unless the list also namesbeliefs;beliefs: facts as well, because beliefs are built from them;understanding: concept reflection reads the event; on its own it extracts nothing;[]: nothing at all. The event stays indexed, embedded and searchable, and the fact sweeper, concept reflection and the episode builder skip it too.
An omitted list still derives everything. Do: if a client relied on
["entities"]or["understanding"]producing facts, addfactsto its list. -
An event with an
extractlist joins episodes only when the list namesepisodes. Episodes were built from every event whatever its list said. A rebuild now leaves such events out, which changes the membership, and so the ids, of the episodes that held them. Events with no list are unchanged. -
A reference root builds no episodes. Nothing was ever meant to be derived inside an application's reference root (
POST /v1/scopeswithreference: true), but the episode builder built episodes there. It no longer does; the episodes it built there before stay as they are. -
A typed triple's
directives.extractis still ignored. Acontent.kind: "triple"event is the caller's own statement: its fact is written exactly as sent, whatever the list says, as before. So the list does not keep a typed triple out of episodes or away from the fact sweeper either: the new stage rules apply to the events CortexDB extracts from. -
Entity-extraction calls are priced, on
CORTEX_LLM_MODEL. Until 0.15.0 the entity extractor reported one combined token count and its calls were never priced (a third of the real spend in one pilot's drill). Now each entity call records its input and output tokens and its model, soGET /v1/admin/usageshows that spend underentity_extraction, and the estimates and budgets add an entity term priced onCORTEX_LLM_MODEL(the enrichment model when it is unset): the operator re-derivation's estimate (POST /v1/admin/derived/rederive), the daily budget of the backfill that turning a scope'senrichon starts, and the daily budget of the distill akeep_learnedretention rule runs. Do: ifCORTEX_LLM_MODELnames a model the price book does not know, declare its rate inCORTEX_MODEL_PRICES: until you do, the backfill waits (waiting: "unpriced_model"), the distill is held to its daily event cap alone, and the estimates read unpriced. -
A write that names a directive nothing reads says so.
consolidate_into,confidence_floor,ttl_for_belief_layer,embedandasyncare accepted, and part of a write's identity, but nothing acts on them. A write ack (single, each bulk item, an import's job) that names one now carriesdirective_not_enforced:<name>in itswarnings. Every other ack is unchanged. -
A companion put that leaves
enrichout keeps it. A change set's put of<scope>/attrs:unitwhoseattrsdoes not nameenrichused to clear the stored value; it now keeps it, and the staging answer and the preview carry awarningsentry{reason: "enrich_kept", path, kept}. Only an explicit"enrich": "inherit"clears it. Do: a writer that clearedenrichby leaving it out sends"inherit". -
Resolving a conflict changes what you read, once the data directory is armed for format 11.
POST /v1/conflicts/{id}/resolvechanged only the node's bitemporal store, so recall,/v1/factsand/v1/beliefsnever saw a resolution and a failover undid it. It now also records the resolution as corrections, which every replica applies:pickandnew_informationpin the winner and close the losers ("loser": "wrong"deletes them instead),splitconfirms each value on its side of the boundary, anddismissconfirms both. The answer gainscorrection_ids. -
A resent import replays instead of duplicating. The Mem0, Zep, Letta and OpenAI importers key each row by its source id (
import:<provider>:<id>, else a hash of its user, time and text), so the same export sent again within 24 hours replays, and a row changed under the same id fails alone withIDEMPOTENCY_CONFLICT. Rows takecategory:,meta:andletta_kind:labels, and the stampimport:<provider>@1(API reference §8.11). -
On a cluster, the fact sweeper and the fact consolidator no longer run on data nodes. Both wrote facts that only the leader held, so followers never had them and a failover changed them. A data node with a model wired logs
FACT_MAINTENANCE_OFF_DATA_NODEat its start and runs neither. A plain node is unchanged. -
Signup and free-tier tokens carry one more capability family,
derivation.administer.scope, so a hosted account can set its own derivation policy without access administration. A signup token now names 19 families, andGET /v1/auth/whoamiandGET /v1/policy/effectivelist the capability (their catalog has 65 names). -
The subject-token shadow counts what it evaluated. Its 2 ms budget is the CPU its worker spends, not wall time, and a request whose every decision was evaluated counts
matchorwould_denyhowever long they took: on a loaded machine one decision ran past 2 ms and its request countednot_evaluated. A request past 1,024 decisions has the ones it captured evaluated within the budget. -
/v1/vocabulariesdoes not steer extraction, and the reference no longer says it does. It is a stored list for clients; a derivation policy'spredicatesreplace the promise.
Upgrade (one-way)
A single node first; "On a cluster" and "With the one-click updater" follow.
Before you start
-
Decide whether to arm now. Arming is what turns the new features on. To upgrade the binary and arm later, set
CORTEX_FORMAT_CEILING=10in the server's environment before its first start of 0.15.0 (below, "Holding the ceiling at 10"). -
Take a cold backup with the 0.14.x binary, and keep it with that binary or image. With the server stopped (
docker stop -t 120 cortexdb, orsystemctl stopwithTimeoutStopSec=120):python scripts/cold_backup.py backup DATA_DIR ARCHIVE.tar.gz python scripts/cold_backup.py verify ARCHIVE.tar.gz(or the 0.14.x binary's own
cortexdb backup DATA_DIR ARCHIVEandcortexdb backup-verify ARCHIVE). The first start of 0.15.0 arms the directory one way; this archive is the only way back. -
Rehearse on a restored copy (recommended), never on the live directory:
python scripts/upgrade_rehearsal.py --old-binary ./cortexdb-0.14.2 --new-binary ./cortexdb \ --data-dir /backups/a-copy --env-file /etc/cortexdb/cortexdb.envIt boots both binaries on a restored copy with your environment and lists what the new one loses or answers differently: every scope record, event, fact, belief, erasure receipt and token you name, and from 0.15.0 each scope's derivation policy hash, its corrections, its open review items, its declared episodes and the re-derivation jobs you name with
--job-id ID=SCOPE. A rehearsal that reads nothing on the old binary stops with exit 2 instead of passing. -
Check your clients against "Breaking changes":
directives.extractlists, change-set writers ofattrs:unitthat clearenrichby omission, importers that relied on duplicates, and anything that reads acks'warnings. -
If
CORTEX_LLM_MODELis unpriced, declare its rate inCORTEX_MODEL_PRICES.
Steps
- Download 0.15.0 from the customer portal, https://customer.cortexdb.ai (Releases): the binary, the
docker loadimage file or the image in the private registry the portal names, as its install commands say. Those commands carry your company's license, which release builds enforce. Docker Hub has no 0.15.0: do notdocker pull cortexdb/cortexdb. - Pin the deployment to 0.14.x so nothing restarts it on 0.15.0 while you work, and stop it with its full grace.
- Back up and verify (above).
- Start 0.15.0 on the same directory with the same environment and license. Before it serves, it arms the directory
and logs a warning, "shard armed for apply format 11: this is one-way, and this data directory no longer opens on
an older binary…", with
codeSHARD_ARMED_ONE_WAYandformat11; every later start logsSHARD_ARMED_ONE_WAYat INFO. If the log says instead that the ceiling allows arming but the shard is held below it, withreason=reserved_path_in_use, a registry record sits at a reserved path (pathsnames them) and the node serves unarmed, as 0.14.0 described.GET /v1/admin/readyanswers 200 once it serves. - Verify:
GET /v1/admin/version:crate_version0.15.0 and the new capabilities ("New capabilities").DATA_DIR/format_armed.jsonholds{"format": 11}.GET /v1/admin/metricsshard_formatreads{"binary": 11, "ceiling": 11, "armed": 11, "pending": null}.GET /v1/derivation/policy?scope=<a scope>answers"policy_hash": "dp1:none"and"format_armed": 11: no policy yet, so derivation runs as before.- A memory you know is found by
GET /v1/events/{id}and by/v1/recall, and a retry of a recent write with its idempotency key replays it.
Holding the ceiling at 10
With CORTEX_FORMAT_CEILING=10 set before the first start, 0.15.0 serves at format 10: everything 0.14.2 served,
plus the parts of this release that need no new stored state (the directives.extract fixes, include=derivation,
GET /v1/derivation/decisions, the status's extraction block, the policy read, the templates and the taxonomy, the
policy test, the change feed without consumer marks, derived_by, GET /v1/memory/about without corrections or
held candidates, and the importers). Derive records in change sets, subject settings, policy texts, corrections and
their undo, conflict resolution as corrections, review, declared episodes and feed consumer marks answer 503
FORMAT_UPGRADE_PENDING with details.reason: "arming_disabled", which is not retriable.
To arm later on a single node: remove the setting (or raise it to 11) and restart, or use the console's Settings
page, which shows the shard format (binary, ceiling, armed, and why it is pending) and lists the ceiling as a one-way
setting, shard_format. Its save arms nothing until you type the data directory's path and confirm you have a cold
backup (else 422 ONE_WAY_CONFIRMATION_REQUIRED); the next restart arms. A ceiling below the format the directory is
already armed for holds nothing back and is refused (409 FORMAT_ARMED_ONE_WAY). Holding at 10 is not a way back to
0.14.x either: the backup is.
On a cluster
Upgrade every node. Until every member of a shard runs 0.15.0 the shard stays at format 10, and the routes that
need 11 answer 503 FORMAT_UPGRADE_PENDING with details.reason: "members_behind" (retriable, with Retry-After: 30) naming the member. An ingress lists each new capability only once every Active data node reports it. Once the
last member runs 0.15.0, the shard's leader arms it. To hold a cluster at 10, set format_ceiling = 10 in every
member's [engine] table before the rolling upgrade, and raise it later with a rolling restart; a data node reads no
override file, so the console cannot set it there. After arming, a member restarted on 0.14.x refuses to start, and
a new member must run 0.15.0. A data node takes the new settings below in its [engine] table too.
With the one-click updater
The sidecar pulls 0.15.0 from the repository your CortexDB container runs, without registry credentials. Docker Hub has no 0.15.0 image and the customer portal's registry needs credentials, so a server installed from the customer portal is upgraded by hand, as above: load the 0.15.0 image file, then start it on the same volume. What follows applies to a server that runs its image from a registry of your own that the sidecar can pull from.
An update from 0.14.x to 0.15.0 crosses the image's one-way label, so the sidecar fails the first attempt with
ONE_WAY_CONSENT_REQUIRED before CortexDB stops; the Updates page then asks for a separate confirmation that names
the one-way migration, the backup and these notes, and sends accept_one_way: true. The backup is required
(BACKUP_REQUIRED with CORTEX_UPDATER_BACKUP=off). Once 0.15.0 has started, the sidecar never starts the old
container on the data again: a failure leaves it stopped and names the backup. Run the sidecar from 0.15.0: it knows
the 0.15.0 boundary itself and refuses a downgrade below 0.15.0 onto a directory armed for format 11
(ARMED_DATA_DIRECTORY); an older sidecar sees the boundary only in the image's label (docs/PRODUCTION_DEPLOYMENT.md,
"One-way upgrades").
The way back
Only from the backup. Stop 0.15.0 and keep its directory aside. Restore the archive into a new, empty directory with
the 0.14.x tools (python scripts/cold_backup.py restore ARCHIVE NEW_DIR --cortexdb ./cortexdb-0.14.2, or the 0.14.x
binary's cortexdb restore ARCHIVE NEW_DIR) and start 0.14.x on it. Every write made after the upgrade is lost.
Never start 0.14.x on the upgraded directory: it refuses it.
What's new
Derivation policies (derivation_policy_v1)
- A policy is a record per scope subtree, staged, previewed and activated through change sets (API reference
§8.22.7):
mode(off;explicit, only the events labelledmemory:rememberor carrying a non-emptydirectives.extract;review, every candidate held;automatic),stages,topics(deny, deny unless consented, an allow list, your own topics),detectors,sources(roles, actors, labels, intents, recall packs quoted back),grounding(quotes required, no hypotheticals or jokes),predicates(cardinality, how a new value supersedes, who may write the field),review,episodes,compartment,modelandentity_model,output_language,budget_usd_per_day,instructions,examplesanduse. A derivation change set writes nothing else; an access source's resync never names one. - Layered. Restrictions accumulate down the tree and along the org chart, steering takes the nearest scope's
value, and nothing widens what the server's own settings allow (enrichment off, the scope allowlist,
enrich: off, a reference root). A child that would widen an ancestor is refused at staging (422DERIVATION_POLICY_WIDENS).GET /v1/derivation/policyanswers a scope's effective policy with the scope that set each rule, and its hash (dp1:…), which every fact derived under it is stamped with. - Templates and the taxonomy.
GET /v1/derivation/templatesservesconsumer@1,minimal@1,enterprise@1,minor@1andhealth_app@1; applying one copies it, so an upgrade never changes a stored policy.GET /v1/derivation/taxonomyserves twenty sensitive-topic categories, the legal groups that name them (GDPR Article 9, California's sensitive personal information, Washington's consumer health data, New York's Article 48, and others) and the catalogue of 29 deterministic detectors (payment cards, IBANs, national ids, secrets, contact details, precise locations), whose checksummed formats are verified, not guessed. - Instructions and examples are erasable texts. Inline in the change set, each becomes its own record: an example
is marked synthetic or cites the events it was copied from, and erasing any of those events erases the example.
GET /v1/derivation/textslists them andPOST /v1/derivation/texts/eraseerases them, with a receipt. - Subject settings (
PUT,GET,DELETE /v1/derivation/settings): an application or its end user tightens one scope at once, with no change set: a stricter mode, denied topics and predicates, consents with their purposes,limit_spi, an objection, and the age-assurance attributes the use rule reads. Consents are audited (derivation_consent). - Test before you activate.
POST /v1/derivation/policy/testruns extraction and the policy over up to 200 sample events under a draft (or a staged change set) and answers each candidate's verdict and rule beside the active policy's, with the cost. It writes nothing, and draws on a per-tenant daily budget (CORTEX_DERIVATION_BUDGET_USD). - Writer rules. A predicate can be owned:
writersandrequiresdecide who may set it (extraction, a typed triple, a declared belief, a correction, an approved review, a named pipeline, a service, or a write citing a labelled source). A declared write that breaks one is 409WRITER_NOT_ALLOWED; extraction is rejected or held. - The policy reaches every derivation. The fact sweeper, the fact consolidator, memory consolidation, knowledge synthesis, concept abstraction and reflection, belief refinement, rollups and the episode builder read the same policy; a sealed compartment is never blended with its siblings.
What the policy decides, and how you see it
- Each candidate is judged in two phases: the deny rules run before anything else sees the candidate (the polarity check, the embedder, the context of known facts), and denied content is never stored, never embedded and never logged. The routing rules (writer rules, review, cardinality) run last.
- Every verdict is recorded with its rule (
accept.default,topic.deny.health,detector.payment_card, …). On a cluster the leader judges once and every replica applies the recorded verdict; no replica calls the model or judges again. include=derivation(derivation_provenance_v1) onGET /v1/facts,/v1/facts/{id},/v1/facts/timeline,/v1/beliefsand/v1/beliefs/whyadds each row'sderivationobject: verdict, rule, policy hash, models, prompt version, topic,derived_by, pinned, confirmed andunsynced(made under a policy other than the scope's current one; a write-back, under aderived_byversion other than its name's latest write in the root, whatever the policy). Without the parameter no response changes.GET /v1/derivation/decisionsanswers what became of one event:learned,nothing_admitted,held_only,failed,pending, orskippedwith its reason (enrich_off,extract_none,typed_triple,mode_off,budget, …), with rejections counted by rule, never described.GET /v1/derivation/statusgains anextractionblock (pending, learned, nothing admitted, held only, failed, its owncaught_up): the existingcaught_up, whichcortexdb-sync --wait-derivationpolls, keeps its meaning.- Budgets and models. A policy's
budget_usd_per_daydefers its jobs to the next UTC midnight once spent; a policy'smodelnames one of the operator'sCORTEX_DERIVATION_MODELS. - Metrics.
GET /v1/admin/metricsgains aderivationblock (verdicts, open held candidates, lapses, corrections, jobs, spend) andGET /metricsfour series:cortexdb_derivation_verdicts_total{verdict, family},cortexdb_derivation_held_open,cortexdb_derivation_spend_usd_totalandcortexdb_derivation_jobs{state}, with no scope label. Alert on a sudden rise in the share of rejected candidates (docs/PRODUCTION_DEPLOYMENT.md, "Operations and health").
Corrections (corrections_v1)
POST /v1/correctionsrejects, replaces, pins or confirms a claim (subject, predicate, value and polarity), named by a fact id or as stated; a Writer of the scope makes one, the end user's own token included.GET /v1/correctionsandGET /v1/corrections/{id}read them, andDELETE /v1/corrections/{id}undoes one.- reject deletes the facts its binding covers on every replica and keeps the claim from being learned again from
the same evidence:
claim(the events it cites and everything captured before it; a later statement is new evidence and is learned),subject_predicateorsubject("never remember this about me"). Rejecting a typed triple erases its event, with an erasure receipt. A rejection is a deletion, so a licensed build serves it after the license and its grace have ended, as it serves forgets and erasures;replace,pinandconfirmanswer402 LICENSE_EXPIRED(orLICENSE_REQUIRED) then, and so do an undo and the corrections' reads. - replace writes the new value as a typed triple of the caller, closes the old value (kept in
/v1/facts/timeline) and pins the new one; pin keeps extracted values from superseding a claim (each contest opens a conflict); confirm marks a value as supported. - A correction converges on every replica, whatever order the replicas learn and correct in, survives rebuilds,
failovers and scope moves, and is erased when every event it cites is erased, or with its subject. Its answer's
consistency token covers it: a read that demands the token (
at_least) waits until the node serving it has applied the correction, a new leader after a failover included. Use it, not/v1/forget, for a wrong memory: aderived_onlyforget can be derived again. GET /v1/memory/aboutanswers what is known about a scope's subject, each item with its sources the reader may read, withinclude=correctionsandinclude=held: the per-subject view for access requests.
Review before commit (derivation_review_v1)
- A policy holds candidates for review by topic, predicate, a writer rule's refusal, low confidence or
mode: review. A held candidate is in no store and no index: nothing reads it until it is approved. A policy withreview.hold.confidence_belowasks the model for its confidence in each claim, and holds what it rates below. GET /v1/reviewlists the queue with the source snippet the reviewer may read;POST /v1/review/decisionsdecides up to 100 at once. An approval makes the candidate a fact (its id in the answer); a rejection leaves a correction that keeps the claim suppressed; an item nobody decides lapses after the policy'sreview.lapse_days(30 by default). Reviewers are the scope's Writers or the principals the policy names, so a service can review too.- Each held candidate is announced on the lifecycle stream as
derivation_held, without its words, and every decision is audited (review_decision).
Re-derivation (derivation_rederive_v1)
A policy applies to what is learned from then on. When it changes, the rows made under the old one read as unsynced
(the status's governance block counts them), and POST /v1/derivation/rederive brings them in line, a dry run
first:
regatere-applies a tightened policy to the stored facts and open held candidates, from stored data, with no model call. Each fact the policy now rejects is retired by a correction of originregate(a suppression, so no replica learns it again, and Corrections can undo it); each held candidate it now denies is deleted with a decisionregated. When the change only tightens, the rows it judged and kept are restamped and read as current; a fact learned after it planned stays unsynced for the nextregate.reextractruns the model again over the unsynced events (or up to 20,000 named ones). Its dry run extracts a sample (50 by default, at most 200) without writing, diffs it claim by claim and prices the whole with a 90% interval, under anestimate_idthe leader keeps for 24 hours; the apply names that estimate and acap_usd, and the job runs a page of at most 256 events at a time, each reserved against the cap first, so no page starts that would pass it. Each event's new result replaces what it learned before; corrections still suppress what they cover, and approved review decisions still admit their claims.
A job is a replicated record: a new leader adopts it after a failover, one job runs on a root at a time, a scope move
waits for it (MOVE_DERIVATION_JOB_ACTIVE), and GET /v1/derivation/rederive/{job_id} and .../cancel read and stop
it; forgets and erasures are never held. CORTEX_DERIVATION_REEXTRACT decides who may run a reextract (an Owner,
the operator only, or nobody); a regate needs only an Owner. GET /v1/derivation/report is what was derived over a
period, counts and ids only, as JSON or CSV, for a regulator or a risk assessment. An undo of a rejection re-extracts
the events whose candidates the gate dropped under it, under the daily budget. A change set's preview names the rows
it leaves unsynced (unsynced_impact). POST /v1/admin/derived/rederive stays the trusted operator's repair
(docs/DERIVED_REDERIVE_RUNBOOK.md); it now waits for an event a spent budget deferred.
Outside workers
- The change feed (
derivation_feed_v1):GET /v1/derivation/feedserves a scope's events in order, asGET /v1/eventsserves them to the reader, and the erasures, expiries, redactions and moves that touch them, after an opaque cursor that survives a scope move. Erasure items name events only by hash, so a worker hashes the ids it holds and deletes the matches. A worker that names itself (consumer) is recorded, and an erasure's receipt and/verifyname every consumer that may have received an erased event;GET /v1/derivation/feed/consumerslists them. The feed is served after a license lapses, as an export is. derived_by(derived_by_v1): a write-back stamp{name, version}on typed triples and declared beliefs, served underinclude=derivation;GET /v1/derivation/status?derived_by=<name>reports the latest version and the rows written under older ones.- Declared episodes (
declared_episodes_v1):POST /v1/episodesstores an episode a worker defines over events it read, served beside the built ones and erased with any of its events;DELETE /v1/episodes/{id}erases one. A policy'sepisodes.builder: offhands a scope's episodes to the worker. - In the Python SDK,
cortexdb.workers.DerivationWorker(withFileCursor) reads the feed, writes results back with provenance,derived_byand idempotency keys, and purges what an erasure took;cortexdb.memory_toolbacks Anthropic's memory tool with CortexDB (CortexMemoryTool, the extracortexdbai[anthropic]). The TypeScript SDK has both.
The read-time use rule (derivation_use_rules_v1)
A policy's use rule withholds earlier-session memory from recall, answers and compositions for a user not
age-assured as an adult, as New York's General Business Law Article 48 asks of the apps it covers. The minor@1
template carries the rule ny_unassured_window (twelve hours, and other sessions); no other template does. Reads
take a new session field; an event is withheld when it was captured before the window or in another session, and
so is everything derived only from such events, and the read says use_rule_withheld: <n> events from earlier sessions in its warnings. The application asserts age_assured_adult in the subject's settings; CortexDB verifies
no age and stores no age-assurance evidence. The subject's own access reads (/v1/events, /v1/facts,
/v1/memory/about, the export) are never filtered.
Send session only to a server that lists derivation_use_rules_v1. A server before 0.15.0 (checked against
0.14.0 to 0.14.2) does not know the field: /v1/recall and /v1/recall/stream refuse it with 422 INVALID_BODY
(they take no unknown field), while /v1/answer and /v1/compose ignore it and the /mcp recall tool drops it,
so nothing is withheld there. The SDKs document the same.
The console
- Memory › What CortexDB learned: a scope's facts and beliefs with how each was made, corrections with their actions, the candidates held for review as the subject reads them (each opening the Review page), and each event's outcome.
- Memory › Review, with a counter in the navigation: approve or reject held candidates, one at a time or in bulk.
- Memory › Derivation policy: the effective policy with the scope that set each rule, its editor (from a template, staged as a change set), a test of a draft on a sample of events, re-derivation jobs (a dry run, then the apply, and the job followed to its end), subject settings, policy texts and the feed's consumers.
- The Organization page shows each scope's derivation policy, the Erasure page the new receipt lists, the Audit page's filter the new actions, the Observability page the node's derivation metrics (verdicts, review, corrections, jobs and spend), and the Settings page the shard format and its ceiling.
Erasure and audit
- Erasure reaches everything governed memory stores about people: policy texts, subject settings, corrections, held
candidates, review decisions and declared episodes (a feed consumer's mark names no memory: it goes with its root,
or after 90 days unread). A receipt lists the corrections and held candidates an erasure took and the feed
consumers that may hold a copy;
/verifychecks the records (governed_records) and lists the consumers (feed_consumers).docs/ERASURE_COVERAGE.mdhas each store. - A person's erasure (
POST /v1/erasures/person) also erases the corrections about that person. - Deleting never waits for a license. A licensed build whose license and grace period have ended still serves the
erasure of a subject's derivation settings (
DELETE /v1/derivation/settings), of policy texts (POST /v1/derivation/texts/erase) and of a declared episode (DELETE /v1/episodes/{id}), as it serves forgets, erasures, a correction's rejection and the change feed. GET /v1/auditgains the actionscorrection,correction_undo,review_decision,derivation_consent,derivation_text_eraseandderivation_job(a re-derivation job's approval), and takes?action=.
New capabilities
GET /v1/admin/version lists nine more names than 0.14.2. Each is experimental;
on a cluster an ingress lists one only once every Active data node reports it. A name says what the binary builds, not
what the data directory is armed for: below format 11 the routes that need it answer 503 FORMAT_UPGRADE_PENDING.
derivation_provenance_v1:include=derivation,GET /v1/derivation/decisionsand the status'sextractionblock.derived_by_v1: the write-back stamp on typed triples and declared beliefs, and its status report.derivation_policy_v1: derive records in change sets, the policy read, templates, taxonomy, subject settings, policy texts and the policy test; the capability familyderivation.administer.scope.corrections_v1:/v1/corrections*, conflict resolution as corrections andGET /v1/memory/about.derivation_review_v1:GET /v1/reviewandPOST /v1/review/decisions.derivation_feed_v1: the change feed, consumer marks andGET /v1/derivation/feed/consumers.declared_episodes_v1:POSTandDELETE /v1/episodes.derivation_use_rules_v1:sessionon the read routes and the read-time use rule.derivation_rederive_v1:/v1/derivation/rederive*, the status'sgovernanceblock,GET /v1/derivation/report, a preview'sunsynced_impactand an undo's re-extraction.
New settings
On a cluster data node, set them in the node config's [engine] table.
| Variable | Default | Meaning |
|---|---|---|
CORTEX_DERIVATION_MODELS | unset: only the model the process's enrichment runs (none without one) | the models (or provider-fleet names) a policy's model and entity_model may name, comma-separated; another is refused at staging (422 DERIVATION_MODEL_NOT_ALLOWED), and a policy that names none runs on the process's own models. The start logs a name it cannot route (DERIVATION_MODEL_UNROUTABLE), and the configuration lint one the price book cannot price (DERIVATION_MODEL_UNPRICED) |
CORTEX_DERIVATION_BUDGET_USD | 5 | US dollars a tenant's policy tests and reextract dry runs may spend a UTC day |
CORTEX_DERIVATION_BUDGET_MAX_USD | 500 | the most a reextract job's approval may cap its spend at |
CORTEX_DERIVATION_REEXTRACT | tenant | who may run a reextract: tenant (an Owner, within the cap), operator (the trusted operator only) or off (nobody; a regate is never refused by it). Another value refuses the start (exit 78 DERIVATION_REEXTRACT_CONFIG) |
CORTEX_FORMAT_CEILING | the newest format, 11 | as in 0.14.0; 10 holds the directory at format 10. On a single node the console's Settings page also sets it, as a one-way setting (shard_format) |
A budget value that is not 0 to 1,000,000 refuses the start (exit 78 DERIVATION_BUDGET_CONFIG).
New error codes
docs/API_REFERENCE_V1.md §16 has each in full. None is retriable.
| HTTP | Code | Where |
|---|---|---|
| 409 | CORRECTION_CONFLICT | an open correction of the same claim and action, or a pin and a reject of one claim |
| 409 | REVIEW_ITEM_DECIDED | a decision's result: the held candidate was decided before |
| 409 | WRITER_NOT_ALLOWED | a declared write a policy's writer rule refuses (a typed triple, a bulk item, an import row, a declared belief, a replacement) |
| 409 | FORMAT_ARMED_ONE_WAY | the console's shard_format: a ceiling below the armed format |
| 422 | CORRECTION_TARGET_UNKNOWN | no live fact states the claim |
| 422 | DERIVATION_POLICY_INVALID, DERIVATION_POLICY_WIDENS, DERIVATION_MODEL_NOT_ALLOWED, DERIVATION_TEXT_INVALID | a derive record in a change set, subject settings, a policy test's draft |
| 422 | POLICY_TEST_TOO_LARGE | a policy test past its events, its cap or the tenant's day |
| 422 | DERIVED_BY_INVALID | a derived_by stamp out of its grammar, or on anything but a typed triple |
| 422 | FEED_CURSOR_INVALID | a feed cursor the feed did not issue, or another root's or consumer's |
| 422 | ONE_WAY_CONFIRMATION_REQUIRED | the console's shard_format: a ceiling that arms, without the data directory's path and the backup confirmation |
Re-derivation's: 409 REDERIVE_ESTIMATE_REQUIRED (an apply with no live estimate of the same selection),
REDERIVE_ESTIMATE_STALE (the selection moved since the dry run), REDERIVE_BUDGET_EXHAUSTED (a cap below the first
page, an unpriced model, or the day's budget of dry runs spent) and DERIVATION_JOB_ACTIVE (another job holds the
root); 403 REEXTRACT_NOT_ALLOWED. cortexdb admin scope move refuses MOVE_DERIVATION_JOB_ACTIVE while a job holds
the root, naming it (details.job_id), and the mover reports the same code for a job opened after the move began:
run the move again once the job closes. Existing codes with new uses: FORMAT_UPGRADE_PENDING (every
route that needs format 11), IDEMPOTENCY_CONFLICT (a correction's or a declared episode's key, an import row changed
under its id), PROVENANCE_ERASED and PROVENANCE_UNKNOWN (declared episodes, review), EVENT_LIST_UNAVAILABLE
(a feed page an erasure overtook, retriable) and COHORT_WARMING (a cohort read under a use rule while it warms).
Fixes
- A bulk write with
wait=consolidatedwaits for enrichment.POST /v1/experience/bulk?wait=consolidatednow waits until enrichment has applied each of its events, as a single write does; a typed triple or anextract: []event does not wait for it. Through 0.14.2 the bulk answered 200 before enrichment had applied anything. With enrichment on, a large batch now takes as long as its enrichment, and past the bulk's wait budget (30 s plus 1 s an item, at most 600 s) it answers408 WAIT_TIMEOUT. - Security:
pin-utilsis gone. RUSTSEC-2026-0441 reportspin-utils, which the HTTP libraryhyperpulled in, as unmaintained; 0.15.0 updateshyperto 1.12.0, which no longer depends on it.
Known limitations
- Topic exclusion is only as good as the model's labels. A topic is the extraction model's judgment, so a denied topic can leak when the model labels a candidate otherwise; detectors and the structural rules (stages, sources, grounding, writer rules) are exact. Measure your policy with the test sandbox before you rely on it.
- An undo restores what the correction removed at once, and what it kept from being learned only by extracting
again. A rejection that met a candidate while the event was being extracted kept it out of storage, so no record
holds it: the undo brings back the facts the correction deleted, and queues each event whose recorded outcome names
the correction's suppression for extraction again, under the daily extraction budget (
effects.events_reextracting). One undo queues at most 20,000 events;effects.events_not_queuedcounts the rest, which areextractjob restores. This weighs most on a subject-wide rejection (subject_predicate,subject), which cites no events: its undo finds them in the outcomes recorded under its scope, for up to 10 seconds in the request and the rest in the background (reextract_scan: "running"). - On a cluster, an undo restores at most what 100,000 of the root's extraction records hold, and a replica that never applied the correction (a fresh replica, a move target) restores nothing there.
- A rejection is not an erasure. A correction keeps the facts it deleted or closed (up to 64) so that an undo can
restore them, and
GET /v1/corrections/{id}serves them to the readers of its scope, until the correction is undone or erased. To remove data for good, erase what it came from: erasing every event a correction cites erases the correction too, and a person's erasure takes the corrections about that person. - A sentence fact is matched by its text, so a paraphrase of a rejected sentence can come back: bind
subject_predicate, or replace the value with a triple. - While a pinned claim is contested, the belief over its topic can read as contradicted, and its claim need not be the pinned value; the pinned fact itself stays current.
- A replacement does not rewrite a value a typed triple stated. It closes the facts extraction made; a value your
own typed triple wrote is superseded by the replacement's triple only as any later triple supersedes it, on a
single-valued predicate and when the replacement's
valid_fromis not earlier than the old statement. On a multi-valued predicate both stay current: reject the old statement instead, which erases its event. - An event captured before a rejection and not yet extracted can state the claim again once every event the correction cites is erased, which erases the correction.
- On a cluster, a topic whose values come from both typed triples and extraction can supersede differently on different replicas when the values arrive close together, and a scope move can close a different predecessor on the target; corrections, pins and writer rules stay convergent. Builder beliefs, as in 0.14.0, are the leader's: after a failover the new leader serves them once it builds them.
- Receipts are node-local. An erasure's receipt, with its corrections, held candidates and feed consumers, and a policy-text erasure's receipt are kept by the node that ran it; on a cluster another node answers 404.
- Copies outside CortexDB are their consumers'. A receipt names every feed consumer that may hold an erased event, and may name one that does not; CortexDB cannot verify that a consumer deleted its copies. The consumers' list has no count of the erasure notices since a consumer's last read.
- Backups hold what was erased since, until their own lifecycle removes them; a restore replays the erasures the segment store's journal recorded, where it is on.
- The use rule's phase two is not built: it withholds all earlier-session content where it is in force, and a
policy that asks for only personal topics (
content: "personal") is refused. - Subject settings are written whole, with no revision check.
PUT /v1/derivation/settingsreplaces a scope's record, so two writers that change the same scope's settings at once can lose one update, a consent included. Write each scope's settings from one place. - Some convergence checks run in-process only. The corrections convergence harness (corrections, pins and undos at random interleavings) and the replace scenario run in the server's own tests; the release tests run the policy, reject, pin, review, re-derivation, erasure and feed scenarios on real servers, on one node and on three replicas.
- Re-derivation's estimates are the leader's. A
reextract's estimate is kept by the leader that made it, so a leader change asks for a new dry run (REDERIVE_ESTIMATE_REQUIRED). A page can cost more than its reservation, and a new leader counts a page in flight as spent, so a job can pass its cap by at most one page's cost beyond its reservation. A change set'sunsynced_impactcounts rows and prices nothing: its estimate fields arenulluntil a dry run. Aregaterestamps only from policy hashes the leader resolved itself. - A
regateright after adopting a template can retire many older facts. It judges each stored fact by what the fact stored: one learned before 0.15.0 carries no topic, so the policy'son_unknowndecides it (minimal@1drops it; the dry run counts these asunlabelled), and one with no stored quote fails a rule that requires quotes (consumer@1,minimal@1). The corrections aregatemakes also keep a laterreextractfrom learning those claims again from the same events. Read the dry run's counts by rule before you apply it, and when a change adds topic or quote rules, run areextractfirst.
Clients
Four clients are released with 0.15.0, on PyPI and npm, as 0.14.0's and 0.14.1's were; the connectors are unchanged. Upgrade a client with the server: against a server before 0.15.0 every new route answers 404, which reads like "not found", so a client checks the capability first (each SDK's README says so beside its new calls).
| Package | Registry | Before | With 0.15.0 | What it adds |
|---|---|---|---|---|
cortexdbai (Python SDK) | PyPI | 0.13.1 | 0.14.0 | every new route on Cortex and AsyncCortex: policies, settings, texts, templates, taxonomy, the policy test, derive records (derive_record), corrections (correct(..., bind=, value=, valid=, reason=, subject_principal=, idempotency_key=) and its shorthands), memory_about (corrections and held items by default), review, declared episodes, the feed (derivation_feed, feed_iter) and its consumers (feed_consumers), re-derivation (rederive(scope, mode, event_ids=...), the unsynced rows without event_ids; rederive_job, rederive_cancel, rederive_wait) and the report (derivation_report(scope, since=, until=, csv=)), derived_by, include=derivation, decisions; cortexdb.workers.DerivationWorker; cortexdb.memory_tool.CortexMemoryTool |
cortexdbai (TypeScript SDK) | npm | 0.11.1 | 0.12.0 | the same calls in camelCase, but deriveRecord is a module export and resolveConflict takes no loser; memoryAbout with the same default; two more, derivationReportCsv and feedConsumersPages; the worker's port (DerivationWorker) and CortexMemoryTool, a handler for the Anthropic SDK's betaMemoryTool |
cortexdb-cli | PyPI | 0.7.1 | 0.8.0 | cortexdb derivation (policy, stage, test, settings, texts, templates, taxonomy, status, decisions, feed, consumers, and the jobs: rederive, a dry run unless --apply, of the unsynced rows unless --events; job, cancel and report), cortexdb corrections, cortexdb review, cortexdb episodes declare and delete, cortexdb memory about (--corrections); --derived-by on experience write, beliefs create and episodes declare |
cortexdb-mcp | PyPI | 0.9.0 | 0.10.0 | the read tools memory_why, derivation_policy, memory_about and review_list; memory_correct, review_decide and correction_undo, each in the write profile only and marked destructive. Every new tool takes scope, but memory_why takes tenant_id |
cortexdb-connectors | PyPI | 0.3.0 | 0.3.0 | no change |
The server's own MCP endpoint (/mcp, CORTEX_MCP=on) gains memory_why and memory_about in its read profile and
correct in its write profile.
Performance against 0.14.2
On a single node with no derivation policy, 0.15.0 is as fast as 0.14.2. Both release builds ran interleaved,
round by round, on one quiet 48-vCPU machine (five rounds, medians; jemalloc with the image's MALLOC_CONF, mock
embeddings and the stub answer renderer), 0.15.0's final server code against v0.14.2:
- Bulk writes (100 items,
wait=indexed): p95 −0.6 %, p99 −0.9 %, throughput +1.2 % items per second. - Bulk writes acknowledged at
wait=accepted: p50 −1.0 %, p99 −0.1 %, throughput +1.0 % items per second. - Single writes, recall and answers: within about 3 % of 0.14.2.
Part of the bulk-write gain is a change outside governed memory: the vector quantizer's rotation now flips signs without a branch, with bit-identical results. With no policy set, governed memory formation adds no measurable work to the write path.
Compatibility
- Requests: a request that uses none of the new routes, fields or headers is answered as 0.14.2 answers it, but for what "Breaking changes" lists.
- The shard's apply format is 11: the governed records, a re-extraction's records, the registry's derive records and the rule that erases a correction with its last cited event. Only the entries that need it are written at 11.
- Rollback: only from the backup taken before the upgrade ("The way back").