Ground truth for
every agent step.
Long runs fail quietly first, then catastrophically. Step 4: a wrong assumption. Step 22: a forgotten rule. Step 47: a tool call that contradicts what was true at step 3.
Invariant is the memory and rules layer every step reads and writes, and the gate that stops the next tool call when it would break what you've already established.
The Step 47 Problem
The model doesn't "remember" your system, it reconstructs it from context. The longer the chain, the more that reconstruction drifts. By step 47, it's executing a tool call that directly contradicts what was established at step 3.
Most tools try to fix this with better prompts. Invariant is the ground truth and the gate between intention and execution.
Contradictions pile up invisibly
Each step trusts the model's reconstruction of "what's true." Conflicts hide until something catastrophic happens.
Tool calls are "hope this is OK"
Without a gate, every tool call is optimistic. Multi-agent runs become multiple conflicting stories with no arbiter.
Without Invariant vs. With Invariant
"Invariant is the layer that remembers your world, spots when agents disagree with it, and stops dangerous tool calls, so agent workflows can run long without falling apart."
What Invariant Does
Agents write to a living graph. Contradictions surface. Risky actions get blocked before they run. That's how you scale from ten steps to hundreds.
Tool-call gating
Validate before execute. Every tool call passes through Invariant's coherence engine before it runs. If the proposed action contradicts current world state, it's blocked, with a complete reason trace, before a single packet leaves the network.
Shared state
All agents read and write to one coherent world model. No more diverging context windows. When agents see conflicting facts, Invariant preserves both branches and surfaces the contradiction rather than silently overwriting truth.
Audit trail
Every claim, contradiction, and override is logged with full provenance. Which constraints fired, what the coherence score was, why the decision was VALID, RISKY, or BLOCKED, all export-ready for regulators and incident reviews.
World State Graph
Live Session ID: px-992-alpha
How It Works
Three operations. One coherent world state.
Ingest
Push observations, tool outputs, and claims from any source via REST or SDK. Invariant extracts assertions and builds the world state graph in real time.
POST /claims
Reconcile
The settling loop runs: detect contradictions → branch conflicting state → propagate dependencies → evaluate constraints → recompute confidence. Repeat until fixed point.
Φ(G) → fixed point
Validate
Before any agent executes an action, call /actions/validate. Get back admissibility (VALID / RISKY / BLOCKED), ΔΦ, Ψ score, and exact reasons.
→ VALID | RISKY | BLOCKED
Ship in minutes,
not months.
Five lines of initialization. Then assert claims and validate actions anywhere in your agent stack. The SDK handles serialization, retries, and streaming, you handle logic.
import { InvariantClient } from 'invariant-sdk';
const client = new InvariantClient({ baseUrl: 'https://invariant.me' });
// Assert a claim from a sensor or tool output
await client.claims.create({
entityId: 'battery-bp1',
predicate: 'temperature',
value: 95,
sourceId: 'sensor-array-3'
});
// Validate an action before executing
const result = await client.actions.validate({
operation: 'proceed_to_launch',
impactedEntityIds: ['launch-review-lr1']
});
if (result.admissibility === 'BLOCKED') {
console.log('Action blocked:', result.reasons);
}
Built for production AI
Invariant is infrastructure, not a feature. It belongs wherever autonomous systems make decisions that matter.
Multi-Agent Orchestration
When multiple agents act in parallel, their world views diverge. Invariant maintains a shared state graph that all agents read and write to, detecting conflicts the moment they arise, before a downstream agent acts on stale truth.
LLM Tool-Use Safety
Wrap any LLM with tool access and route every proposed tool call through Invariant first. High-risk calls, deleting data, writing production configs, calling external APIs, are blocked if current world state makes them inadmissible.
Autonomous Systems
Pre-flight validation for robots, drones, and autonomous vehicles. Assert sensor readings and system health claims, then let Invariant gate each actuation command against the live constraint set before the packet reaches the motor controller.
Mission-Critical Decision Support
Go/no-go decisions in aerospace, defense, and surgical systems require proof, not probability. Invariant produces a formal admissibility verdict with a complete dependency trace, every constraint evaluated, every claim cited.
Distributed Knowledge Management
Track claims from sensors, APIs, models, and human operators simultaneously. When sources conflict, Invariant preserves both views as independent branches rather than overwriting, giving downstream consumers full visibility into what is known, disputed, or uncertain.
Compliance & Audit Trails
Every action validated by Invariant is logged with its full provenance chain: which claims were evaluated, which constraints fired, what the Ψ score was, and why the decision was VALID, RISKY, or BLOCKED. Export-ready for regulators, auditors, and incident reviews.
Invariant
for Mac.
A native menubar app that connects to your local or cloud Invariant instance. Watch coherence in real time, get notified when contradictions spike, and inspect the world state without opening a browser.
- check_circle Live Φ score in your menu bar, always visible
- check_circle Native macOS notifications on contradiction detection
- check_circle Connects to localhost or invariant.me cloud
- check_circle One-click world state snapshot and export
v1.1.0 · Requires macOS 13 Ventura+
Coherence Score
98.1
42
Entities
2
Conflicts
128
Edges
Latest Contradiction
Claim #152 ↔ Claim #104, STATUS_CONFLICT
2s ago · score 0.81
Secure your agentic future.
npm install invariant-sdk
content_copy