Applications with foundation models · 10 min
AI agents with Amazon Bedrock AgentCore
In this lesson you will learn what an AI agent is, how its loop with tools and memory works, what Model Context Protocol (MCP) solves and what each Amazon Bedrock AgentCore service that appears on the exam is for.
An AI agent is an application that uses a foundation model to carry out tasks on its own, instead of only answering. For example, if you write "move my flight to Monday" to an airline's chatbot, the chatbot explains how to do it, while an agent makes the change: it looks up your reservation, checks the Monday flights, calls the airline's API and confirms it to you.
What is an AI agent?
AWS defines an AI agent as a program that interacts with its environment, collects data and uses it to carry out tasks on its own, toward goals that people set. In other words, the person sets the goal and the agent decides which actions to take. The Amazon Bedrock user guide says the same thing in more technical terms, since it describes the agent as an application that orchestrates in loops, interpreting inputs and producing outputs with a foundation model. Orchestrating means coordinating the steps: deciding what is done first, what comes next and with which tool.
To illustrate this idea, AWS gives several business examples:
- An agent that helps process insurance claims.
- An agent that makes travel reservations with the company's APIs.
- A customer service agent that searches the internal documents and hands the case to a person if it doesn't resolve it.
In all three cases the person only says what they want to achieve. For example, with the reservations agent, the traveler writes "I want to go to Lima on Friday and come back on Sunday", and the agent decides which flights to search for, which one to book and when to ask them to confirm.
How does an agent's loop work?
An agent works in a four-step loop that repeats on each pass:
- The model reasons and plans the next step.
- The model chooses a tool, which can be the reservations API, a database or an AWS Lambda function.
- The agent runs that tool.
- The model observes the result and decides what comes next.

The loop repeats until the agent reaches the goal, and at that point it answers the user. For example, to move the flight to Monday, on the first pass the agent looks up the reservation, on the second it checks the Monday flights and on the third it makes the change, and only then does it confirm to the customer.
Throughout the loop the agent needs memory, because the model by itself doesn't remember anything from one call to the next.
Short-term and long-term memory
An agent's memory comes in two types. Short-term memory stores the turns of a session, that is, the messages that go back and forth in the same conversation. For example, if someone asks "what's the weather like in Seattle?" and then "and tomorrow?", the agent knows that the second question is also about Seattle.
Long-term memory, on the other hand, stores what matters from many sessions. For example, if a customer said they prefer a window seat, the agent offers it to them on the next reservation, even if it is days later.
Which memory is missing?
0 of 3Tap the column that matches each problem.
The customer asks "and how much does it cost?" and the agent doesn't know which product they mean, even though they said it in the previous message
Every time the customer opens a new chat, the agent asks for their member number again
The agent forgets that the customer prefers morning flights, even though they said so a month ago
What does Model Context Protocol (MCP) solve?
An agent can only do what its tools allow it to do, so connecting it to those tools is a big part of the work. Model Context Protocol (MCP) is an open protocol that gives agents a standard way to communicate with external data and services, that is, with programs that are not part of the agent.

Without MCP, each tool is called in a different way and someone has to write separate code to connect each one. With MCP, the agent has an MCP client and each tool sits behind an MCP server, so they are all called the same way. That is why an MCP server is written once and any agent or application that speaks MCP can use it. For example, if the airline puts its reservations system behind an MCP server, its customer service agent and its sales agent both use it without anyone writing a separate connection for each one.
Strands Agents and Amazon Bedrock AgentCore
To write the agent, AWS released Strands Agents, an open source SDK, in May 2025. Open source means code that anyone can see and use. For Strands, an agent is made up of three things, which are a model, some tools and a prompt, and the model decides the steps. Programming the agent is outside the scope of the exam, which only asks you to know that Strands Agents is used to write it and AgentCore is used to run and operate it.
Amazon Bedrock AgentCore is the AWS platform for building, deploying and operating agents. It accepts any framework, such as Strands Agents, LangGraph, CrewAI or LlamaIndex, and any model, inside or outside Bedrock. It is also made up of several services that are used together or separately. For example, the airline can write its agent with Strands Agents and use AgentCore to put it to work and keep watch over it.

In older study material you will find Amazon Bedrock Agents, a service that is now called Agents Classic and that no longer accepts new sign-ups. For new agents, the Bedrock documentation recommends Strands Agents with AgentCore.
Runtime, Memory and Gateway

Three AgentCore services make up the foundation of an agent:
- Runtime, which is where your agent runs, with no servers to manage and with each session isolated, so that one conversation doesn't see the data of another.
- Memory, which stores short-term memory and extracts long-term memory.
- Gateway, which turns REST APIs, which are APIs called over the internet, Lambda functions and MCP servers into MCP tools, with a single entry point, and which also comes with integrations for Salesforce, Slack, Jira, Asana and Zendesk.
For example, the airline's agent runs in Runtime, remembers with Memory that the customer prefers a window seat and uses Gateway to call the reservations API as if it were just another MCP tool.
Other AgentCore services
Besides those three, AgentCore has other services:
- Identity, which handles the identity and the credentials the agent uses to call other services on behalf of the user.
- Policy, which checks each tool call that goes through Gateway before allowing it, with rules written in Cedar, a language for writing permissions, or in natural language.
- Observability, which traces each step of the agent, that is, keeps a record of what it did, and stores the metrics in Amazon CloudWatch, the AWS service for monitoring applications.
- Evaluations, which measures how well the agent performs.
- Code Interpreter, which runs code in an isolated environment.
- Browser, which browses web pages from a managed browser in the cloud.
These services set limits and let you see what the agent does. For example, with Policy the airline can write the rule "the agent cannot give refunds above a certain amount", and with Observability it can review step by step why the agent changed a flight it shouldn't have.
Match each need with its AgentCore service
0 of 5 pairsTap a need and then the service.
0 of 5 pairs.
On the exam
The phrases "carry out multi-step tasks on its own", "call the company's APIs" or "process claims" point to an agent, and "standard protocol for connecting tools" points to MCP. For the AgentCore services, these phrases point to each one:
- "Expose APIs or functions as tools", which points to AgentCore Gateway.
- "Remember across sessions", which points to AgentCore Memory.
- "Limit which actions the agent can take", which points to Policy.
- "Credentials to act on behalf of the user", which points to Identity.
- "Run the agent without servers", which points to Runtime.
For example, if the question says that a bank wants its agent to check balances with each customer's account and not with a general account, the phrase "on behalf of the user" points to Identity.
cloud path tip: in an account on the new AWS experience, Amazon Bedrock and Amazon Bedrock AgentCore are on the free plan. That account does not support cross-Region inference, so the model your agent uses has to be available within the us-east-2 Region. In a full account you choose the Region.
Review question
A team builds agents and wants its internal orders APIs and its AWS Lambda refunds function to show up as MCP tools, without writing each integration by hand. What should it use?
Next
- What is Amazon Bedrock AgentCore?, the AgentCore overview, with the table of services.
- Take an AI Practitioner practice exam at /examenes.