In June, we started a series of posts highlighting the key factors that drive customers to choose Amazon Bedrock. In the first post, we discussed how to securely build generative AI applications using Amazon Bedrock, and in the second post, we discussed how to build custom generative AI applications using Amazon Bedrock. Now, we want to take a closer look at Amazon Bedrock Agents. Agents enable customers to build intelligent, context-aware generative AI applications, streamline complex workflows, and deliver natural, conversational user experiences. The advent of Large Language Models (LLMs) has enabled humans to interact with computers using natural language. However, many real-world scenarios require more than language understanding; they include executing complex, multi-step workflows, integrating external data sources, or seamlessly orchestrating diverse AI capabilities and data workflows. In these real-world scenarios, Agents can be a game changer, delivering more customized generative AI applications and transforming how we interact with and use LLMs.
Answering more complex queries
Amazon Bedrock Agents allows developers to take a holistic approach to improve scalability, latency, and performance when building generative AI applications. Generative AI solutions using Amazon Bedrock Agents can handle complex tasks by combining LLM with other tools. For example, say you are trying to create a generative AI-enabled assistant that helps people plan vacations. You need it to be able to answer simple questions like: What will the weather be like in Paris next week? or “How much does it cost to fly to Tokyo in July?” A basic virtual assistant might be able to answer these questions from pre-programmed responses or an internet search. But what if you were asked a more complex question? For example, “I’m planning to travel to three countries next summer. Can you suggest an itinerary where I can visit historical sites, taste local cuisine, and stay under $3,000?” This is a more difficult question because it requires planning, budgeting, and searching for information about various destinations.
Amazon Bedrock Agents enables developers to quickly build a generative assistant to help answer this more complex question by combining LLM reasoning with additional tools and resources, such as a natively integrated knowledge base for suggesting personalized itineraries. It can query travel APIs to find flights, hotels, and attractions, and it can use private data, public destination information, and weather while keeping track of budget and traveler preferences. Building this agent requires LLM to understand and respond to questions; however, other modules are also needed for planning, budgeting, and access to trip information.
Agent Activities
Our customers use Amazon Bedrock Agents to build agents and agent-driven applications quickly and effectively. Consider Rocket, a fintech company that helps people achieve home ownership and financial freedom.
“Rocket is committed to revolutionizing the homeownership journey with AI technology, and the Agent AI Framework is key to our mission. By partnering with AWS and leveraging Amazon Bedrock Agents, we can improve the speed, accuracy, and personalization of our technology-driven communications with clients. Leveraging Rocket’s 10 petabytes of data and industry expertise, this integration will empower our clients to navigate complex financial situations with confidence.”
– Sean Malhotra, CTO at Rocket Company.
A closer look at how agents work
Unlike LLM, which provides simple search and content generation capabilities, the agent integrates various components with LLM to create an intelligent orchestrator that can handle advanced use cases with nuanced context and specific domain expertise. The following diagram provides an overview of the key components of the Amazon Bedrock agent:
The process begins with two parts: an LLM and orchestration prompts. The LLM is often implemented using a model such as the Anthropic Claude family or the Meta Llama model to provide basic reasoning capabilities. Orchestration prompts are a set of prompts or instructions that guide the LLM as it goes through the decision-making process.
The following sections provide more information about the main components of the Amazon Bedrock agent.
Planning: The path from task to goal
The planning component of LLM involves understanding a task and devising a multi-step strategy to address a problem and meet the user’s needs. In Amazon Bedrock Agents, we use thought-chaining prompts in combination with ReAct in orchestration prompts to improve an agent’s ability to solve multi-step tasks. Task decomposition requires an agent to understand the complexity of an abstract request. Continuing to consider a travel scenario, if a user wants to book a trip, the agent needs to recognize that it involves transportation, accommodation, tourist attraction reservations, and restaurants. This ability to break down an abstract request, such as planning a trip, into detailed, actionable actions is the essence of planning. However, planning extends beyond the initial formulation of the plan, as plans may be dynamically updated during execution. For example, once an agent has completed arranging transportation and proceeds to booking accommodation, they may encounter a situation where there are no suitable lodging options that match the original arrival date. In such a scenario, the agent must decide whether to broaden the hotel search or reconsider a different booking date and adjust the plan accordingly.
Memory: where important information is stored
Agents have both long-term and short-term memories. Short-term memories are detailed and precise. They are relevant to the current conversation and are reset when the conversation ends. Long-term memories are episodic memories and remember important facts and details in the form of stored summaries. These summaries act as memory summaries of previous interactions. The agent uses this information from the memory store to better solve the current task. The memory store is separate from the LLM and has its own dedicated storage and retrieval components. Developers can customize and control what information they want to store (or exclude) in the memory. Identity management capabilities that associate memory with specific end users give developers the freedom to identify and manage end users, further building on Amazon Bedrock Agent’s memory capabilities. Amazon Bedrock’s industry-leading memory retention capabilities, announced at the recent AWS New York Summit, enable agents to learn and adapt to each user’s preferences over time, enabling a more personalized and efficient experience across multiple sessions for the same user. It is easy to use and users can get started with just one click.
Communications: Using multiple agents for efficiency and effectiveness
By leveraging the powerful combination of features discussed so far, Amazon Bedrock Agents makes it easy to build agents that turn one-shot query responders into advanced orchestrators that can address complex, multi-faceted use cases with great efficiency and adaptability. But what if you want to use multiple agents? LLM-based AI agents can collaborate with each other to improve their efficiency in resolving complex questions. Now, Amazon Bedrock makes it easy for developers to connect them through LangGraph, part of the popular open-source toolset, LangChain. The integration of LangGraph into Amazon Bedrock allows users to seamlessly leverage the strengths of multiple agents, fostering a collaborative environment that increases the overall efficiency and effectiveness of LLM-based systems.
Tool integration: New tools mean new capabilities
New generation models such as Anthropic Claude Sonnet 3.5, Meta Llama 3.1, and Amazon Titan Text Premier are better equipped to use resources. Using these resources requires developers to keep up with continuous updates and changes, requiring new prompts each time. To ease this burden, Amazon Bedrock is simplifying the interface with different models, making it easier to leverage all the features the models offer. For example, the new code interpretation feature announced at the recent AWS New York Summit enables Amazon Bedrock agents to dynamically generate and execute code snippets within a safe sandbox environment to address complex tasks such as data analysis, visualization, text processing, and equation solving. Agents can also process input files in various formats such as CSV, Excel, and JSON, and generate graphs from the data.
Guardrails: Safe Buildings
Accuracy is crucial when dealing with complex queries. Developers can enable Amazon Bedrock Guardrails to reduce imprecision. Guardrails improve the behavior of the applications they are building, increase accuracy, and help them build responsibly. Guardrails prevent both user malicious intent and potentially harmful content generated by AI, providing a higher level of safety and privacy protection.
Amplifying and extending the capabilities of generative AI with Amazon Bedrock Agents
Enterprises, startups, ISVs, and system integrators can take advantage of Amazon Bedrock Agents today, as it provides development teams with a comprehensive solution for building and deploying AI applications that can handle complex queries, use private data sources, and comply with responsible AI practices. Developers can easily deploy pre-tested examples, so-called Golden statement (input prompt) and The Golden Answer (Expected output). You can continuously evolve your agents to fit your key use cases and start developing generative AI applications. Agents offer significant new opportunities to build generative AI applications that can truly transform your business. It will be interesting to see the solutions and results that Amazon Bedrock Agents produce.
resource
To learn more about customization with Amazon Bedrock, see the following resources:
About the Author
Vashi Philomin He is the VP of Generative AI at AWS, where he leads the Generative AI effort, including Amazon Bedrock and Amazon Titan.