Skip to content

Why Invariant?

Audience: Senior / Staff engineers building long-running agent systems. Not required: ML background.

Invariant is a Control Plane for AI Agencies. It solves the "State Management" problem in building complex, long-running agentic workflows.

What Invariant is NOT

Invariant is NOT:

  • A prompt framework (like LangChain PromptTemplates).
  • A chatbot engine (like Vercel AI SDK, though it can power one).
  • An agent that "decides" its own execution loop (the Runtime decides).

The Problem

Most AI frameorks (LangChain, AutoGen) treat state as an in-memory side effect of the execution loop. This works for simple chatbots but fails for:

  • Long-running processes (days/weeks)
  • Human-in-the-loop approvals
  • Auditability and debugging
  • Deterministic replayability

The Invariant Solution

Invariant treats State as the Database.

  1. Pure Data Workflow: Workflows are defined in strict JSON, not code. This means they are portable, versionable, and language-agnostic.
  2. Centralized Control Plane: A single source of truth manages the lifecycle of every agent.
  3. Determinism: Given the same history and input, the Runtime Engine always calculates the same next step.
  4. Observability: Every state transition is an event in the database. You can replay, rewind, and fork executions.

Core Philosophy

  • Invariants over Heuristics: Enforce strict rules (Type Safety, State Integrity) rather than relying on "fuzzy" LLM logic for control flow.
  • Explicit Dispatch: The LLM decides what to do, but the Runtime decides when and how to execute it.
  • Headless by Design: The Control Plane has no UI. It drives any frontend via a standardized State API.

Invariant Durable Execution Engine.