AI School · Level 4 · Agents · 4 of 4

The agent in production

Léelo en español →

Reading time: about 20 minutes

An agent on your laptop is an experiment. The moment it touches real data and somebody other than you depends on it, it is something else — and the questions stop being technical. This lesson is about the five you need answered first: where it lives, what gets written down, what it really costs, what happens if somebody tries to trick it, and who answers when it gets things wrong.

The question that organises all of it: if your agent did something odd tomorrow, would you notice? And could you reconstruct what it did and why? If the answer to either is no, it is not in production: it is loose.

What is inside

  1. Where it lives, and what that changes
  2. A log that is actually useful
  3. The four numbers, every week
  4. Prompt injection, in full
  5. When it gets things wrong in a pharmacy
  6. The stop button
  7. Changing model without breaking anything
  8. What it really costs per year
  9. What never gets automated

1. Where it lives, and what that changes

WhereGood forWhat to know
Your laptop, by hand or on cron Learning. Read-only agents. The morning report If the laptop is off, nothing happens. And there is no shared log
A small server, always on Agents that have to answer when somebody asks You have to maintain it: updates, backups, the disk filling up
A function (Vercel, Supabase) Things triggered by an event or a request It has a time limit, and an agent can exceed it
A scheduled job in the cloud The 8:00 am ordering agent Nobody is watching: an alert when it fails is mandatory
The function time limit is the most expensive trap on that list. An eight-turn agent can take fifteen or twenty seconds, and plenty of plans cut it off at ten. The bad part is not that it fails: it is that it can cut off after a tool has written something and before it was logged. If your agent writes and lives in a function, the irreversible step goes in its own short, separate call.
To start with, cron on your own computer is worth more than it looks. An agent that only reads, leaves a report in a file at 8:00 and that nobody else calls needs no server, no deployment and no monitoring. Moving it later is an afternoon's work. Building the infrastructure before knowing whether the agent is any use is how these projects get abandoned.

← Previous: the tools Back to the school →