Skip to content

InvariantReliable Infrastructure for AI Agents & Workflows

Constrain the blast radius of model mistakes, reduce token overhead, and execute real-world actions safely by moving state, execution, and authority out of the model.

Agents are probabilistic. Your infrastructure shouldn't be.

Model-Centric Agent ArchitectureInvariant Architecture
Prompt carries execution stateDurable runtime state
Growing conversation historyProjected context
Large static tool surfaceState-aware Runtime Actions
Model reconstructs progressCommitted progress is stored as facts
Tool calls become authorityRuntime validates authority
Opaque reasoning loopsStructured execution traces
Retries may repeat workDurable intent & explicit idempotency boundaries

Architectural Thesis

"Invariant moves the parts that must be reliable out of the model and into infrastructure."

Stop making the LLM responsible for remembering state, reconstructing progress, deciding execution authority, carrying application context, and coordinating side effects.

The model retains what it excels at: semantic reasoning.
Invariant absorbs the implemented guarantees for state, execution, authority, persistence, and coordination primitives. Cross-process recovery orchestration remains outside the public Beta contract.

text
                  Probabilistic


                Semantic Reasoning


                 Runtime Action

              ─── validated boundary ───


                    Runtime

          ┌────────────┼────────────┐
          ▼            ▼            ▼
      Workflow       State        Effects
      execution     commits      dispatch

The Core Roles

text
Session     → what carries forward   (identity & hydrated application context)
Projection  → what a consumer sees   (pure derived views, PII redaction)
Agent       → what should happen     (model-driven proposals over workflows)
Workflow    → what may happen        (allowed paths & side-effect boundaries)
    Capability  → what touches the world (stored intent + idempotent effects)
    Runtime     → what makes it durable  (event log, atomic commits & OCC)

$$\text{ADMIT} \longrightarrow \text{EXPOSE} \longrightarrow \text{PROPOSE} \longrightarrow \text{COMMIT} \longrightarrow \text{EFFECT}$$


From Model Intent to Durable Execution

ts
// 1. Projection: Only expose what the consumer needs (No PII)
const supportProjection = app.projection("support-view", ({ session, runtime }) => ({
  customerTier: session.context.accountTier,
  validActions: toTools(runtime.validActions),
}));

// 2. Workflow: Guarded transitions with transactional capabilities
const refundWorkflow = app.workflow("refund", {
  inputSchema: RefundInputSchema,
})
  .capability("load-order", loadOrderCapability)
  .step("check-policy", evaluateRefundPolicy)
  .branch("decision", ({ state }) => (state.eligible ? "APPROVED" : "REJECTED"), {
    APPROVED: issueRefundFragment,
    REJECTED: rejectRequestFragment,
  });

// 3. Agent: Model proposes; Runtime validates and executes
const supportAgent = app.agent("support-agent", {
  instructions: "Help customers resolve refund inquiries via registered workflows.",
  projection: supportProjection,
  workflows: [refundWorkflow],
});

The runtime owns truth. Projections control exposure. Runtime Actions control authority. Capabilities deliver effects.

Invariant Durable Execution Engine.