AI Agent

An LLM-powered system that can perceive its environment, reason about goals, and take actions through tools — going beyond single-prompt generation.

An AI Agent is a system that uses a Large Language Model as a reasoning engine to autonomously take actions in pursuit of a goal. Rather than responding to a single prompt with a single answer, an agent operates in a loop: it observes, thinks, acts, and re-observes.

The agent loop

Most agents follow a pattern like this:

  1. Observe — receive input from the user, the environment, or the output of a previous action.
  2. Reason — the LLM decides what to do next. Often expressed as a “thought” step.
  3. Act — call a tool (search, code execution, file write, API call) or respond to the user.
  4. Loop — feed the action’s result back into observation; continue until the goal is reached or a stopping condition triggers.

This loop is sometimes formalized as the ReAct pattern (Reason + Act) or the function-calling pattern exposed by OpenAI, Anthropic, and others.

Tools: the agent’s interface to the world

A bare LLM can only generate text. To be useful, agents need tools — typed functions the model can choose to call. Common categories:

The LLM doesn’t execute these — it generates a structured call request, the host system runs it, and returns the result.

Agent architectures

Several patterns have emerged:

Memory

Agents have a fundamental memory problem: the context window is finite. Solutions include:

Failure modes

Agents are powerful but fragile:

Production systems add guardrails: max steps, max cost, required user confirmation for high-impact actions, retry logic, and human-in-the-loop review.

The current state

As of late 2024, agents are the most active research and product area in AI. Coding agents (Cursor, Devin, Claude Code), research agents (Perplexity, OpenAI Deep Research), and general-purpose assistants (Manus, AutoGPT successors) are all built on the same pattern: an LLM, a tool set, a memory system, and a loop.

See also