concept

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.

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.

When to use ai agent

Common mistakes

FAQ

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 I 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 most 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.