Building AI agents with Claude in Amazon Bedrock

AnthropicAbout 5 min readAug 1, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

  • AI Agents: Autonomous systems that can reason, plan, and take multiple steps to achieve an objective.
  • Amazon Bedrock: A fully managed service providing access to foundational models (like Claude) through a unified API.
  • Strands Agent: An open-source SDK for building agentic applications, requiring models, tools, and prompts.
  • Models, Tools, and Prompts: The three core components required to create a Strands Agent.
  • MCP (Model Connector Protocol) Servers: Provide external context and capabilities to LLMs, enabling them to interact with external APIs and data sources.
  • Cloud Code: An AWS service integrated into VS Code, allowing developers to interact with AWS services and AI models directly from their IDE.
  • CDK (Cloud Development Kit): A framework for defining cloud infrastructure in code using familiar programming languages.

Building AI Agents with Claude in Amazon Bedrock

Introduction

The presentation focuses on building intelligent, autonomous AI systems using Claude within the Amazon Bedrock environment. It introduces Strands Agent, an open-source SDK designed to simplify the creation of agentic applications.

Amazon Bedrock and Foundational Models

  • Amazon Bedrock provides access to powerful foundational models like those in the Claude family through a unified API.
  • It offers model choice, guardrails, and enterprise-grade security by default.
  • Bedrock allows users to build and scale AI applications globally.

Defining AI Agents

  • An AI agent is defined as an autonomous system capable of reasoning, planning, and executing multiple steps to achieve a specific objective.
  • The agent creates a plan, takes actions based on the plan, evaluates the results, and adjusts its approach until the objective is met.

Strands Agent SDK

  • Strands Agent is an open-source SDK for building agentic applications, announced recently by AWS.
  • It requires three core components: models, tools, and prompts.
  • The SDK aims to provide flexibility, allowing the model to reason effectively.
  • The architecture is straightforward: a prompt is sent to the Strands Agent, which uses a defined model and tools to process the request.
  • Claude 3.7 is the default model.
  • Strands Agent comes with built-in tools, reducing the need for extensive custom code.
  • It supports deployment on EC2, Lambda, and ECS.
  • The presenters encourage community contributions to the open-source project.

Workshop Setup

  • Participants are provided with pre-configured AWS accounts and VS Code environments accessible through a browser.
  • The workshop involves hands-on coding exercises to demonstrate the capabilities of Strands Agent.

Strands Agent Demo: Math Video Creation

  • A demo showcases a Strands Agent creating a math video, specifically plotting a quadratic equation using an MCP server.
  • The agent generates the video content, similar to the style of "3Blue1Brown."
  • The code for this demo is available on the GitHub repository.

Enabling Bedrock Models

  • Participants need to enable specific models (Claude 3.5 Sonnet, Claude 3.5 HiPo) within the Amazon Bedrock console.

Module 1: Weather and Word Count Agent

  • The first exercise involves creating a weather agent that retrieves weather information and counts the words in the response.
  • The agent uses the HTTP request tool to fetch weather data from an API (http://weather.gov).
  • A custom tool is created to count the words in the weather report.
  • The code demonstrates how to define a system prompt, specify tools, and execute the agent.
  • The presenter highlights the simplicity of creating custom tools using the @tool decorator.
  • The agent is able to determine the latitude and longitude of a city and pass it to the API endpoint.

Module 2: MCP Server Integration

  • The second exercise demonstrates integrating Strands Agent with MCP servers.
  • MCP servers provide additional context and capabilities to the agent.
  • The example uses MCP servers for AWS documentation lookup and diagram generation.
  • The agent is tasked with retrieving AWS Lambda documentation and creating a diagram of a website using Lambda and S3.
  • The agent breaks down the task into steps: searching documentation, reading documentation, and creating a diagram.
  • The presenter demonstrates how to download and connect to MCP servers using uvx.
  • The agent successfully generates an AWS architecture diagram.

Module 3: CDK Agent Creation with Cloud Code

  • The final exercise involves creating a new Strands Agent for AWS CDK (Cloud Development Kit) using Cloud Code.
  • Cloud Code is used to generate the code for a CDK agent that can create AWS infrastructure.
  • The agent is tasked with creating a simple S3 bucket using CDK.
  • Cloud Code analyzes existing files to understand how to create the new agent.
  • The agent generates the CDK code, including security best practices.
  • Cloud Code provides information on the cost and resources used during the code generation process.

MCP Use Cases

  • MCPs provide extra context to the model to perform actions, read documentation, and connect to external applications.
  • MCPs are the "USBC" of connecting to LLMs.
  • Examples of AWS MCP servers include documentation lookup, Bedrock knowledge base integration, cost analysis, and diagram generation.

Conclusion

The workshop demonstrates how to build AI agents using Claude in Amazon Bedrock with the Strands Agent SDK. It covers the core concepts of agentic systems, the simplicity of the Strands Agent framework, and the power of MCP servers in extending the capabilities of LLMs. The use of Cloud Code further streamlines the development process. The presenters encourage participants to explore the open-source project and contribute to its development.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.