Skip to content

Architecture Overview ​

This page shows how Verist fits into a production system. Use it to understand the full picture before diving into specific guides.

System diagram ​

text
┌────────────────────────────────────────────────────────────────┐
│                         Your System                            │
│                                                                │
│  ┌─────────┐     ┌────────────────────────────────────────┐    │
│  │  Queue  │────▶│              Runner                    │    │
│  └─────────┘     │                                        │    │
│       ▲          │  1. Load state from DB                 │    │
│       │          │  2. Call run(step, input, ctx)         │    │
│       │          │  3. Commit output + events             │    │
│       │          │  4. Enqueue commands                   │    │
│       │          │  5. Capture artifacts → snapshot       │    │
│       │          └────────────────────────────────────────┘    │
│       │                          │                             │
│       │                          ▼                             │
│       │          ┌────────────────────────────────────────┐    │
│       │          │            Database                    │    │
│       │          │                                        │    │
│       │          │  computed   overlay   events           │    │
│       │          │  ────────   ───────   ──────           │    │
│       │          │  Step output Human    Audit trail      │    │
│       │          │             overrides                  │    │
│       │          │                                        │    │
│       │          │  effective = { ...computed, ...overlay }    │
│       │          └────────────────────────────────────────┘    │
│       │                          │                             │
│       │                          ▼                             │
│       │          ┌────────────────────────────────────────┐    │
│       │          │         Snapshot Store                 │    │
│       │          │                                        │    │
│       │          │  Artifacts + metadata for replay       │    │
│       └──────────└────────────────────────────────────────┘    │
│                                                                │
│  ┌─────────────────────────────────────────────────────────┐   │
│  │                    Review UI                            │   │
│  │                                                         │   │
│  │  Show diff → Human approves/overrides → Write overlay   │   │
│  └─────────────────────────────────────────────────────────┘   │
└────────────────────────────────────────────────────────────────┘

What Verist provides vs what you provide ​

You provideVerist provides
Queue and runner looprun(), defineStep, defineWorkflow
Database and storageState layer semantics (computed, overlay)
Snapshot persistencecreateSnapshotFromResult(), artifact capture
Review UIDiff formatting, replay, recompute
LLM adaptersContext factory, artifact hooks

Verist is a kernel. You wire it into your infrastructure.

Happy path: run a step ​

text
Queue job arrives
       │
       ▼
Runner loads state from DB
       │
       ▼
run(step, input, ctx)
       │
       ▼
Step returns { output, events, commands }
       │
       ▼
Runner commits output + events to DB
       │
       ▼
Runner enqueues commands
       │
       ▼
Runner captures snapshot (if needed)

Recompute path: model upgrade ​

text
Load snapshot from store
       │
       ▼
recompute(snapshot, step, { adapters, validate: true })
       │
       ▼
Compare original vs new output
       │
       ▼
Return { status, outputDiff, commandsDiff, schemaViolations }
       │
       ▼
Review UI shows diff
       │
       ▼
Reviewer approves or overrides
       │
       ▼
If override: write to overlay

Human override path ​

text
Step produces computed = 0.42
       │
       ▼
Reviewer disagrees, sets overlay = 0.90
       │
       ▼
Later: model upgrade, recompute
       │
       ▼
New computed = 0.38
       │
       ▼
Effective = 0.90 (overlay wins)

Human decisions survive recomputation. The overlay is never overwritten by steps.

Where each component lives ​

ComponentPackageYour responsibility
Step definitionveristDefine step logic
Run executionveristCall run() in your runner
Snapshot creationveristPersist snapshots
Replay/recomputeveristLoad snapshots, run recompute()
State storage@verist/storage + @verist/storage-pgStorage contract + Postgres adapter
QueueYour choiceJob dispatch and retry
Review UIYour choiceDisplay diffs, collect overrides

Key guarantees ​

GuaranteeHow it works
DeterminismGiven recorded artifacts, step output is reproducible
Audit trailEvery step emits structured events
Human authorityOverlay always wins over computed
Explicit control flowCommands are data, not implicit execution
Safe retriesSteps are idempotent by design

When to read what ​

GoalRead
Understand the mental modelConcepts
Get started quicklyFirst Step
Learn replay and diffReplay and Diff
Build a runnerReference Runner
Add human overridesHuman Overrides
Store stateStorage and State

Deep dive ​

For contributors and advanced users, the following resources cover kernel internals and design rationale.

Specifications – formal contracts for each kernel subsystem:

Architecture Decision Records (ADRs) – why things are the way they are:

LLM context: llms.txt · llms-full.txt
Released under the Apache 2.0 License.