Skip to content

AI agents, explained: what they can do and where they break

An agent is a language model that can take actions: search, click, run code, send the email. How they work, and why a 95% success rate per step is not as good as it sounds.

Maya Okafor

3 min read

A black and white checkered block on a light gray background

A chatbot answers. An agent acts. That is the simplest way to describe one of the biggest shifts in AI over the past two years. An AI agent is a language model connected to tools that let it do things in the world, like searching the web, filling in forms, writing and running code or sending messages, and to a loop that lets it keep working until a task is done.

How an agent works

Under the hood, most agents follow a simple cycle.

  1. Think. The model looks at the goal and everything it has learned so far, and decides what to do next.
  2. Act. It calls a tool: run a search, open a file, click a button, query a database.
  3. Observe. The result of that action is fed back into the model’s context.
  4. Repeat. The cycle continues until the model decides the task is complete, or until it gets stuck.

This pattern was popularized by a 2022 research paper called ReAct, short for “reasoning and acting.” The underlying model is the same kind of next-word predictor as any chatbot. What changes is that it can now see the consequences of its actions and adjust.

Tools are the hands

An agent is only as useful as the tools it can reach. Developers describe each tool to the model, what it does and what information it needs, and the model learns to request them in a structured format. In late 2024, Anthropic introduced the Model Context Protocol, an open standard for connecting AI systems to tools and data sources, which has since been widely adopted across the industry.

Some agents go further and operate a computer the way a person does: looking at screenshots, moving the mouse and typing. These are slower and more error-prone than direct tool connections, but they can work with almost any software, including programs that were never designed to be automated.

What agents are good at today

  • Coding. Software development has become the breakout use case. Agents can read a codebase, make changes across many files, run tests and fix what breaks, because code offers fast, objective feedback.
  • Research. Agents that run dozens of searches, read the results and compile a cited report can compress hours of work into minutes.
  • Repetitive digital chores. Moving data between systems, triaging an inbox or filling in routine forms.

The math of compounding errors

The biggest limitation is reliability over long tasks. Suppose an agent gets each individual step right 95 percent of the time, which sounds excellent. A task requiring 20 steps in a row would then succeed only about 36 percent of the time. Every additional step is another chance to go wrong, and an early mistake can send everything that follows down the wrong path.

An agent that is right 95 percent of the time per step will fail most long tasks. Reliability, not intelligence, is the bottleneck.

This is why the best agents today are built to check their work, recover from errors and ask a person for help when they are uncertain, and why the most successful deployments tend to involve tasks where mistakes are easy to spot and cheap to undo.

The risks are different

When a chatbot makes a mistake, you get a wrong answer. When an agent makes a mistake, it might delete a file, buy the wrong thing or send an email you did not intend. Agents that read web pages or documents also face prompt injection: hidden instructions planted in content that try to hijack the agent into doing something its user never asked for.

Sensible safeguards look a lot like those for a new employee.

  • Give agents the minimum access they need, not the keys to everything.
  • Require human approval for actions that are expensive or hard to reverse, such as payments, deletions and messages sent on your behalf.
  • Keep a log of what the agent did, so you can review it and undo it.

Agents are not yet the autonomous digital workers some marketing suggests. But for well-defined tasks with good tools and a human in the loop, they are already changing how work gets done, and they are improving quickly.

Filed underExplainers

Written by

Maya Okafor

Editor

Maya edits Long Context and writes our explainers: how models are built, why they behave the way they do, and what that means for the people using them.

Keep reading

More from Long Context

Abstract web of fine glowing threads in pale pink and lavender against a blue background
Explainers

How large language models actually work

Tokens, embeddings, attention and a lot of next-word guessing. A plain-language tour of what happens between your prompt and the model’s reply, with no math required.

Maya Okafor3 min read

A dirt road running into a hazy desert valley between red rock cliffs
Research

Why AI models still make things up

Hallucinations are not a glitch that one more update will patch. They fall out of how language models are trained and how we grade them. Here is what causes them, and what actually helps.

Daniel Reyes3 min read

The newsletter

Understand AI, one clear idea at a time.

New explainers and research breakdowns, written in plain language and delivered to your inbox. No hype, no spam.

  • Free to read, always
  • Sources linked, claims checked
  • Unsubscribe in one click