Write the agent's law
Your agent, courier.agent.near, pays bills for you in USDC. It may only do what this mandate says. The agent can't edit it: on NEAR, only you can create, replace or revoke it.
Drill it before it gets a key
Every attack it will meet today, fired at your mandate before the agent gets any authority. The model always obeys the attacker. Only your rules and the compiler stand in the way.
Let it work. Watch it. Pull the plug if you must.
Requests arrive one by one. The agent writes a payment program for each, exactly as the request demands. The compiler and the mandate decide. When a payment is over your approval line, you decide.
The court reads evidence, not excuses
The law: the agent may explain itself, but it cannot approve or acquit itself. No Guard method even takes its explanation as input. Findings come from the program it wrote and the checks it met. A verdict cannot reverse a payment.
The law changes only as a new version
This is what a reviewer approves: added and removed lines. The new mandate gets a new hash and version. On NEAR, Guard refuses to accept any intent the agent registered under an older version.
Same checks, different stakes
| Stage | In this game | On NEAR mainnet today |
|---|---|---|
| Birth | Your choices become .x3, compiled in the browser | Guard stores the owner's mandate (create_mandate); invoice_06 ran under one |
| Boot camp | The compiler and the mandate checks against every attack | The same refusals run offline in X3Lang's CI (compiler 9/9, red team 8/8) |
| The day | The mandate check decides; you approve; money is simulated | Guard runs these checks plus a signed-quote check; invoice_06 passed 21 of them |
| Revoke | Every later request fails mandate_active | revoke_mandate, tested in CI and on testnet |
| Court | Findings from the evidence; the agent's statement changes nothing | Design. Evidence is preserved in public receipts and bundles |
| Evolve | A diff, a new hash and version 2 | create_mandate bumps the version and voids older intents |
The full status of each stage, with what is not built yet: agent law. Where protection ends: Break the mandate.