AI Agent
An AI agent is software that uses an LLM to decide what to do, takes actions, observes results, and iterates toward a goal. Unlike a chatbot that just generates text, an agent has tools, memory, and a loop.
Anatomy: a planning step (LLM generates next action), a tool layer (executes that action — read file, run shell command, search web), an observation step (feeds result back into LLM context), and termination logic (when does the loop stop?). The simplest agent is "ReAct" — Reasoning + Acting in alternation.
Examples: Coding agents like Claude Code, Cursor's agent mode, Aider, Cline, Codex. Browser agents that operate web pages. Workflow agents like Devin or Replit Agent 3 that run for hours on tasks. For local-only agents: Open Interpreter, Aider with a local Ollama backend, Continue.dev with local models. The agent quality scales hard with model quality — a 7B local agent is meaningfully worse than Claude Sonnet on multi-step tasks.
Practical example
An operator wants a local coding agent that can read a repo, run tests, and fix failing ones without cloud API calls. They wire up Aider against an Ollama-served Qwen2.5-Coder 32B: Aider's loop reads the failing test output, asks the model for a diff, applies it, reruns the test suite, and feeds the new output back in — repeating until tests pass or a turn limit hits. This ReAct-style loop is where local models show their ceiling fastest: a 32B local model handles single-file bug fixes reliably, but multi-file refactors that require holding broader repo context in mind start failing where Claude Sonnet would succeed, because the agent's plan quality degrades with weaker reasoning at long context. The fix isn't a better loop — it's a better model, or scoping each agent turn to a narrower, well-bounded task.
Related terms
See also
Reviewed by Eruo Fredoline. See our editorial policy.