# AI agents

An AI agent is a system where a language model decides what to do next, using tools, until a task is done. A model on its own turns one input into one output. An agent runs a loop: the model picks an action, usually a tool call, the result goes back into its context, and it picks again or answers. The model, the tools, and the loop around them together make the agent.

The word is used loosely. In reinforcement learning an agent is a learner that chooses actions and gets rewards, and an LLM agent usually doesn't learn from rewards at all. Here it means the loop above.

The line that matters in practice is the one Anthropic draws between workflows and agents. In a workflow, code fixes the path and the model fills in steps. In an agent, the model directs its own process and tool use. Workflows suit well-defined tasks that need predictability. Agents suit open-ended problems where you can't know how many steps are needed. Anthropic's advice is to start with the simplest thing that works, because agents trade latency and cost for task performance.

Autonomy is also what makes agents hard to keep reliable. The model chooses the steps, so the same input can take different paths, and errors compound across steps. A wrong step looks like a right one in the output. That is why an agent has to be checked on what it did across a run.

---

Source: https://tessary.ai/answers/ai-agents
All concepts: https://tessary.ai/answers
From Tessary, agent reliability for AI agents in production: https://tessary.ai
