Spend guard / policy workbench alpha
Give your agent
a spending boundary.
Edit a policy. Send a scripted request. See exactly why it passes or stops.
Model and miner from the gateway catalogue. Amounts, prices and requests below are scripted inputs.
Last known: . No current quote is implied.
01 / Set the boundary
A budget you can inspect.
Allowed requests reserve their full escrow.
Denied requests leave the ledger untouched.
Policy
YAML / JSONQuote FLOP values. Use two-space mappings and JSON inline lists. Unknown keys, anchors and inline comments are rejected.
02 / Reserve only on allow
Budget pressure
Task follows the latest request. Hour and day are rolling windows. Pending reservations never age out. No refunds are simulated.
Next: Draft: first pass 0.01 FLOP
Ready. The simulated ledger is empty.
03 / Follow every rule
The decision is not a black box.
Every check. Every reason.
Choose a decision to inspect the exact rule trace from evaluate().
Evaluation source: this browser / package Spendguard evaluator. Not run yet. Scenario times are simulated offsets from the catalogue recording.
Take the policy with you
Run the same check locally.
From a checkout: pnpm install, then pnpm --filter @flop-lab/spendguard build. This command runs the bundled example policy.
node packages/spendguard/dist/cli.js evaluate packages/spendguard/examples/policy.yaml packages/spendguard/examples/request.json --dry-runWhat this does not verify
This is an application policy simulation. It does not enforce chain limits, create preflight authorization, check finality or prove that a miner is available. A caller with a signer can bypass application checks.
The browser ledger is temporary. It does not exercise the package's file lock, hash-chain audit log or refund reconciliation. Policy edits replay the processed prefix from an empty ledger. Reloading clears edits.
Read the package and its limits ↗