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 progressExecution resumes from facts
Tool calls become authorityRuntime validates authority
Opaque reasoning loopsStructured execution traces
Retries may repeat workDurable results & idempotency

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 what infrastructure must guarantee: state, execution, authority, recovery, and coordination.

text
                  Probabilistic


                Semantic Reasoning


                 Runtime Action

              ─── validated boundary ───


                    Runtime

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

The Four Core Roles

text
Workflow  → what may happen      (allowed paths & side-effect boundaries)
Agent     → what should happen   (reasoning projection over workflows)
Session   → what carries forward (identity + hydrated application context)
Runtime   → what makes it durable (event log, outbox & crash recovery)

From Model Intent to Durable Execution

ts
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,
  });

const supportAgent = app.agent("support-agent", {
  instructions: "Help customers resolve refund inquiries via registered workflows.",
  workflows: [refundWorkflow],
  context: ({ session }) => ({ customerTier: session.context.accountTier }),
});

"The Agent interprets intent. The Workflow constrains behavior. The Runtime controls execution."

Invariant Durable Execution Engine.