# AI Agent

> Part of the AI Garage Jargons glossary: https://aigarage.in/jargons (all terms: https://aigarage.in/jargons.md)

**Category:** LLM
**Tags:** agents, workflows, tools, autonomy

A system where a language model decides its own next steps, using tools in a loop and checking the results, until the task is done or a limit is reached.

**In plain terms:** A workflow is a recipe with fixed steps. An agent is a cook who looks in the fridge, tries something, tastes it, and decides what to do next.

**Use cases:**
- Open-ended research and investigation
- Multi-step coding tasks
- Support cases whose steps cannot be listed in advance

**Why it matters:** Choosing an agent when a workflow would do adds cost, delay, and risk. Choosing a workflow when the steps cannot be known makes the system brittle. Knowing the difference is the first design decision.

**Why now:** Models plan and use tools better, so agents are practical for more tasks, and providers now publish guidance on loops, tools, and stopping limits. Practices change quickly, so check current guidance before relying on a specific pattern.

**AI Garage example:** The AI Garage Jargons work in this repository is run by a coding agent. It reads the skill, runs the script audit, renders a video, checks the result, and decides what to fix next, and it stops at approval gates that a person controls. The fixed gates around it are the workflow, and the work between them is the agent. This describes how the repository is worked on, not a claim about production usage.

**Mental model:** The deciding is the difference. In a workflow, your code fixes the path and the model fills in steps. In an agent, the model chooses the next step from what the last step returned, and repeats until it stops. That freedom suits open-ended problems where the steps cannot be predicted. It costs more time and money and can compound errors, so it needs limits.

**Builder scenario: Pick the right amount of freedom**

- **Context:** A support team wants a system that handles refund questions. Most cases follow the same three steps, but a few need open-ended investigation.
- **Failure:** The team builds a fully autonomous agent for every case. Simple cases get slower and cost more, and in the hard cases it loops, repeats tool calls, and never stops.
- **Intervention:** Put the predictable path in a workflow: classify, look up the order, apply the policy. Hand only the open-ended cases to an agent with a small set of tools, a maximum number of steps, and a checkpoint where a person can step in.
- **Outcome:** Routine cases run in a fixed number of steps, hard cases get flexible handling within a cap, and every run has a clear stopping point.

**Common misconceptions:**
- **Claim:** An agent is just a chatbot with tools.
  **Correction:** What makes it an agent is that the model chooses the next step in a loop and checks the result. A fixed sequence of model calls is a workflow, even when it uses tools.
- **Claim:** More autonomy is always better.
  **Correction:** Autonomy trades speed and cost for flexibility, and mistakes can compound. The guidance is to start with the simplest approach and add complexity only when it clearly helps.

**Visual model (comparison):** Use a workflow when you can write the steps down. Use an agent when you cannot, and give it limits.

**Visual description:** Two columns compare a workflow and an agent. In a workflow, your code fixes the path and the model fills in steps, which is predictable and cheaper. In an agent, the model chooses the next step in a loop, which is flexible but slower and costlier and needs limits.

**Related concepts:** [Tool Calling](https://aigarage.in/jargons/tool-calling), [Decision Model](https://aigarage.in/jargons/decision-model), [API](https://aigarage.in/jargons/api), [Context Window](https://aigarage.in/jargons/context-window), [Prompt Engineering](https://aigarage.in/jargons/prompt-engineering), [Agent Skill](https://aigarage.in/jargons/agent-skill), [Evals](https://aigarage.in/jargons/evals), [Agent Memory](https://aigarage.in/jargons/agent-memory), [Human in the Loop](https://aigarage.in/jargons/human-in-the-loop), [MCP (Model Context Protocol)](https://aigarage.in/jargons/mcp)

**Last researched:** 2026-10-12

**Sources:**
- [Anthropic Engineering - Building effective agents](https://www.anthropic.com/engineering/building-effective-agents)
- [Claude Docs - How tool use works](https://platform.claude.com/docs/en/agents-and-tools/tool-use/how-tool-use-works)

**URL:** https://aigarage.in/jargons/ai-agent
