## Definition
An **AI agent** is an LLM-driven system that pursues a goal across multiple turns by perceiving its environment, choosing actions (via tool calls), and adapting based on observations — without a human in the loop for each step.
## Minimal Components
1. **An LLM** — the policy that decides what to do next.
2. **Tools** — callable functions exposed to the model; see [[Tool Use]].
3. **An environment** — files, APIs, databases, terminals, browsers, other agents.
4. **A loop** — runs until the goal is achieved or a stop condition fires; see [[Agentic Loop]].
## Single-Step LLM vs Agent
| Property | Chat completion | AI agent |
| ------------- | ------------------------- | ----------------------------------------- |
| Turns | One request → one answer | Many turns; observation → action sequence |
| State | Per-call only | Accumulates within session |
| Tools | None or one tool call | Many tool calls, mixed types |
| Goal | Answer the question | Achieve an open-ended objective |
| Termination | When the answer ends | When the goal is met (or fails / times out) |
## Common Agent Shapes
- **Single-agent.** One LLM drives the whole loop. Simple, brittle on complex tasks.
- **Multi-agent.** Specialised agents coordinated by a router or orchestrator; see [[Multi-Agent System]].
- **Tool-using assistant.** Agent in form, simple in practice — chat assistant with file system, browser, code execution.
- **Workflow.** Predefined steps, with LLM calls slotted in; less autonomous, more reliable.
## Anthropic's Guidance
> Start with the simplest possible solution. Add agentic complexity only when simpler approaches fall short.
See [[Building Effective AI Agents]] for the canonical workflow patterns (prompt chaining, routing, parallelisation, orchestrator-workers, evaluator-optimizer).
## Failure Modes
- **Drift.** Loses track of the original goal across many turns.
- **Tool misuse.** Calls the wrong tool, or the right tool with wrong arguments.
- **Sycophancy and reward hacking.** Tells itself the goal is met when it isn't.
- **Looping.** Repeats actions without progress.
- **[[Hallucination]] cascade.** A made-up fact in turn 3 becomes "ground truth" by turn 10.
## Related
- [[Tool Use]]
- [[ReAct Pattern]]
- [[Agentic Loop]]
- [[Multi-Agent System]]
- [[Building Effective AI Agents]]