trendingzones

AI & ML — INTRODUCTION

What Is an AI Agent? LLM + Tools + Memory

Every topic so far in this series has been about a model generating text. An agent does something different: it can decide it needs to do something, do it, and use the result to decide what to do next.

The Quick Answer

An AI agent is a large language model combined with two things a plain chatbot doesn’t have: tools it can call to take real actions — searching the web, running a calculation, querying a live API — and memoryof what it has already done and found out so far in the current task. Instead of only producing a single block of text, an agent can recognize that it doesn’t yet have enough information, go get it, and use what it finds to decide its next move — repeating that cycle until the task is actually finished.

A Chatbot Can Only Talk. An Agent Can Act.

Ask a plain chatbot what today’s weather is in a specific city, or to multiply two large numbers precisely, and it runs into the same wall every time: it has no way to check anything outside what it learned during training. It can only generate plausible-sounding text — which, for anything time-sensitive or exact, is either an honest refusal or a guess that might be wrong. An agent with the right tool doesn’t have that problem — it calls the tool, gets a real answer, and reports that instead of guessing.

Watch an Agent Work Through a Task, Step by Step

A single question can take several rounds of thinking and acting, especially when one step depends on the result of another. Step through this example to see the loop in action:

What the Experts Say

A widely cited 2022 paper named ReAct (“Reason + Act”) formalized exactly this loop, having a model generate a reasoning step and an action step together, in an interleaved way, rather than only reasoning in one long block. The authors found this combination helps “overcome issues of hallucination and error propagation prevalent in chain-of-thought reasoning,” because acting lets the model check its reasoning against real information instead of relying purely on what it already believes.

Source: Yao et al., “ReAct: Synergizing Reasoning and Acting in Language Models,” arXiv:2210.03629

Fun Fact

The “memory” an agent uses while working through a task isn’t a separate system by default — it’s usually just the growing conversation inside the model’s context window. Every tool result gets added to that same window, which is exactly why long-running agent tasks can run into the context limits covered there.

Test Yourself

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

In the temperature example, why did the agent need two separate tool calls instead of one?

According to Yao et al.’s ReAct paper, what problem does interleaving reasoning and acting help address?

Ready to see exactly how tool calling works under the hood, and the ReAct loop in more technical detail? Continue to the Intermediate level →