Skip to content
← All insights

Engineering · Lab Notes

The model proposes, the application disposes

Lessons from three agent builds (a teaching lab, a building-code checker and a strategy game): reliability came less from bigger models than from clear boundaries, execution traces and unambiguous inputs.

Mokotahi4 min read

When people ask whether an AI agent can be trusted with a task, the conversation usually turns to the model: which one, how big, how new. Across three recent builds (Agent Lab, a building-code checker and Parley), the same pattern held: reliability came mainly from the software around the model.

Here are four patterns we now start every agent design with.

1. Separate the request from the action

A tool call is a request. The model asks to search, to write, to send; the application decides whether that happens, with what permissions, and whether a person has to approve it first.

Agent Lab makes this visible on purpose. Every tool call is drawn as something the model asked for, and next to it is what the application actually did: ran it, blocked it, or paused for a human. Learners quickly stop asking “will the model do something dangerous?” and start asking the better question: “what is the application allowed to do when the model asks?”

2. Let the model choose; let code decide

Language models are good at judging relevance. They are not reliable judges of whether 194 is more than 180.

The building-code checker splits the work along that line. The agent reads Indonesian regulations, works out which topics apply to the stair or door in view and picks the checks to run. The verdict comes from small rule files (a measurement, a constraint such as a maximum riser height, and the article it comes from) executed as ordinary code. The report can only cite rule results that actually ran, and its numbers are copied from those results rather than from the model’s prose.

That split also makes the system testable: you can unit-test a rule in code, whereas you cannot unit-test a generated paragraph.

3. Treat the answer as a claim and the trace as evidence

An agent’s final answer is a claim. The evidence is the trace: which sources it retrieved, which tools it called with which inputs, what came back, and what it changed.

Both Agent Lab and Parley store that trace alongside every result. In Parley, each move sits next to the reasoning that produced it, and the engine is deterministic, so any odd decision can be replayed exactly. That is what turned confusing behaviour into fixable bugs: without the trace you only see a bad move, whereas with it you can inspect the inputs and see why.

4. When an agent looks confused, check what you gave it

The most transferable lesson from Parley: when an agent seems to reason badly, the first question is not “is the model smart enough?” but “did we give it something a careful reader could get wrong?”

A model that appeared to mistake its own army for the enemy’s was reading two similarly named fields in a dense blob of JSON. Renaming the fields, adding one authoritative summary line and formatting the input readably fixed it. When agents ignored a messaging tool entirely, the cause was a permissive instruction (“you may send a message”); a directive one changed zero messages into more than a hundred. When they played each turn as if it were the first, their own notes were being read and then dropped before the prompt was built.

All three fixes were free and required no model upgrade.

What this means for a project

Capable models still matter, but the highest-leverage work at the start of a project is in the parts you control:

  • Boundaries: what the application will and won’t do when the model asks, and where a person approves.
  • Deterministic checks: anything with a right answer belongs in code you can test.
  • Evidence: traces stored with every result, so failures can be explained and replayed.
  • Inputs: context written for a careful reader, with one source of truth for key state.

Start with the simplest architecture that works; many problems do not need an autonomous agent at all.

Working on something similar? We'd like to hear about it.

Let's Talk