AI agent
An AI agent is a system where a language model autonomously plans and executes a sequence of tool calls to accomplish a goal.
In more detail
What it means
An agent loops: the LLM observes its state, decides on an action (usually a tool call), executes it via developer-supplied functions, observes the result, and decides the next step until the goal is reached or a stop condition fires. Frameworks like LangGraph, OpenAI Agents SDK, Claude Agent SDK, CrewAI, and AutoGen formalize this pattern. Reliability is the hard problem — agents fail on long horizons, drift off task, and burn tokens. Best practices in 2026: keep each step's context tight, use a planner-executor split, add deterministic guardrails (max steps, budget caps), and evaluate end-to-end success rates, not single-step quality.
Part 1 of 2
When to use it, and when not
Use it for
- Tasks that need real-time tool use (web search, code execution, browser).
- Workflows with branching that depend on intermediate results.
Part 2 of 2
Common mistakes
- Shipping a 50-step agent loop without budget caps or evals.
- Letting the agent's own context grow unbounded — it loses focus by step 15.
- Skipping a planner — pure ReAct loops drift.
FAQ
Questions readers ask.
What is ai agent?
An AI agent is a system where a language model autonomously plans and executes a sequence of tool calls to accomplish a goal.
When should you use ai agent?
Tasks that need real-time tool use (web search, code execution, browser). Workflows with branching that depend on intermediate results.
What are the common mistakes with ai agent?
Shipping a 50-step agent loop without budget caps or evals. Letting the agent's own context grow unbounded — it loses focus by step 15. Skipping a planner — pure ReAct loops drift.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/agent.md. Found a mistake? Tell us.