What AI Agents Actually Are (Beyond the Hype)

— The term 'agent' gets thrown around for everything from chatbots to autonomous systems. Here's the technical definition and why it matters for how you build.

level: fundamentals topics: agents, architecture, fundamentals tags: agents, architecture, concepts

Every AI company claims to be building “agents” now. A chatbot that remembers context? Agent. A system that writes code? Agent. A tool that schedules meetings? Also an agent, apparently.

The term has been stretched so thin it’s nearly meaningless. But there is a real technical concept behind it, and understanding the distinction changes how you architect systems.

The Core Definition

An agent is a system that:

  1. Perceives its environment through inputs
  2. Reasons about what actions to take
  3. Acts by executing those actions
  4. Iterates based on feedback from the environment

The key word is “iterates.” A single LLM call that generates text is not an agent. An LLM that generates text, observes the result, decides what to do next, and repeats this loop—that’s an agent.

The Control Loop

Traditional software has a fixed execution path. You write code that specifies exactly what happens: read input, process it, return output. Done.

Agents have a control loop:

  1. Observe current state
  2. Decide on action
  3. Execute action
  4. Observe new state
  5. Repeat until goal achieved or failure detected

The number of iterations isn’t known in advance. The agent might solve a problem in 2 steps or 20 steps, depending on complexity and intermediate results.

Why This Matters for Architecture

If you’re building a chatbot that answers questions, you can use a simple request-response pattern. User sends message, LLM generates reply, done.

If you’re building an agent that researches a topic, the architecture is fundamentally different:

  • The agent might search for information (action)
  • Read the results (observation)
  • Decide it needs more specific data (reasoning)
  • Search again with refined query (action)
  • Synthesize findings (action)
  • Realize it’s missing a key detail (reasoning)
  • Search one more time (action)
  • Finally compile the answer (action)

You can’t predict this flow in advance. The system is making decisions at runtime based on what it learns.

The Tool-Use Pattern

Most practical agents interact with external tools. The LLM doesn’t execute actions directly—it requests tool calls, and your infrastructure executes them.

The pattern:

  • LLM receives a query and a list of available tools
  • LLM decides which tool to use and with what parameters
  • Your code executes the tool and returns results to the LLM
  • LLM observes the results and decides next steps
  • Repeat until LLM decides the task is complete

This separates reasoning (LLM’s job) from execution (your code’s job). The LLM doesn’t need to know how to call APIs or query databases—it just needs to decide when those actions are appropriate.

What Makes Something Not an Agent

Single-turn interactions: If the system generates a response and stops, it’s not an agent. Agents iterate.

Deterministic workflows: If the system always follows the same sequence of steps regardless of intermediate results, it’s not an agent. It’s a pipeline with LLM components.

No feedback loop: If the system doesn’t observe the results of its actions and adjust behavior, it’s not an agent. True agents learn from each action’s outcome.

A chatbot that maintains conversation history isn’t an agent—it’s a stateful application. A code generator that produces output without testing or iterating isn’t an agent—it’s a generation tool. These can be valuable without being agents.

Agent Complexity Levels

Not all agents are equally complex:

Simple reflex agents: Take an action based on current input without considering history. “If user asks for weather, call weather API.” This barely qualifies as an agent, but it does have the perceive-reason-act structure.

Model-based agents: Maintain internal state about the world and use it to make decisions. A customer service agent that remembers context from earlier in the conversation and adapts responses accordingly.

Goal-based agents: Work toward specific objectives. “Research this topic and compile a report.” The agent doesn’t just respond to queries—it pursues a goal through multiple actions.

Learning agents: Improve performance over time based on feedback. Most LLM agents today don’t learn during execution (the model is frozen), but they can incorporate feedback into future iterations through retrieval or fine-tuning.

The ReAct Pattern

The most common agent architecture is ReAct: Reasoning + Acting.

Each iteration has two phases: Reasoning: The LLM explains its thought process. “I need to find the user’s account details, so I’ll query the customer database.” Acting: The LLM specifies an action. “Call get_customer tool with email parameter.”

This isn’t just for interpretability—it improves performance. Explicit reasoning helps the LLM avoid impulsive actions and catch logical errors before executing.

The pattern creates a trace: thought → action → observation → thought → action → observation. This trace is debuggable, which matters when agents fail.

When You Don’t Need an Agent

Agents add complexity: state management, error handling for failed actions, loop termination logic, cost and latency from multiple LLM calls.

You don’t need an agent if:

  • The task can be solved in a single LLM call
  • The workflow is deterministic and doesn’t need runtime decisions
  • You’re optimizing for speed and cost over flexibility
  • The task doesn’t require external actions or observations

Many problems marketed as needing agents can be solved with simpler architectures. Start simple, and only add agent patterns when iteration and tool use are genuinely necessary.

When Agents Are Worth It

Agents shine when:

  • The task requires multiple steps that depend on intermediate results
  • You can’t predict the exact workflow in advance
  • The system needs to interact with external tools or APIs
  • Partial failures can be recovered through alternative actions
  • The problem space is too complex for a fixed pipeline

Common examples: research assistants that search and synthesize information, coding assistants that write code, run tests, and fix errors iteratively, customer service agents that query databases and escalate to humans when stuck.

The Mental Model Shift

Traditional software engineering: you write code that specifies exactly what to do.

Agent engineering: you define goals, provide tools, and let the agent figure out the sequence of actions.

This is powerful but unpredictable. The agent might solve problems in ways you didn’t anticipate. It might also fail in ways you didn’t anticipate. Your job shifts from writing step-by-step instructions to designing the environment: what tools are available? what feedback does the agent receive? how do you detect and recover from failures?

What This Means for the Rest of This Path

Understanding the agent pattern is foundational. The following articles cover:

  • How to design reliable tool interfaces
  • Error handling and recovery strategies
  • When to let agents iterate vs. when to constrain them
  • Multi-agent systems and orchestration

But all of it builds on this core concept: agents aren’t magic, they’re systems with control loops that make runtime decisions based on observations. Treat them as such, and you’ll build more reliable systems.