An AI agent is a language model running in a loop: it observes the current state, decides on an action (often a tool call), sees the result, and repeats until the task is done. The defining feature is that the model — not your code — chooses the next step.
Why it matters in production
That autonomy is exactly the value and exactly the risk. When a task is genuinely open-ended — "investigate this failing job and fix it" — an agent can navigate paths you could never enumerate in advance. When a task has a known shape, a fixed agentic workflow is more reliable, cheaper, and easier to debug. Reaching for an agent is a decision about how much control you are willing to hand the model.
The common mistake
Building an agent for a problem a workflow would solve. Every extra decision the model makes is another place it can wander, loop, or burn tokens. Agents that fail in production usually fail because they were given too much latitude for too little reason, or because they had no way to remember what they already tried.
How we actually use it
We keep the loop as tight as the task allows, give the agent a well-designed tool catalog rather than raw API access, and design memory deliberately so it does not repeat itself. For deciding between an agent, plain RAG, or MCP tooling, we start from the task's determinism, not from what sounds impressive.