Case study

CategoryArticles
Updated: 11/19/2024Published: 11/19/2024

Amazon Bedrock Agents: Unlocking New Possibilities in Generative AI

Generative AI is a new trend, but implementing it in every use case and context where it could be beneficial can be challenging.

Recently, we published a blog post about Amazon Bedrock, which includes an overview of the builder tools this service provides. One of these tools is Bedrock Agents, which allows you to automate the use of Foundation Models (FMs) in AWS and connect them to other services. Put simply, you set them up once, and they do the work for you.

In this blog post, we’ll explore what Bedrock Agents are, how they work, real-world examples of their use, and their main features.

In this article, you will learn:

What are Amazon Bedrock Agents?

Amazon Bedrock Agents offer the ability to use foundation models (FMs) to automatically interpret user input, initiate API calls, retrieve needed information, and call additional APIs as required. Agents essentially act as orchestrators between FMs, data sources, software applications, and user interactions.

Let’s dive a little deeper into what you'll need to select or configure to use Amazon Bedrock Agents. Below, you’ll find a simple diagram illustrating how it works.

Foundation model (FM)

Agents for Amazon Bedrock leverage foundation models from leading AI companies like AI21 Labs, Anthropic, Cohere, Meta, Mistral AI, Stability AI, and Amazon. \ You select the foundation model that is already pre-trained, and you can fine-tune it with your own data. The agent invokes the model and leverages it to interpret users' input and generate responses based on the provided data.

Instructions

This simply instructs the Agent what to do; it is basically what you would normally instruct a person to do.

If the Agent should be responsible for reserving a table in a restaurant, you can write something like this:

“Start each interaction by greeting the user and asking for the reservation details. Gather information on the date, time, number of guests, and any seating preferences. Confirm all details back to the customer before finalizing. If the requested time isn’t available, offer alternative times close to the original request. Close the conversation by thanking the customer. If any issues arise, apologize and guide the user on what to do next.”

Action groups

An action group is something that is called by the Agent to perform the selected task. You define the action that will be done when the Agent will be called, which might be information retrieval, processing, or performing any other task. This can be performed by AWS Lambda function or an API schema.

The typical process, for example, for a chatbot app in a restaurant and how it leverages the action group is:

  • The user asks your chatbot to reserve a table.
  • The information is sent to the Bedrock Agent and the LM behind.
  • The bedrock agent leverages the action group (AWS Lambda) that will check the database (Amazon DynamoDB) of your reservation to identify and make the reservation for the user.
  • Bedrock Agent sends back the confirmation.

Memory

As the name suggests, this provides the possibility of using an Agent memory. Before this was introduced, Agents couldn’t remember what was happening in between each interaction, so one user could see the same information over and over. With this function, you can store the interactions separated by every user. Currently, only some FMs are supported.

How Do Amazon Bedrock Agents Work?

Every Bedrock Agent has to use an FM, instructions, and action group. The task for the Bedrock Agent can be based on an API call from your app, but it can also be connected to an event in your AWS environment (for example, a new file upload to S3).

Real-World Use Cases and Examples of Amazon Bedrock Agents

So, let’s dive into the Bedrock Agent example. If you are more interested in exact examples from AWS, visit this Git repo – Bedrock Agents Examples.

Customer support in e-commerce

  • Example: A Bedrock Agent is set up to handle customer support tasks, like order tracking, in an e-commerce application.
  • Actions: When a customer asks for an order status, the Agent pulls the order details from a database and generates a response. If the customer wants to cancel, the Agent checks the order status and updates the customer.

Automated financial assistance in banking apps

  • Example: A banking application uses Bedrock Agents for customer support. If a user asks about recent transactions, a Bedrock Agent can retrieve recent transactions and provide a breakdown.
  • Actions: The Agent automatically retrieves data, formats it into a clear response, and sends it to the user. If the user inquires about disputing a transaction, the Agent can trigger further steps, like filling out a dispute form or sending a notification to the fraud department.

Automated case review in healthcare

  • Example: A Bedrock Agent analyses past patient cases based on previous doctors’ notes, prescriptions, and treatments. This can be done by creating a knowledge base. For a new case, it reviews similar past cases and highlights what could be done differently to improve the treatment.
  • Actions: The Agent searches the knowledge base for relevant past cases, finds patterns or better approaches, and summarizes these for the doctor. If the Agent identifies a treatment alternative, it suggests it directly, helping doctors make more informed decisions.

What are the main benefits of using Bedrock Agents for business automation?

  • Security: Built on AWS's secure infrastructure, Bedrock Agents inherit robust security measures, including data encryption and compliance with industry regulations. Any provided data are saved in the selected region and are not shared with third parties.
  • Simple setup: No complex AI expertise needed, Bedrock Agents eliminate the need for deep machine learning expertise, making it accessible for businesses without AI-specialized teams.
  • AWS integration: Bedrock Agents can seamlessly integrate with existing AWS infrastructure, enabling businesses to enhance their current applications.

How does AWS ensure data privacy and security when using Bedrock Agents?

As usual, AWS secures your data as much as possible, but you are partly responsible for setting it up.

Here are just two points that should help you understand how the security of Bedrock Agents works:

  • Your provided data is not used to improve or enhance the base FMs. Your data is not shared with any model providers, and you set who has access to the data through IAM policies and properly setting up the API security.
  • As a regional service, Amazon Bedrock and its Agents offer possibilities for storing data where you need it. The data that you store, including prompts, attachments that you use for prompts, AI responses and customized models, remain in the selected region and in your AWS account.

How to get started with Bedrock Agents

The best option is to run through a simple Bedrock Agent workshop to learn the basics of how they work and try to connect what you do with your possible use case.

Conclusion

Bedrock Agents allow you to use generative AI in AWS environments without the need to learn code or develop a deep understanding of their setup. Because they are directly connected to other AWS services, they can play a big role for those who already store data in AWS without the need to set outside connections that could bring issues with latency. Right now, Bedrock Agents is kind of a new function and it’s highly likely AWS will extend their capabilities in the next couple of years with exciting new features.

Similar blog posts

See all posts
CategoryCase Studies

Srovnejto.cz - Breaking the Legacy Monolith into Serverless Microservices in AWS Cloud

The StormIT team helps Srovnejto.cz with the creation of the AWS Cloud infrastructure with serverless services.

Find out more
CategoryNews

Introducing FlashEdge: CDN from StormIT

Let’s look into some features of this new CDN created and recently launched by the StormIT team.

Find out more
CategoryCase Studies

AWS Well-Architected Review Series: Renewable Energy Industry Client

See how StormIT optimized a renewable energy client's AWS infrastructure through the Well-Architected Framework. Explore now...

Find out more
CategoryCase Studies

Microsoft Windows in AWS - Enhancing Kemper Technology Client Solutions with StormIT

StormIT helped Kemper Technology Consulting enhance its technical capabilities in AWS.

Find out more
CategoryCase Studies

Enhancing Betegy's AWS Infrastructure: Performance Boost and Cost Optimization

Discover how Betegy optimized its AWS infrastructure with StormIT to achieve significant cost savings and enhanced performance. Learn about the challenges faced, solutions implemented, and the resulting business outcomes.

Find out more
CategoryArticles

Amazon RDS vs. EC2: Key Differences and When to Use Each

Discover the key differences between Amazon RDS and EC2! Explore the basics, AWS RDS vs EC2, and which one to choose.

Find out more