the validation layer for agentic commerce

Commerce an agent
can't get wrong.

Your AI agent is about to touch money. Warp checks every action against a formal model — before it executes. Scroll to watch it work.

Try it live ↓
v1.2.0 · MIT · TypeScript · Python · Rust · Go — one schema, proven equivalent
The guardrail ships in the TypeScript package (npm). Python, Rust, and Go share the model & conformance suite; their guardrail ports are on the roadmap.
commitment.lifecycle
the problem

An LLM near money is one hallucination from disaster.

Agents now issue refunds, change orders, and move state. They also make things up. The failure isn't theoretical — it's a refund larger than the charge, an order reverted after it shipped, two currencies silently added together.

Over-refunds

The agent refunds 500 on a 200 order. Money created from nothing — and your reconciliation breaks.

refund 500 > captured 200 · I-1

Reverted orders

A shipped, finalized order gets moved back to "Accepted." The state machine corrupts silently.

Fulfilled → Accepted · I-2

Mixed currencies

USD and EUR added without conversion. The total is meaningless and nobody notices until audit.

USD + EUR · I-1
try it live

Run the real guardrail, right here.

This runs the actual published @warp-lang/commerce-types package in your browser — vendored into this page, not a mock. Pick a scenario, tweak the numbers, and check it: the verdict is the real library's.

Open the full playground — guard actions, money math, the state machine & order audits →

running real @warp-lang/commerce-types@1.2.0 · vendored
guardAction(world, proposedAction)
Loading the real package…
why you can trust it

A small model. Proven hard.

The guardrail isn't a pile of rules — it's five primitives and six invariants, frozen into one schema, generated into four languages that are proven to agree fixture-for-fixture.

  • Partywho acts — buyer, seller, platform
  • Valuewhat moves — money, goods, rights
  • Intentwhat's wanted before it's agreed
  • Commitmentthe binding agreement + its lifecycle
  • Fulfillmentthe evidence it happened
5
primitives
6
invariants
4
languages, one schema
54
conformance fixtures
22
commerce domains modeled
0
cross-language disagreements
honest about enforcement

What it checks — at two layers.

The audit layer checks every invariant below across all four bindings — that's the layer the guardrail composes. The compiler statically blocks what it soundly can. We show you exactly which is which.

idinvariantcompileraudit
I-1Value Conservationcompiler · blocksaudit · enforced
I-2State Monotonicitycompiler · stage-levelaudit · enforced
I-3Capacity Verificationcompiler · blocksaudit · enforced
I-4Temporal Integritycompiler · blocksaudit · enforced
I-5Identity Permanencecompiler · blocksaudit · enforced
I-6Tree Consistencycompiler · partialaudit · enforced

Statuses reflect the published 1.2.0 release, read from the repo at build time — so this table can't drift.

conformance as a product

Prove your own binding.

Every binding emits a verdict for all 54 fixtures and they must agree. The same harness is public: generate types from the schema in your language, run the fixtures in your CI, and prove your commerce code agrees with the model. The Go binding was built this way — by an outsider following the guide.

Read the conformance guide ↗
TypeScriptconformant
Pythonconformant
Rustconformant
Goconformant
0
disagreements across four languages · 54/54 fixtures
what's next

Roadmap.

Stated in future tense, because it isn't shipped yet.

next
Guardrail ports to Python, Rust & Go

The runtime guardrail (guardAction) is TypeScript-first today. The other three bindings already share the model and pass conformance; the guardrail API will follow.

on main
Session-level coherence

Catching cross-step violations — a cumulative over-refund, or out-of-order actions across a whole agent session, not just one action at a time. Landed in TypeScript on main; ships in the next release.

exploring
A semantic-integrity layer beneath payment-authorization protocols

Sitting under agentic-commerce protocols so the commerce a model — or a human — generates is structurally valid before it's authorized.