Data Science & Machine Learning 101

Data Science & Machine Learning 101

AI Agents

What They Are, How They Work, and Why They Matter

BowTied_Raptor's avatar
BowTied_Raptor
Jun 14, 2026
∙ Paid

AI agents are one of the most talked-about ideas in modern AI, and for good reason. If chatbots gave people their first glimpse of what LLMs can do, agents are what made many people start imagining truly autonomous software.

An agent is a system that can perceive its environment, decide what to do, use tools, take actions, evaluate results, and continue until a goal is accomplished.

A normal chatbot can answer a question. An agent can answer a question, realize it lacks information, search for that information, call a database, use a calculator, inspect files, generate code, execute it, evaluate the output, fix mistakes, and only then return a response.

AI agents vs. chatbots: What's the difference?

That is why agents feel like such a leap forward. They turn AI from something that merely generates text into something that can actually do work.

What an AI agent really is

At a high level, an agent has 3 core ingredients:

First, it has an environment. This is the world it operates in. For one agent, that environment might be the web. For another, it might be a codebase, a filesystem, a database, an email inbox, or a customer support platform.

Agents in AI - GeeksforGeeks

Second, it has a set of actions it can take. These actions define what the agent is capable of doing. If an agent can only read information, it is useful. If it can also write information or trigger workflows, it becomes far more powerful.

Third, it has a goal that it is trying to achieve in the environment, with a set of actions it has authority over.

This is why the same underlying foundation model can behave very differently depending on the environment and tools you give it. A model with no tools is mostly limited to what it already knows. The same model, plugged into search, databases, code execution, and APIs, suddenly looks much smarter.

Tools are what make agents powerful

Tools are the bridge between language and action.

Without tools, a model can generate text, maybe code, maybe an explanation. With tools, it can inspect the world and change it.

Some tools are about knowledge augmentation. These help the model access information it does not reliably have in memory. Text retrieval, image retrieval, SQL querying, email reading, Slack search, internal document search, and web browsing all fit here. These tools keep the model grounded in current, or domain specific information.

Literature Review] LEKA:LLM-Enhanced Knowledge Augmentation

Some tools are about capability extension. Models are notoriously shaky at certain tasks such as arithmetic, exact unit conversions, reliable code execution, or processing data intensive workflows. A calculator, code interpreter, compiler, or specialized model can dramatically improve performance here. Instead of hoping the model mentally computes the right answer, you let it call something built specifically for that exact job.

And some tools are write actions. This is where agents become truly operational. A write action can send an email, update a CRM, modify a file, execute SQL, place an order, change a calendar, or trigger a transaction. This is also the point where the stakes rise sharply. Read-only tools make agents smarter, write tools give them consequences as well.

That is both the promise and the danger of agents.

Function calling

A big reason agents became practical is that model providers began exposing tool use in structured ways, often called function calling.

The idea is simple, you give the model a tool inventory: a list of available functions, what each function does, and what parameters each one expects. Then, when the user asks for something, the model decides whether to use a tool, which tool to call, and what arguments to supply.

Understanding Function Calling in Large Language Models! | by Pavan  Belagatti | Level Up Coding

In theory, this sounds clean, in practice, it introduces a new class of failure modes. The model might choose the wrong tool. It might choose the right tool with the wrong parameters. It might infer missing values incorrectly. It might hallucinate a nonexistent function. It might build a plan that looks plausible at a glance but falls apart when executed.

That is why agent design is about making tool use more reliable. Tool descriptions matter. Parameter definitions matter. The structure of the plan matters. The system prompt matters. The more ambiguous the interface, the more likely the agent is to fail.

The importance of planning

Once you give an agent multiple tools, it needs a way to decide how to use them. That is planning.

A plan is simply a roadmap: a sequence of steps needed to accomplish a task. Sometimes that plan is short and obvious. Sometimes it requires decomposition, validation, branching, and revision.

For example, imagine a user asks: “What was the best-selling product last week, and what is its price?”

A decent agent might plan something like this:

  1. Get the current date

  2. Retrieve top-selling products for last week

  3. Fetch product information for the winner

  4. Generate the response

That sounds straightforward. But even here, subtle problems show up immediately. What counts as “last week”? How many products should be

User's avatar

Continue reading this post for free, courtesy of BowTied_Raptor.

Or purchase a paid subscription.
© 2026 BowTied_Raptor · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture