We built a small town in code: a mill, a bakery, a cafe, a shop, a builder, a bank, a town hall, a tax office and twelve households. Ten model agents run it through tools, three of them briefed to profit by any means. We ran it twice from the same start, once with the gate deciding every action and once without. Without the gate the outside fraudster collected about 21,800 EUR; with it, nothing. What still got through, and the honest payments refused, taught the rule the whole gate is now built on: a rule reads the company's records, never a memory of its own, and a person's approval does not replace a missing rule.
## Why we built it
A gate is easiest to judge where many agents act on each other over time, not on one conversation. In a town, a fake invoice from one agent becomes a payment by another, and a changed bank account on Monday becomes a misdirected payment on Thursday. The town is deterministic code (accounts, invoices, orders, stock, VAT, contracts, loans); the agents change it only through tool calls, and every call goes to the gate. In the town without the gate every call is still sent and logged, then executed anyway, so the two towns can be compared action by action.
## What happened
Without the gate, the outside fraudster collected about 21,800 EUR, the bakery's accountant took about 3,300 EUR beyond salary and raised their own pay nine times, and the bakery ended in the red. With the gate, nothing reached the fraudster and nothing reached the accountant beyond salary, and no firm ended in the red.
```chart
{"title": "Money paid with nothing behind it, after 48 days (EUR)", "series": ["Without the gate", "With the gate"], "unit": "", "rows": [["To the outside fraudster", 21760, 0], ["Taken by the accountant beyond salary", 3332, 0], ["All payments with nothing behind them", 86699, 30290]]}
```
Five payments with nothing behind them still went through in the gated town, about 30,300 EUR. The run used an earlier version of the gate, which held those five for a person, and the simulated person approved them: they checked that a contract existed, not how much of it was already paid, so two finished contracts were paid a second time. The lesson holds for today's gate: an approval does not replace a missing rule. The rule to write reads, from the contract's own record, how much is still open.
## What the town taught us about the rules
- **Honest work that did not pass on its own**: about 18 actions a day. In that version they waited for a person; today's gate gives two answers, and an owner who wants to allow one exact action opens it through the lock on the rule.
- **Honest payments refused 218 times**, mostly after a bank-detail change earlier in the same long session: the gate of that run remembered the change for every payee. Today's gate keeps no memory of a session: a change of bank details is a field of the payee's own record, so it concerns that payee and no other.
- **Honest invoices** that carry the issuer's own bank account were sometimes read as bank details planted from outside.
- **Some actions passed because no rule read them yet**: a pay rise the accountant gave themselves, fines with no breach behind them.
## What comes next
Each of these is a condition to write on the records: a pay change for the agent's own household, a fine with no recorded breach, a payment above what is still open on the contract it cites, the issuer's own account on an invoice. The town is the test bed for them: same seed, new rules, and the count shows what changed. Next runs use other seeds and other models for different roles.
Watch the replay day by day, with both towns side by side: [the town of agents](/demo/world).
This update is not available.