Established 2026  ·  Free Educational Resources for All

Computer & AI · Artificial Intelligence

AI Agents: When AI Takes Action, Not Just Talks

A chatbot answers a question and stops. An AI agent can search the web, run code, check the result, and try again — all on its own. Here's how that loop actually works, and where human oversight still matters.

EDUSAMBAM Editorial Team | 12 min read | Artificial Intelligence
🔊 LISTEN TO THIS ARTICLE
SAVE YOUR EYES • IMPROVE YOUR LISTENING
Listen to the article instead of relying only on continuous screen reading.
Ready to read the article.

The prompt engineering article in this series covered how to write instructions that get a good single response out of an AI model. An AI agent takes that same underlying language model and puts it in a loop: instead of producing one answer and stopping, it can decide on an action, carry that action out using external tools, look at what happened, and decide on the next step — repeating until the task is actually done. This guide looks at how that loop works, what "tools" actually means in practice, and why more autonomy also means more risk.

1.From Chatbot to Agent: What Actually Changes

A standard chatbot interaction is a single round trip: a prompt goes in, a block of predicted text comes out, and the conversation waits for the next human message. Nothing outside that text generation happens automatically.

An agent changes the loop rather than the underlying model. The same language model is still just predicting text, but that predicted text can now include a structured instruction to use a tool — like "search the web for X" or "run this code" — which a surrounding system actually executes, feeds the result back in as new context, and lets the model predict its next step from there.

Key Idea

The model itself doesn't gain new abilities to "act in the world." What changes is the software wrapped around it, which watches for tool-use instructions in the model's output, actually runs them, and hands the results back — turning one prediction into a repeating cycle.

2.The Agent Loop: Reason, Act, Observe

Most AI agents follow a repeating pattern often called ReAct — short for reason and act:

This continues until the model determines the task is complete, produces a final answer, or hits a limit set by the system, such as a maximum number of steps.

3.Tools: How an Agent Actually Takes Action

A tool is simply a defined function the surrounding system makes available, described to the model in terms it can request by name. Common tools include a web search function, a code execution environment, a calculator, a file reader, or a connector to an external service like a calendar or database.

Tool TypeWhat It Lets the Agent Do
Web searchRetrieve current information beyond its training data
Code executionRun calculations, process data, or test a solution
File accessRead or edit documents relevant to the task
External APIsInteract with services like email, calendars, or databases

The model never runs these tools directly — it only predicts a structured request to use one, which the system executes and reports back on.

4.Planning Multi-Step Tasks

For simple tasks, an agent can improvise one step at a time. For longer, multi-part tasks, many agent systems first ask the model to produce an explicit plan — a rough sequence of steps — before executing any of them, then revisit and adjust that plan as new information comes in from each tool result.

This planning step matters because a language model's reasoning is still built from the chain-of-thought principle covered in the prompt engineering article: writing the plan out explicitly gives the model a clearer, more specific context to reason from at each later step, rather than trying to hold an entire multi-step task in mind implicitly.

Real-World Example

A coding agent asked to fix a failing test might plan to first read the relevant file, then run the test to see the exact error, then edit the code, then re-run the test to confirm the fix — observing and adjusting at each step rather than guessing the entire fix in one attempt.

5.Single Agents vs. Multi-Agent Systems

Some tasks are handled by one agent working through a full loop on its own. Others split the work across multiple agents, each with a narrower role, coordinating with one another:

ApproachHow It WorksTrade-Off
Single agentOne model loop handles reasoning, tool use, and the full taskSimpler to build and debug, but can struggle on very complex tasks
Multi-agentSeparate agents specialise — one plans, one researches, one writes — and pass work between each otherCan handle more complex tasks, but adds coordination overhead and more places for errors to compound

6.Risks of Autonomy and Why Oversight Still Matters

An agent that can take real actions — sending a message, deleting a file, spending money, editing production code — can also do real damage if it misunderstands the task or a tool result. The hallucination risk covered in the LLM and AI ethics articles doesn't disappear in an agent; it can compound, since a wrong assumption made at one step becomes part of the context for every step after it.

For that reason, most responsible agent systems limit autonomy deliberately: requiring human approval before sensitive actions, restricting which tools are available for a given task, capping the number of steps an agent can take unsupervised, and logging every action so it can be reviewed afterward.

7.Where Agents Are Used Today

Agent-style systems already show up in coding assistants that can read a codebase, make edits, and run tests; research assistants that search multiple sources and compile findings; customer support systems that look up an order and issue a resolution; and personal productivity tools that can check a calendar and schedule a meeting. In each case, the pattern is the same underlying loop — reason, act using a tool, observe the result, and continue — applied to a specific, bounded set of tools for that task.

A Closing Thought

An AI agent isn't a fundamentally different kind of intelligence from the chatbot covered earlier in this series — it's the same next-word prediction, placed inside a loop that can call real tools and react to real results. That combination is what turns a system that can only talk about a task into one that can actually carry part of it out, which is exactly why the oversight and verification habits covered throughout this series matter even more once a model's output can trigger a real action rather than just words on a screen.

Test Your Understanding

Practice Quiz

10 questions. Select an answer for each, then submit to see your score instantly.

0 of 10 answered
0/10
You scored 0%
Keep practicing
1.What is the main difference between a standard chatbot interaction and an AI agent?
2.What do the letters in "ReAct" stand for, as described in the article?
3.According to the article, what does the model itself actually do when it "uses a tool"?
4.Why do many agent systems have the model produce an explicit plan before executing a multi-step task?
5.What is a trade-off of a multi-agent system compared to a single agent, according to the article?
6.Which of these is listed as a tool type an agent might use?
7.Why can hallucination risk compound in an agent, according to the article?
8.Which of these is mentioned as a way responsible agent systems limit autonomy?
9.In the coding agent example, what does the agent do after editing the code to fix a failing test?
10.What is the article's closing point about AI agents?
← Previous: Prompt Engineering: Getting Better Results From AI ToolsGateway