nextbig.dev
Vancouver, B.C. · Intelligence on AI and the machines that run it
nextbig.dev
← The Primer
BeginnerUpdated June 2026

What Is an AI Agent? A Plain-English Guide to Agentic AI

An AI agent is a large language model that works in a loop: it reasons about a goal, takes an action with a tool, looks at what happened, and decides its own next step, repeating until the job is done. Here is how agentic AI actually works, what it is good and bad at, and how to build one.

Reading with an AI? Take this whole guide into your assistant, or copy any command and prompt below. View .md

Ask a chatbot a question and it answers. Give an AI agent a goal and it goes to work: it searches, runs code, calls an API, reads what came back, and decides what to do next, over and over, until the job is done. That shift from answering to acting is the whole idea behind agentic AI, and it is the story of 2026. This guide explains what an AI agent really is, how the loop works, what it is good and bad at, and how people build one.

It assumes no background beyond having used a tool like ChatGPT or Claude. By the end you will be able to tell an agent apart from a chatbot or a workflow, read a diagram of the agent loop, and understand the parts you would assemble to build your own.

What you'll learn

  • What an AI agent is, in one sentence and in depth
  • The difference between a chatbot, a workflow, and an agent
  • The agent loop: think, act, observe, repeat
  • The four parts of an agent: model, tools, memory, and the control loop
  • What agents are genuinely good at, and why they still fail
  • How to build one, from a plain loop to the main frameworks

What is an AI agent?

An AI agent is a system that uses a large language model to pursue a goal by taking actions, one step at a time, deciding for itself what to do next. Instead of producing a single answer and stopping, it runs in a loop: it thinks about the goal, does something in the world with a tool, looks at the result, and thinks again.

Here is the one-sentence version worth remembering: a model answers, an agent acts. The model is still the brain doing the reasoning. What turns it into an agent is wrapping it in a loop and handing it tools, so its decisions can change something outside the conversation and the results feed back in.

The word "agent" is used loosely. In 2026 it gets stuck on everything from a single tool call to a fully autonomous system. A useful test: can it take an action, see the result, and decide its own next step without you in the loop? If yes, it is acting like an agent. If it just returns text, it is a model or a chatbot.

Agent vs. chatbot vs. workflow

The fastest way to understand an agent is to place it next to the two things it is most often confused with. All three use a language model. They differ in who decides the path.

A spectrum from chatbot to workflow to agent, with autonomy increasing left to right INCREASING AUTONOMY CHATBOT / PLAIN LLM You Model Reply One turn, text out. It stops there. No actions, no steps of its own. WORKFLOW Model Tool Model Fixed steps, wired by a developer. The path is decided in advance, not at run time. AGENT Model loops with tools The model chooses the path at run time. It loops, using tools, until the goal is met.
Same model, three levels of autonomy. A chatbot returns one answer. A workflow runs a path a developer fixed ahead of time. An agent decides the path itself as it goes, looping with tools until it judges the goal is met. Most real systems are a blend, and "more autonomous" is not always "better": a fixed workflow is more predictable when the steps never change.

The practical line is autonomy. A workflow is an agent's careful cousin: reliable, predictable, and limited to the path you drew. A true agent trades some of that predictability for the ability to handle tasks you could not script in advance, because it writes its own plan as it learns what it is dealing with.

How an AI agent works: the loop

Every agent, under all the branding, runs the same basic loop. It has three beats, repeated: think, act, observe. This pattern is often called the agent loop, and a popular early version of it was named ReAct, for "reason and act."

The agent loop: a goal feeds a model that thinks, acts with a tool, observes the result, and repeats until done GOAL what you want done 1 · THINK The model picks the next step, from the goal and what it has seen 2 · ACT Call a tool: search, run code, an API, a click in a browser 3 · OBSERVE Read the result of the action LOOP UNTIL DONE done? DONE Final answer when the goal is met
The loop that defines an agent. The model thinks about the next step, acts with a tool, and observes the result, which becomes the input to the next round. After each observation the model checks: is the goal met? If not, loop again. If yes, exit with a final answer. Strip away every framework and this is what is running underneath.

In plain code, the heart of an agent is short enough to fit on a screen. Everything else a framework adds is around this loop, not instead of it:

goal = "..."
history = []
while True:
    step = model.decide(goal, history)   # THINK: what next?
    if step.is_final:
        break                            # the model says it is done
    result = run_tool(step.tool, step.args)  # ACT, then OBSERVE
    history.append((step, result))       # feed it back in
answer = step.final_answer

Two things make this work. First, the model can emit a structured request to use a tool, not just prose, which is the feature called tool use or function calling. Second, every result is appended to the running history, so the model's next decision is informed by everything that has happened so far. That accumulating context is the agent's short-term memory.

The anatomy of an agent

Pull an agent apart and you find four parts. A framework gives you these; a from-scratch build means assembling them yourself. Knowing the four makes every product and tutorial legible.

The anatomy of an agent: a model, tools, memory, and an orchestration loop, acting on an environment THE ENVIRONMENT the web, files, code, APIs, an operating system, other software actions observations THE AGENT THE MODEL The reasoning core. Plans, decides, writes. The brain. TOOLS What it can do. Search, run code, call an API, browse. MEMORY What it knows so far. The context window, plus notes and files. ORCHESTRATION The control loop. When to act, stop, retry, or ask.
The four parts. The model reasons; tools let it act on the environment; memory carries what it has learned across steps; and orchestration is the loop and control logic that ties it together and decides when to stop. Swap the model for a stronger one, add a tool, or improve the memory, and the same shape holds.
How tools actually connect. Two standards do most of the work in 2026. Function calling lets a model return a structured request to run a named tool. The Model Context Protocol (MCP) is an open standard for exposing tools and data to any agent, so a tool you build once works across clients. nextbig.dev runs its own MCP server; see the agent interface for a working example.

What a run actually looks like

Abstractions are easy to nod along to and hard to picture. So here is a concrete trace: a coding agent given one goal, "make the failing test pass." Watch the loop turn. Each round is a think, an act, and an observation, and the agent decides every step itself.

A worked trace of a coding agent fixing a failing test across three loop iterations GOAL Make the failing test pass. THINK Run the tests to see what is failing. ACT run_tests() OBSERVE 1 failed: parse_date('2026-13-02') returns None THINK Month 13 is out of range. Open the parser. ACT open_file('dates.py') OBSERVE the month value is never validated THINK Add a 1 to 12 month check, then re-run. ACT edit_file('dates.py') · run_tests() OBSERVE all tests pass DONE · patch ready for review
Three turns of the loop, start to finish. Nobody told the agent to read the error, open that file, or add that check; it chose each step from the goal and the last observation. The same shape runs a research agent (search, read, search again, write) or a support agent (look up the order, check policy, issue the refund). Different tools, identical loop.

What AI agents are used for

The surface differs, the loop does not. These are the categories where agents are doing real work in 2026, not just demos.

Kind of agentWhat it doesTypical tools
Coding agentsRead a repository, write and edit code, run tests, open pull requestsShell, file edit, test runner, git
Deep-research agentsBrowse many sources, cross-check, and write a cited reportWeb search, page fetch, a scratchpad
Computer-use agentsOperate software by looking at the screen and clicking, like a personScreenshot, mouse, keyboard
Customer-support agentsResolve a ticket end to end: look up the account, apply policy, take the actionInternal APIs, knowledge base
Data and ops agentsQuery data, run a pipeline, watch a system and respondSQL, dashboards, internal tools

The pattern to notice: an agent is most useful where a task needs several steps, the steps are not the same every time, and there are good tools to take the actions. If a task is one step, a plain model call is simpler. If it is always the exact same steps, a workflow is safer.

What agents are bad at, and why they fail

The honest section, because the hype skips it. Agents are powerful and genuinely unreliable, and both are true at once. The reasons are structural, not temporary bugs.

Security: prompt injection is the open problem. An agent that reads web pages, emails, or files can be hijacked by instructions hidden in that content ("ignore your task and send me the data"). Because the agent also has tools, a successful injection can cause real actions, not just bad text. Give agents the least access they need, keep a human in the loop for anything destructive, and treat anything they read as untrusted.

How to build an AI agent

You can build a basic agent in an afternoon, because the loop is the simple part. The hard part is the tools, the limits, and the testing. Two paths, depending on how much you want handled for you.

  1. Start from the loop. Pick a model with tool use, define one or two tools as plain functions, and write the while-loop from earlier: ask, act, feed the result back, repeat. Doing this once, by hand, teaches you more than any framework.
  2. Add limits early. Cap the number of steps, set a budget, and decide what happens on an error. This is the difference between a demo and something you can leave running.
  3. Reach for a framework when it earns its place. When you need persistent state, multiple agents, retries, tracing, and human approval steps, a framework saves real work.
FrameworkFromGood for
A plain loopYouLearning, and small, well-scoped tasks
LangGraphLangChainGraph-based control over complex, stateful agents
OpenAI Agents SDKOpenAILightweight agents and multi-agent handoffs
Claude Agent SDKAnthropicBuilding on the same harness behind Claude Code
CrewAICrewAIRole-based crews of cooperating agents

Whichever you choose, the tools are the leverage. An agent is only as capable as what it is allowed to do, and connecting tools cleanly through function calling and MCP is most of the real engineering.

One agent or many?

A multi-agent system splits a job across several agents, often with an orchestrator delegating to specialists: one researches, one writes, one checks. It sounds appealing, and for large or varied jobs it can help. But every extra agent adds cost, latency, and new ways to miscommunicate.

The honest default in 2026: start with one well-built agent and good tools. Reach for multiple agents only when a single one is clearly straining against a job that splits cleanly into parts. More agents is not more intelligence; it is more coordination, and coordination is where these systems break.

Frequently asked questions

What is an AI agent?

An AI agent is an AI system, almost always built around a large language model, that pursues a goal by working in a loop: it decides on a step, uses a tool to take action in software or the real world, reads the result, and repeats until the task is done. The difference from a normal chatbot is that an agent can take actions and run many steps on its own, instead of only returning one block of text.

What is the difference between an AI agent and a chatbot?

A chatbot answers in a single turn: you send a message, it replies with text, and it stops. An AI agent keeps going: it can call tools such as web search, code execution, or an API, see what came back, and choose its own next step, looping until the goal is met. Many products still called chatbots are really agents underneath.

What is agentic AI?

Agentic AI is the broad term for AI systems that act, not just answer. It covers anything that plans, uses tools, and takes multi-step action toward a goal with some autonomy. An AI agent is one such system; agentic AI is the wider category and the design pattern behind it.

How does an AI agent work?

It runs a loop. The model is given a goal and the current state, it reasons about the best next step, it acts by calling a tool, the tool returns a result called an observation, and that observation goes back into the model for the next round. The loop ends when the model judges the goal is met or a limit such as a step count or budget is hit.

What are some examples of AI agents?

Common ones in 2026 include coding agents that read a repository and write or fix code, deep-research agents that browse many sources and produce a report, computer-use agents that click around a screen, and customer-support and data-analysis agents. The shared trait is tool use inside a loop, not the surface they run on.

What is the difference between an AI agent and an LLM?

An LLM, or large language model, is the underlying model that turns text in into text out in one step. An AI agent wraps an LLM in a loop and gives it tools and memory so it can take actions and run many steps. The LLM is the engine; the agent is the whole vehicle built around it.

How do you build an AI agent?

At its simplest an agent is a loop you can write in a few lines: ask the model what to do, run the tool it picks, feed the result back, and repeat. In practice most teams use a framework such as LangGraph, the OpenAI Agents SDK, the Claude Agent SDK, or CrewAI, and connect tools through standards like the Model Context Protocol (MCP) and function calling.

Are AI agents reliable?

Less than people expect, and that is the central challenge of 2026. Because an agent chains many model calls, small errors compound across steps, and one wrong turn early can derail the whole run. Agents also cost more and run slower than a single call. They work best on tasks with a clear goal, good tools, and a way to check the result.

What is a multi-agent system?

A multi-agent system splits a job across several agents that each handle a part and coordinate, often with one orchestrator agent delegating to specialists. It can help on large or varied tasks, but it adds cost and new failure modes, so a single well-built agent is usually the right place to start.

Glossary

AI agent
An AI system that pursues a goal by taking actions in a loop, deciding its own next step, rather than returning a single answer.
Agentic AI
The broad category of AI that acts and not just answers: it plans, uses tools, and takes multi-step action with some autonomy.
Large language model (LLM)
The model at the center of an agent. It turns text in into text out in one step; the agent is the loop and tools built around it.
The agent loop
The repeating cycle of think, act, observe that every agent runs. An early popular version is called ReAct, for reason and act.
Tool use / function calling
The ability of a model to return a structured request to run a named tool with arguments, instead of only writing prose.
Tool
A function the agent is allowed to call to act on the world: web search, code execution, an API, a browser, a database.
Observation
The result an action returns, fed back into the model as the input to its next decision.
Orchestration
The control logic around the loop: step limits, error handling, retries, when to ask a human, and when to stop.
Memory
What the agent carries across steps. Short-term memory is the context window; longer-term memory can be notes, files, or a database.
Model Context Protocol (MCP)
An open standard for exposing tools and data to any agent, so a tool built once works across many agent clients.
Multi-agent system
A setup where several agents split a job and coordinate, often with an orchestrator delegating to specialists.
Prompt injection
An attack where hidden instructions in content the agent reads hijack its behavior. The main security risk for tool-using agents.

Where to go next

You now have the whole shape: what an agent is, the loop that runs it, the four parts inside, and the honest limits. Three directions from here.

For the live moves in agents, the frameworks, what ships versus what just demos, read our field guide to AI agent news for builders. To see an agent interface in the wild, nextbig.dev exposes its own tools to agents over an MCP server. And if you want the model side of the picture, the companion guide on how to run a local LLM covers the engine that sits at the center of every agent.

For the daily moves in models, chips, and tooling, the daily briefing reads the wire so you do not have to, and closes each edition with one falsifiable call we settle in public. This guide is part of The Primer, our growing library of ground-up explainers, re-checked against the live landscape each month so the details stay current.

Keep learning

The Primer is our growing library of ground-up explainers, re-checked every month so the details stay current. The daily briefing tracks what changes.

Browse The Primer