# What Is an AI Agent? The Model, Tools and Memory Loop

> Canonical: https://skillalmanac.com/learn/what-is-an-ai-agent | Updated: 2026-11-25 | Index status: index-eligible

An LLM-based AI agent combines a model with a host, tools and selected context. Follow one task through its feedback loop and learn how it differs from a fixed workflow.

## Facts

- 2026-11-25: Anthropic describes agents as systems where LLMs dynamically direct their own processes and tool usage (https://www.anthropic.com/engineering/building-effective-agents)
- 2026-11-25: Workflows follow code paths developers predefine, while agents keep control over their steps and tool use (https://www.anthropic.com/engineering/building-effective-agents)
- 2026-11-25: Agents need ground truth from the environment, such as tool results, at each step to judge progress (https://www.anthropic.com/engineering/building-effective-agents)
- 2026-11-25: The Model Context Protocol is an open-source standard for connecting AI applications to data sources, tools and workflows (https://modelcontextprotocol.io/docs/getting-started/intro)

This guide focuses on LLM-based AI agents: systems in which a language model selects actions toward a goal while a host application manages tools, state and execution. The model proposes an action; the host checks whether it is allowed, runs it and returns feedback. A common design repeats this loop until the task is complete or a stopping condition is reached. The agent is the system, not the language model alone; vendors use the broader term in different ways.

## The loop, on one task

Take the task "summarize the open bug reports in a project." Three parts do the work:

- **Model:** reads the goal and decides what to do next.
- **Tools:** functions the model can request, such as a list-issues function and a read-issue function. The model asks for a call; the host application runs it and returns the output. Tools can be exposed through the Model Context Protocol (MCP), an open standard for connecting AI applications to external systems.
- **Memory and current context:** application-managed state and the information selected for the current model call. A host may include recent messages, summaries or retrieved records rather than every earlier result. Context limits and selection rules determine what the model actually sees.

A run might look like this. The tool names below are placeholders.

1. The model calls the list-issues tool with a filter for open bugs.
2. The tool returns 42 issue titles and IDs. That result goes into memory.
3. The model decides it needs detail on three of them and calls the read-issue tool three times.
4. Each result is added to memory. With enough information, the model writes the summary.
5. The loop ends because the task is complete. If the model kept requesting tools, a maximum iteration count would end the run.

A feedback loop with model-directed next actions is a common agent pattern. A fixed workflow can also make several calls or branch on a tool result; the number of prompts alone does not make it an agent. One user request can start a host-managed agent loop.

## Agent or workflow

Anthropic's engineering guide groups these systems as "agentic systems" and separates two types. A workflow runs through code paths developers predefine, so it is predictable and suits fixed tasks. An agent keeps control over its own steps and tool use, which suits open-ended problems where the number of steps cannot be known in advance. The guide notes that agents trade higher cost and latency for that flexibility.

Decision rule: use a workflow when predefined steps and conditional branches fit the task. Consider an agent when the model must choose an open-ended sequence of actions from feedback, rather than merely follow those branches. This guide stays on the loop itself and its parts; the companion guide on agentic AI covers the wider category and a four-check test for sorting systems.

## What an agent is not

- It does not ensure correct output. The model picks the actions, and the loop only supplies feedback.
- It is not a fixed pipeline. If the same steps run every time, a workflow is simpler to test and cheaper to run.
- It is not a fixed definition across vendors. The term covers everything from fully autonomous systems to predefined workflows, so check what a product means by "agent" before you compare it with another.

## Pitfalls

- **No stop condition.** The run keeps calling tools. Set a maximum number of iterations and log each step so you can see where it stalled.
- **Vague tool descriptions.** The model picks the wrong tool or passes bad inputs. Anthropic's guide recommends putting as much care into tool definitions as into the main prompt, and testing them against real inputs.
- **Missing feedback.** The model keeps going after a failed tool call because the error was not returned to it. Log tool results, including errors, and make the feedback needed for the next decision available in the model call; storing a log does not mean every byte must remain in context.
- **Memory growth.** Keeping more tool output in successive calls can increase latency and cost. Truncate large results and return only the fields the model needs.
- **Cost surprise.** An agent run can require many model calls, though some tasks finish quickly. Measure calls and token use per task before scaling it.

## When to use a skill instead

Ad hoc prompting works for a one-off task you can explain in a single message. A reusable skill fits a task you repeat, where the same steps, tool choices and checks should hold each time. Two related skills apply here. [subagent-design](/skills/skill-almanac/subagent-design) is the skill to check when a task is split across more than one agent. [coding-agent-guardrails](/skills/skill-almanac/coding-agent-guardrails) is the skill to check when an agent edits code and needs limits on what it may change.

## FAQ

**What is an AI agent?**
In the LLM-based architecture discussed here, an agent is a system whose model proposes next actions while its host manages tools, permissions, state and execution. Anthropic distinguishes this dynamic control from predefined workflow paths.

**Is agentic AI the same as an AI agent?**
Anthropic's guide uses one umbrella term, "agentic systems," for designs that range from fully autonomous agents to predefined workflows. Check each vendor's definition before comparing products.

**How do I build an AI agent?**
Start with a fixed workflow, including conditional branches where useful, and move to model-directed action selection only when the task needs it. Give the model a small set of well-described tools, return every result including errors, and set a maximum number of iterations.

Pricing and limits for specific tools change. Check the vendor's documentation for current figures; the linked source documentation was rechecked on 2026-11-25.

## Related skills

- [subagent-design](https://skillalmanac.com/skills/skill-almanac/subagent-design.md): Platform Score 47/100 (provisional)
- [coding-agent-guardrails](https://skillalmanac.com/skills/skill-almanac/coding-agent-guardrails.md): Platform Score 60/100

## Related guides

- [Agentic AI vs Generative AI: The Loop Difference](https://skillalmanac.com/learn/agentic-ai-vs-generative-ai.md)
- [Autonomous AI Agents: Risks and Guardrails](https://skillalmanac.com/learn/autonomous-ai-agents-risks-and-guardrails.md)
- [What Is Agentic AI? A Test for Telling Agents Apart](https://skillalmanac.com/learn/what-is-agentic-ai.md)
- [What Is OpenAI Codex? Surfaces and Their Uses](https://skillalmanac.com/learn/what-is-openai-codex.md)
- [How to Build an AI Agent: A Minimal Tool Loop](https://skillalmanac.com/learn/build-an-ai-agent.md)
- [AI Hallucination: What to Check in Agent Output](https://skillalmanac.com/learn/ai-hallucination-what-to-check.md)

## Sources

- https://www.anthropic.com/engineering/building-effective-agents
- https://modelcontextprotocol.io/docs/getting-started/intro
- https://platform.claude.com/docs/en/build-with-claude/context-windows

Platform Scores report our assessment under a published method. They are not a safety guarantee.
