Stop agents from
taking the wrong action.
Invariant is the pre-execution control layer for production agents. It blocks bad tool calls by validating every action against shared world state before execution.
Built for teams whose agents write to real systems — CRMs, databases, APIs, workflows. One bad action based on stale or conflicting state is expensive.
update_crm_status("deal_492", "closed")How it works in 10 seconds
Every tool call passes through the same five steps — before it executes.
Agent proposes action
update, send, trigger, delete
Checks shared state
Every claim, constraint, dependency
Contradiction detected
Stale fact, conflict, or missing info
Verdict returned
Reason trace attached
Full audit trail, every time
POST /actions/validate → {"admissibility": "BLOCKED", "reasons": [{"type": "STALE_STATE", ...}]}
Agents act on what they think is true.
Not what is.
Your agent reads state at step 4. By step 22, that state has changed — another agent updated it, a tool call mutated it, or the fact simply expired. But your agent doesn't know. It proceeds. The write goes through. The downstream workflow breaks.
This isn't a model problem. It's an architecture problem. Production agents need shared world state and a gate that checks it before every action.
Stale state causes bad writes
Agent reads fact at step N, acts on it at step N+15. The fact changed. The action is wrong.
Conflicting claims go undetected
Two agents write contradictory state. Neither knows. Both proceed. You find out in production.
No provenance on why it acted
When something goes wrong, you have logs. You can't answer "what did it believe was true at the time?"
{
"admissibility": "BLOCKED",
"score": 0.18,
"reasons": [
{
"type": "STALE_STATE",
"claim": "deal_492.status = open",
"actual": "deal_492.status = closed",
"staleness": 0.91
},
{
"type": "CONSTRAINT_VIOLATION",
"rule": "no_write_after_refund_initiated",
"entity": "deal_492"
}
],
"traceable": true
}
Without Invariant vs. With Invariant
Three operations. One shared truth.
Instrument once. Validate everywhere.
Ingest
Push claims and tool outputs from any source via REST or SDK. Invariant builds and maintains the shared world state graph in real time.
POST /observations
Reconcile
Contradictions are detected and surfaced as first-class objects. Conflicting claims branch rather than overwrite. Constraints propagate. Coherence score updates continuously.
GET /contradictions
Validate
Before any agent executes a tool call, call /actions/validate. Get back VALID / RISKY / BLOCKED and exact reasons — before the action runs.
→ VALID | RISKY | BLOCKED
Integrate in
five lines.
Assert claims from tool outputs. Validate actions before execution. Works with any LLM or agent framework — LangChain, CrewAI, AutoGen, or raw API calls.
import { InvariantClient } from 'invariant-sdk';
const inv = new InvariantClient({ baseUrl: 'https://invariant.me' });
// After a tool reads state, assert it
await inv.claims.create({
entityId: 'deal_492',
predicate: 'status',
value: 'open',
sourceId: 'crm-read-tool'
});
// Before any write, validate first
const result = await inv.actions.validate({
operation: 'update_crm_status',
impactedEntityIds: ['deal_492']
});
if (result.validation.admissibility !== 'BLOCKED') {
await crm.updateDeal('deal_492', { status: 'closed' });
}
Memory, tracing, and orchestration are not enough
The tools you already use don't solve the pre-execution problem.
Retrieves relevant context. Doesn't track whether that context is still true. Doesn't stop an action when it's based on a stale retrieval.
Records what happened after the fact. Great for debugging. Doesn't prevent the bad action from running in the first place.
Coordinates which agents run when. Doesn't give agents a shared ground truth or block individual tool calls based on world state.
Invariant is the gate between intent and execution — the layer that checks whether the action is still safe to take right now.
Built for teams running production agents
If your agents can write to real systems, you need a gate before they do.
Enterprise & ops workflows
Agents that update CRMs, send escalations, trigger billing workflows, or modify data. Invariant validates every write against current state — so one stale read doesn't corrupt your downstream systems.
Multi-agent systems
When multiple agents act in parallel, their world views diverge. Invariant maintains one shared state graph. Conflicts surface immediately — before a downstream agent acts on a contradicted fact.
Compliance & audit
Every validation decision is logged with full provenance — which claims were evaluated, which constraints fired, why the action was allowed or blocked. Export-ready for regulators and incident reviews.
This is the entry point. The bet is bigger.
Production ops workflows are the wedge. The same pre-execution validation layer that prevents a double-close on a CRM deal is what prevents a robot arm from moving when a sensor reading is stale, or an autonomous vehicle from proceeding when a constraint has been violated.
As agents take higher-consequence actions — in engineering systems, healthcare, defense — the need for a formal, provable gate between intention and execution becomes non-negotiable. Invariant is that infrastructure layer.
Start validating agent actions.
Instrument in five minutes. Block the first bad action in your staging environment today.
npm install invariant-sdk
content_copy