Introduction

An AI agent is a system that uses a model to decide on and take actions toward a goal. The model at its center is usually a foundation model, which is a large model trained on a broad range of data. Where a simple assistant only produces text, an agent is able to call tools and act. This guide explains what an AI agent is, why the idea exists, how it operates, and when it is appropriate. A general overview of the models involved is provided in the guide on Amazon Bedrock.

What is it?

An agent combines three elements. The first is a model that performs reasoning, which is the process of working out what to do next. The second is a set of tools, where a tool is a function or an interface that the agent can call to perform an action or to obtain information. The third is a loop that repeats until the goal is reached. Because the agent can act rather than only reply, it can complete tasks that a text-only assistant cannot.

Why does it exist?

A foundation model on its own can produce text, but it cannot look up current information, change a record, or interact with other systems. Many useful tasks require these actions. The agent pattern exists so that the reasoning of a model can be combined with the ability to act, which allows the model to accomplish goals in the real world rather than only describe them.

How it works

The model is given the goal and a description of the tools that are available. It reasons about the next step, selects a tool, and provides the input for that tool. The tool is executed, and its result is returned to the model. The model observes the result and either takes a further step or concludes that the goal has been reached. This repeated cycle of reasoning, acting, and observing is often called the reasoning loop. The ability of a model to request a tool with specific input is known as tool use or function calling.

Architecture diagram

Goal | v Model reasons about the next step | v Model selects a tool and its input --> Tool runs | (Lambda function, ^ an interface, a query) | | |------ Model observes the result <--------| | v Repeat until the goal is reached, then return the result

Advantages

Disadvantages

Common use cases

Best practices

Common mistakes

Further reading in this library

Frequently Asked Questions

What is the difference between an AI agent and a chatbot?
A chatbot produces a text reply. An AI agent goes further by deciding on and taking actions, such as calling a tool to fetch data or update a record, in order to complete a task.
What are tools in the context of an agent?
A tool is a function or an interface that the agent can call to perform an action or to obtain information. The model chooses which tool to use and with what input.
How does an agent decide what to do?
The model is given the goal and a description of the tools. It reasons about the next step, selects a tool, observes the result, and repeats until the goal is reached. This cycle is often called the reasoning loop.
Are AI agents reliable?
An agent can behave unpredictably, because the model's decisions are not fixed. Reliability is improved by limiting the tools, applying guardrails, monitoring behavior, and requiring human approval for sensitive actions.
How are AI agents built on AWS?
The reasoning is provided by a foundation model in Amazon Bedrock, the tools are commonly AWS Lambda functions, and the coordination can be managed by Bedrock Agents or by AWS Step Functions.
Building AI Agents on AWS cover
Go deeper ยท Book as a Service™
Building AI Agents on AWS

This article is the summary. The book is the full, continuously updated reference: agent design, tool use, orchestration, guardrails, and multi-agent systems on AWS.

View the book