flop-lab
↑ All tools

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.

Real policy engineIn-memory simulationNo signing
Recorded identities / chosen limits

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 / JSON
Valid policy. Exact decimal arithmetic.

Quote 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

FLOP
task / draft0 / 0.03
0.03 remaining
hour0 / 0.05
0.05 remaining
day0 / 0.2
0.2 remaining
total0 / 1
1 remaining

Task follows the latest request. Hour and day are rolling windows. Pending reservations never age out. No refunds are simulated.

Scripted sequence0 / 6 evaluated

Next: Draft: first pass 0.01 FLOP

Ready. The simulated ledger is empty.

03 / Follow every rule

The decision is not a black box.

Evaluate a request to start the trace.

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-run

What 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 ↗