Skip to main content
The example agent answers questions about one account’s sales in one month: gross sales (every order), net sales (cancelled orders left out), or the number of completed orders. It reads a warehouse of synthetic orders and a CRM. It calls no model and changes nothing.

Run it

Output

A twin decision

The twin classes each tool from its name and description. It reads the word “order” in list_orders as an act (placing an order) and would treat the tool as an effect. The example ships its decision in proving/twin.yaml:
proving twin build lists what it could not decide; proving twin review walks you through it.

A figure check

Each case names the figure the answer must state, in expected.answer.must_mention. The check figure_matches_warehouse asserts the answer contains it:

What the checks found

For “net” sales the agent sums every order, cancelled ones included, so months with a cancelled order get a net figure that is too high. Gross sales and order counts are right.

Fix it

Leave cancelled orders out of net sales: