Skip to content
All writing

AI Agents Should Use Tools, Not Own Your Architecture

The model is a component. Treat it like one, and AI features become ordinary engineering again.

Jesús Ibáñez7 min read

There is a tempting shortcut when building AI features: give the model broad access, describe the goal, and let it work things out. It demos beautifully. It also makes the least predictable component in the system responsible for correctness, authorization, and data integrity.

The alternative is unglamorous and works: the model plans and explains, and a small set of well-defined tools does the work.

What a good tool boundary looks like

  • Each tool is a normal API with a narrow purpose and a typed contract
  • Authorization is enforced inside the tool, against the real user, never inferred from the prompt
  • Inputs are validated as if they came from the public internet, because effectively they did
  • Every invocation is logged with its arguments and outcome
  • Destructive operations require explicit confirmation outside the model

Once those hold, the interesting properties follow. You can swap models. You can test the tools deterministically. You can answer an auditor's question about what happened. You can let a non-deterministic component participate in a system that still behaves.

Context beats cleverness

In practice, quality comes far more from the context you assemble than from prompt gymnastics. A shared, structured description of the business — what this company does, who its customers are, what its data means — improves output more reliably than any single model upgrade, and it is something you own.

Treat the model as an unusually capable but untrusted caller of your APIs.

Why this is a leadership question

Teams under pressure to ship AI features will take the shortcut, because the shortcut is faster on day one. The cost lands later, as incidents nobody can reproduce and behaviour nobody can explain to a customer.

Setting the boundary early — the model proposes, the tools dispose — is the cheapest architectural decision available, and one of the few that gets harder to make with every week of delay.

AI & EngineeringArchitecture

Written by Jesús Ibáñez, Engineering Leader.