Accent colour
 
Shortcuts: press ?
 

What Are AI Agents? How Autonomous Software Gets Work Done

Muhammad Tahir November 29, 2026

The intern who never sleeps

Picture a junior employee who never sleeps, never gets bored, and can read a thousand pages before lunch. You hand them a task — "sort out the refund requests from last week, and email anyone whose order is more than five days late" — and they go away and do it. They open the right systems, check each order, draft the emails, and come back with a summary of what they did and what needs your decision.

That is the promise behind the phrase "AI agent" — and the source of most of the confusion around it. The term gets attached to everything from a chatbot with a search button to a program that writes and ships code while its owner is asleep. Some of those things deserve the name. Some do not. The difference matters, because an agent is not defined by how clever its sentences sound. It is defined by what it can do on its own, in the world, without you standing over it.

A chatbot answers you. An agent acts for you. That single distinction explains most of what follows: how agents work, why they fail, and why handing one the keys to your systems is a decision worth taking slowly.

What counts as an agent, and what doesn't

Start with the simplest test. If the software's only output is text on a screen, it is not an agent, however good the text is. A language model that writes a poem, summarises a report, or answers a question is producing language. An agent produces effects: it sends the email, changes the file, books the ticket, updates the database, opens the pull request. The output leaves the chat window and touches something real.

Most working definitions in the industry converge on the same few ingredients. An agent has a goal it is trying to achieve, not just a question it is trying to answer. It can perceive its environment — read files, check a web page, look at the result of an API call. It can plan a sequence of steps rather than producing a single response. It has tools it can call, such as a search engine, a code editor, or a payment system. And it can observe the results of its actions and adjust what it does next.

This is also why the line between "assistant" and "agent" has blurred in marketing. GitHub Copilot began as autocomplete — it suggested the next line of code as you typed. That was an assistant. The Copilot coding agent, which you can assign a GitHub issue to the way you would assign it to a colleague, is a different creature: it works in the background, opens a draft pull request, and waits for review. Same brand, different behaviour. The name on the box tells you less than the question: does it act, or does it only suggest?

There is a useful spectrum here. At one end sits autocomplete: the model suggests, you decide. Next comes the copilot pattern: the model drafts a whole function or a reply, you review and accept. Then the agent pattern: the model plans, acts, checks its own work, and reports back. At the far end sits the fully autonomous system that runs for hours with no human in the loop at all. Almost nothing sold today lives at that far end, whatever the brochure says. Most real deployments sit in the middle, with a human checking the work at defined points. That is not a failure of the technology. For most jobs, it is the sensible place to be.

The loop underneath everything

Strip away the branding and nearly every agent built since 2023 runs the same loop. It looks simple written down, and it is simple — the difficulty is in making each step reliable.

First, the agent perceives. It takes in the goal you gave it and the current state of the world: the files in a repository, the contents of an inbox, the result of a web search, the error message a test just produced. A language model on its own cannot see any of this. The agent framework gathers it and puts it into the model's context. Second, it plans: breaking a vague request into concrete actions, deciding what order to do them in, and figuring out what information is missing before it starts.

Third, it acts. It calls a tool — a web search, a file editor, a terminal command, a database query, an API call. The model does not perform the action itself; it produces a structured request and the framework executes it. Fourth, it observes. The result comes back and is fed into the model: the search returned three pages, the test failed with this error. The agent compares what happened with what it expected, updates its plan, and goes around the loop again.

Perceive, plan, act, observe. Repeat until the goal is met, the agent gets stuck, or it runs out of its step budget. That loop is the whole architecture. Everything else — memory systems, planning modules — is scaffolding built to make the loop work over longer horizons.

The loop idea did not appear out of nowhere. In October 2022, researchers at Princeton and Google published a paper called "ReAct: Synergizing Reasoning and Acting in Language Models." Their insight was that a model which interleaves explicit reasoning with concrete actions — thinking a step, doing a step, looking at the result, thinking again — performed far better on interactive tasks than a model that only reasoned or only acted. A few months later, in February 2023, Meta's Toolformer showed a complementary piece: a model could learn, on its own, when calling a tool would help — a calculator for arithmetic, a search engine for facts — simply by checking whether the tool call made its own predictions better. Between ReAct and Toolformer, the two ingredients were in place: a loop that reasons about what to do next, and a mechanism for reaching outside the model's own weights to do it.

How a model learns to call a tool

Tool use deserves a closer look, because it is where the magic — and most of the breakage — actually happens. A language model produces text. A tool call is text with consequences, and the bridge between the two is a format the model has been trained to produce reliably. In practice, the developer describes each available tool to the model in a structured way: its name, what it does, and what inputs it takes. When the model wants to search the web, it outputs a structured call naming the tool and supplying the arguments. The framework reads that call, runs the tool, and hands the result back as text the model can read. This is what "function calling" means in the products from OpenAI, Anthropic, and Google: a contract between the model and the code around it.

The quality of that contract decides a lot. A tool with a vague description gets used wrongly or not at all. A tool that returns a wall of unstructured text floods the model's limited context and drowns the useful signal. A tool that can delete files or move money needs a permission model, because the model will eventually call it with the wrong argument — not out of malice, but because it misunderstood the goal. Good agent engineering is, to a surprising extent, good tool design: small tools, clear names, tight descriptions, predictable outputs, and guardrails on the dangerous ones.

There is also the question of memory. A language model has no memory between sessions unless someone builds it one. Early agents kept theirs in files — AutoGPT wrote its goal and its plan to disk between iterations, because that was the only way to survive running out of context. Modern agents do the same thing with more polish: summaries of past steps and a scratchpad of facts learned along the way. None of this is the model "remembering" in a human sense. It is record-keeping, and its quality limits how long an agent can work before it starts repeating itself or forgetting what it already tried.

The first agent wave, and what it taught us

AutoGPT appeared on GitHub on March 30, 2023, two weeks after GPT-4 was released. The pitch was simple and intoxicating: give it a goal, walk away, come back to finished work. It crossed 30,000 stars in thirteen days and passed 100,000 soon after — by most accounts the fastest-growing repository in GitHub's history at the time.

The reality was messier. The agent could write its own sub-goals, but it had no reliable way to tell whether it had actually achieved them. It looped. It contradicted its own earlier steps. It burned through API budgets on repeated searches. It produced confident summaries of work it had not done.

That sounds like a damning verdict, and in a sense it is. But it is also how engineering works. The first wave was a genuine insight attached to technology that was not ready, and the failures were specific enough to point at what needed building: better models that follow instructions more reliably, structured tool interfaces instead of parsing free text, sandboxed execution so a runaway agent could not harm the host machine, and graded benchmarks so claims could be checked instead of believed. The two years after AutoGPT were spent building exactly those things, and the agents that work today are the beneficiaries.

One benchmark matters more than the rest for judging progress: SWE-bench, which tests whether an agent can resolve real GitHub issues from open-source projects. It is a hard, honest test, because the answer is not a matter of opinion — either the fix passes the project's tests or it does not. Scores on SWE-bench Verified climbed fast after 2023, and by 2026 the best agents were resolving the large majority of the benchmark's tasks. That is a real measure of progress, and it is also a warning: a benchmark score is not a guarantee. Resolving a well-specified issue in a tested codebase is a different job from handling a vague request in a messy, untested one.

Agents that write code

Coding is where agents have gone furthest, for a reason that has nothing to do with fashion. Code has a ground truth. It compiles or it doesn't. Tests pass or they don't. The linter is happy or it isn't. That gives the agent something almost no other domain offers: a fast, cheap, deterministic way to check its own work. When the test fails, the error message tells the agent exactly what went wrong, and it can try again. The loop works because the observation step is reliable.

The products in this space now fall into two rough groups. The first works beside you, in your editor or terminal: Anthropic's Claude Code, Cursor, and Aider are the best-known examples. You describe a change, the agent reads the relevant files, edits them, runs the tests, and shows you the result. You stay in the loop, reviewing each step.

The second group works away from you, in the cloud. Devin, from Cognition, was the first to make a splash here: give it a ticket, and it spins up its own virtual machine with a shell, an editor, and a browser, works through the task, and comes back with a pull request. GitHub's Copilot coding agent does something similar inside GitHub itself — assign it an issue the way you would assign a teammate, and it opens a draft pull request. OpenAI's Codex can run many such tasks in parallel sandboxes. Google's Jules, backed by Gemini, clones your repository into a Google Cloud virtual machine, shows you a plan before it starts, and proposes a pull request when it is done.

What these tools are genuinely good at, right now, is the kind of work a capable junior developer would do: fixing a well-described bug, adding a small feature with clear acceptance criteria, writing tests, updating dependencies, and mechanical refactoring. What they are not good at is work that needs judgment about the whole system — deciding how a feature should behave when the requirements are ambiguous, or redesigning an architecture. Give them tasks where success is checkable, and review the pull request the way you would review a colleague's: carefully, with the tests actually run.

Agents that answer customers

Customer service is the other place agents have found real work, and it is a useful contrast with coding, because here there is no compiler to check the answer. A support agent reads a customer's message, looks up their order or account, and either resolves the issue or escalates it. The tools are the company's own systems: the order database, the refund API, the knowledge base.

The companies doing this well have learned to be careful about scope. An agent that can check an order status and issue a refund under a clear policy is a different risk from an agent that can promise anything in a free-form conversation. The best deployments draw a hard line: the agent handles the routine, well-defined cases, and anything ambiguous, angry, or expensive goes to a human. They also log everything, because when a customer complains about what the agent said, someone needs to read the transcript.

Research agents and teams of agents

A third pattern is the research agent: give it a question, and it searches, reads, compares sources, and returns a report with citations. This sounds like a smarter search engine, and in some ways it is, but the difference is the loop. A search engine returns links. A research agent reads the links, notices that two sources disagree, searches for a third, and adjusts its conclusions. Used well, it can compress hours of reading into minutes. Used badly, it produces a polished report that cites sources it never actually read.

Where agents fail

The failure modes are predictable, and knowing them is most of the skill of using agents well.

The first is goal drift. Over a long run, the agent's understanding of the goal shifts. It starts fixing the bug and ends up refactoring an unrelated module, or it solves a simpler version of the problem than the one you asked for. The longer the run, the worse this gets.

The second is the confident wrong action. A chatbot's worst failure is a bad sentence. An agent's worst failure is a wrong action taken in the world: a file deleted, a customer refunded twice, a message sent to the wrong person. The model does not know what it does not know, and it will act on a misunderstanding with the same confidence it acts on a correct understanding.

The third is the loop that never ends. The agent tries something, it fails, it tries a slight variation, it fails again, and it keeps going until the step budget or your API budget runs out. Modern agents have better stopping rules, but the pattern persists whenever the task is genuinely hard and the agent has no way to recognise that it is stuck.

None of these are reasons to avoid agents. They are reasons to design around them: short runs, clear goals, checks you trust, and a human who reviews the result before it matters.

The bill, the risk, and the human in the loop

Two practical questions dominate every real deployment, and neither is about the model. The first is cost. An agent run is not one model call; it is dozens or hundreds, each with a long context that grows as the agent accumulates observations. A task that looks cheap as a single chat becomes expensive as a loop. Teams that run agents at scale track cost per completed task, not cost per call, and a shorter, better-specified task is cheaper than a long, vague one — in money, time, and errors. Setting a step budget and a spending cap per task is not bureaucracy. It is the difference between a tool and a leak.

The second is permission. An agent that can act needs credentials, and credentials are the oldest security problem in software. The rule is the same one that governs human employees: least privilege. Give the agent the smallest set of permissions that lets it do its job, in a sandbox or a disposable environment where a mistake cannot reach production data or customer systems. Never hand an agent your production database credentials because it asked nicely. The products that take this seriously — Devin running in its own virtual machine, Copilot's agent running in an ephemeral GitHub Actions environment — do so because the alternative has already bitten people.

Human oversight ties this together. The strongest pattern in real deployments is not full autonomy but supervised autonomy: the agent works, and a human reviews at the points where a mistake would be expensive. In coding, that point is the pull request. In support, it is the refund above a threshold, or any message to an angry customer. The human is there to catch the one error in twenty that matters.

Questions people ask before handing over a task

How is an agent different from a chatbot?

A chatbot's output is text. An agent's output includes actions: it calls tools, changes files, sends messages, updates systems. A chatbot answers; an agent does. If the software cannot change anything outside the conversation, it is not an agent, whatever the marketing says.

What is the safest first agent project?

Pick a task that is repetitive, well-defined, and easy to check. Triaging incoming support tickets into categories is a good one. So is fixing typos and small bugs in a tested codebase, or summarising a set of documents against a checklist. Avoid anything irreversible, anything involving money, and anything where a wrong answer would reach a customer before a human sees it.

How much do agents cost to run?

More than a single chat, less than a person's hour — usually. The honest answer is that it depends on the model, the length of the task, and how many retries the agent needs. Track cost per completed task for your own workload before deciding whether the economics work for you.

What should I look for when choosing an agent product?

Four things: whether it runs in a sandbox or a disposable environment, whether you can see and approve its plan before it acts, whether it logs everything it did, and whether you can set spending and step limits. A product that cannot answer those four questions clearly is not ready for your systems.

A short checklist before you hand over the keys

Agents are real, they are useful, and they are not magic. They are a loop — perceive, plan, act, observe — wrapped around a language model and tools. That loop is good at work where success can be checked, and it is dangerous where it cannot. The products worth your attention run in sandboxes, show their work, and accept a human review at the end.

Before you let one act for you, run through this list. Write the task down with a clear definition of done. Give the agent the smallest permissions that let it do the job. Set a step budget and a spending cap. Decide in advance which actions need your approval — anything irreversible, anything involving money, anything a customer will see. Read the result before it goes live, every time. And keep the loop short: a task that takes an agent ten minutes is a tool; a task that takes it ten hours is a gamble.

Used that way, an agent is what the best version of the idea always promised: not a replacement for judgment, but a way to spend yours where it counts.

Was this article helpful?

Muhammad Tahir

Author

 

Get new articles by email

 

Comments