Policy playground
Paste a policy, run sample payments through the policy engine in your browser and see the gate strip.
Paste a policy, pick the agent it attaches to, and watch sample payments go through the policy engine one after another. Everything runs in this page: the same policy compiler and decision pipeline the console's mock uses, loaded into your browser. Nothing is sent to ndStill, and there is no account to sign in to.
Loading the policy engine…
What you are looking at#
- Setup. The sample org has teams, agent trees and parent policies. Your document is attached to the agent you pick and layered under that agent's parents (the org policy, its team's policy and its tree's policy). A child can only tighten what a parent allows, so a payment can be held or declined by a parent even when your document allows it.
- policy.yaml. The agent spend policy document, in YAML. The compiler checks it as you type: schema errors, unknown fields, rules that can never fire, conflicts, CEL conditions that don't type-check, and rules that loosen a parent. Problems are marked in the editor and listed in the validation report.
- Sample payments. They run in order, so budgets, velocity and "first payment to this seller" carry over from one to the next. Change the amounts, the counterparty, the rail or the minute each one happens.
- Decisions. One row per payment: approved, held or declined, the plain-language reason, the machine code, and the gate strip. Open "Show stages" for the full trace.
- Where each rule is enforced. For each connection the agent uses, which rules ndStill can also write to the provider as a native backstop, and which only ndStill enforces at decision time.
Things to try#
- Load Research agent, then raise the
Delta Air Linespayment: it's declined, becauseAirlinesisn't incategories.allow. - Set
approvals.aboveto{ amount: 100000, asset: USD }and watch the held payments move to approved, unless a parent still holds them. - Add
new_counterparty: trueunderapprovals: the first payment to each seller is held. - Add a CEL condition such as
when: "time.weekday in ['sat', 'sun']"withthen: hold, then try a typo likepayment.amoutto see the compiler catch it. - Lower the monthly budget until the fourth payment no longer fits.
How it maps to the API#
The playground is the browser twin of three API calls: validate a version (the validation report), simulate a payment (one decision with its trace) and replay (many payments against a candidate version). In CI, run the same checks with a test key before you activate a version. The fields are all in the policy schema reference, and the policy cookbook has recipes you can paste straight in.