Skip to content
local-ai
Advanced

What is an AI agent?

An agent is a model given tools and a loop: it reasons, acts, observes the result, and repeats until the job is done. What that means, and where it breaks.

What you’ll learn

What separates an agent from a plain chatbot, the loop that makes an agent work, and an honest sense of where agents on local models succeed and where they struggle.

The concept

A chatbot answers. An agent acts. The difference is a loop and a set of tools.

Given a goal, an agent works in a cycle: it reasons about what to do next, calls a tool to do it, observes the result, and feeds that back into its reasoning, repeating until the task is done or it gives up. The tools might be a web search, a calculator, a code runner, a file system, or an API. This reason-act-observe loop, often called the ReAct pattern, is what lets a model go beyond a single reply and actually get something done.

A useful way to see it: the model itself does not do the work. It decides what tool to use and reads the result. The tools do the work, and the loop lets the model chain them together toward a goal.

What an agent needs from a model

Not every model makes a good agent. Agentic work asks more of a model than chat does:

  • Reliable tool calling. The model must reliably produce a correctly formatted request to call a tool, with the right arguments. A model that gets the format wrong breaks the loop.
  • Enough context. Each step adds to the context: the goal, the tools available, and the growing history of actions and results. Agents eat context quickly, so a longer window helps.
  • Staying on track. Over many steps, a weaker model can lose sight of the goal, repeat itself, or wander. Holding the thread across a long loop is genuinely hard.

Models built or tuned for tool use, such as Qwen3 8B or the faster Qwen3 30B-A3B, are better agents than general models of similar size.

Being honest about local agents

This is where candour matters. Agentic work is one of the areas where local models, at the sizes most people run, lag furthest behind the best cloud models. The loop amplifies weakness: a small error in step three derails steps four through ten. Local agents are capable and improving, and genuinely useful for well-scoped tasks, but they are not yet a hands-off replacement for a person on open-ended work. Expect to supervise, and to scope tasks narrowly.

What can go wrong

  • Compounding errors. A mistake early in the loop cascades. Short, well-defined tasks fail far less often than sprawling ones.
  • Getting stuck. Agents can loop, repeating the same failing action. Sensible frameworks add step limits and timeouts; use them.
  • Unbounded tool access. An agent that can run code or commands can do real damage. Constrain what its tools can reach, as covered in tool use and MCP.

Next steps

Next, see how an agent actually calls tools, and the emerging standard for connecting them, in tool use and MCP. Then agent frameworks and local models covers the tools for building agents.

Related tools

Next in this topicTool use and MCP

Last updated 30 July 2026.