AI Agents
An agent is not a chatbot with a system prompt. It is a loop that decides, acts on the world, and has to survive being wrong.
What actually makes something an agent
The word has been stretched to cover anything with a language model in it. The useful definition is narrower: an agent chooses its next action, executes it against something real, observes what happened, and decides again. Remove the loop and you have a very expensive template engine.
Three things follow from that definition, and they are where most implementations fail. The agent needs tools that can genuinely change state, which means every call is a chance to do damage. It needs to carry context between iterations without the prompt growing until it is unaffordable. And it needs a stopping condition, because a loop that cannot recognise completion will happily run until the budget is gone.
The part nobody demos
Demos show the happy path: a question, three tool calls, an answer. Production is the other paths. The API times out. The model invents a tool that does not exist. The same search runs eleven times because nothing recorded that it already ran. A user asks something the agent cannot do and it confidently tries anyway.
Handling that is most of the engineering. Validate every tool call against a schema before executing it. Cap iterations and spend per run, not per day. Make failures visible to the model as observations rather than swallowing them, so it can adapt instead of repeating. And log every step, because an agent you cannot replay is an agent you cannot debug.
Where this usually goes wrong
Giving an agent tools before deciding what it may break
A tool that writes to a database is a tool that can corrupt one. Start read-only, add write access per tool with its own confirmation path, and never expose a tool whose blast radius you have not thought through.
No iteration cap
Without a hard ceiling on steps and on spend, a confused agent does not stop. It retries. The bill for a single stuck run is a recurring story in this field.
Evaluating by reading transcripts
Judging an agent by how good its output sounds is how obviously wrong behaviour ships. You need a fixed set of tasks with checkable outcomes, run on every change.
Questions people actually ask
Do I need a framework like LangGraph or CrewAI to build an agent?
No, and starting without one teaches you what the framework is doing. A loop, a tool registry and a schema validator is a working agent in a couple of hundred lines. Reach for a framework when you need durable state, human-in-the-loop steps or multi-agent coordination — the things that are genuinely tedious to build yourself.
How much does running an agent cost?
Far more than a single completion, because an agent makes many calls per task and carries context between them. The cost driver is usually context growth across iterations rather than the number of steps. Measure per completed task, not per call.
What is the smallest useful agent to build first?
One that answers questions using exactly one real tool — a search API or your own database. It forces you to handle schema validation, failure and stopping, which is the whole problem in miniature.
Build it, free
Project briefs with the assessment criteria published before you start, and written code review on what you submit. No payment to apply or to complete.
Read further
Agentic AI
What Is Agentic AI? A Practical Guide for Enterprise Leaders
11 min read
Agentic AI
The Rise of Agentic AI in Enterprise Workflows
11 min read
Agentic AI
LangGraph vs CrewAI vs AutoGen: Choosing a Multi-Agent Framework
12 min read
LangGraph
Building Production-Grade Multi-Agent Systems with LangGraph
14 min read
Infrastructure
Deploying AI Agents on Kubernetes at Scale
15 min read