An agent is a loop, not a prompt
The single idea that separates a real agent from a chatbot is the loop. Instead of asking the model for the answer, you ask it for the next step. It proposes an action, your code runs that action, you feed the result back, and you ask again — until the goal is met or a budget says stop. The model never touches the world directly; it only ever proposes, and your loop decides.Tools: the only way it touches the world
An agent is only as capable as the tools you give it, and only as safe as the way you define them. Every capability — read a record, send an email, charge a card — is a typed, validated function with a schema the model has to fill in correctly. The model’s output is never trusted raw; it is parsed against that schema, and a malformed call is rejected and retried rather than executed on a guess.The important tools are also idempotent and scoped. Idempotent, so that a retried step doesn’t send the same email twice. Scoped, so that the tool which reads invoices physically cannot delete them. The permissions live in the tool, not in the prompt — because a prompt is a suggestion, and a permission check is not.Memory: what survives between steps
A model has no memory of its own; it sees only what you put in front of it. So an agent needs two kinds. Working memory is the running context of the current task — what it has tried, what came back — kept small on purpose, because a bloated context is both slower and dumber. Long-term memory is durable recall across runs, usually retrieval over your data, so the agent can pull in the one relevant document instead of being handed all of them. Deciding what the model is allowed and able to see is half of building a good agent.Guardrails: the difference between can and may
Autonomy is only useful when it is bounded. Guardrails are the boundary: budgets on tokens, steps and money so a run cannot spiral; timeouts so it cannot hang; approval gates where a human signs off before anything irreversible; and reversible operations so the worst realistic outcome is an undo, not an incident. There is also the adversarial side — a document the agent reads can try to hijack it, so untrusted input is treated as data, never as instructions.Evals: how you know it still works tomorrow
This is the system teams skip, and the one that decides whether the project survives contact with a second month. An agent has no compiler telling you a change broke something; a reworded prompt can quietly wreck a case that used to pass. So quality has to become a number. We build a golden set of real cases with known-good outcomes, score new versions against it — often with a model acting as judge on a rubric — and gate every change on it in CI. Without evals, you are not improving an agent so much as disturbing it and hoping.The five systems, together
None of these is exotic on its own. What makes an agent production-grade is that all five are present and wired together: context feeding the loop, tools letting it act, guardrails bounding it, evals judging it. Take any one away and you are back to a demo — impressive in the room, unpredictable everywhere else.Have a workflow where an agent would earn its keep? We are good at telling you which ones will and which ones won’t.