In June, I began a series of posts highlighting the key factors that drive customers to choose amazon Bedrock. The first one addressed building generative ai applications securely with amazon Bedrock, while the second explored building custom generative ai applications with amazon Bedrock. Now I’d like to take a closer look at amazon Bedrock Agents, which enables our customers to build intelligent, context-aware generative ai applications, streamlining complex workflows and delivering natural, conversational user experiences. The emergence of large language models (LLMs) has enabled humans to interact with computers using natural language. However, many real-world scenarios demand more than just language understanding. They involve running complex multi-step workflows, integrating external data sources, or seamlessly orchestrating various ai capabilities and data workflows. In these real-world scenarios, agents can be game-changers, delivering more personalized generative ai applications and transforming the way we interact with and use LLMs.
Answer more complex queries
amazon Bedrock Agents enables a developer to take a holistic approach to improve scalability, latency, and performance when building generative ai applications. Generative ai solutions that use amazon Bedrock Agents can handle complex tasks by combining an LLM with other tools. For example, imagine you are trying to build a generative ai-enabled assistant that helps people plan their vacations. You want it to be able to handle simple questions like “What will the weather be like in Paris next week?” either “How much does it cost to fly to Tokyo in July?” A basic virtual assistant could answer those questions from pre-programmed responses or by searching the Internet. But what if someone asks a more complicated question, like, “I want to plan a trip to three countries next summer. Can you suggest a travel itinerary that includes visiting historical sites, trying local cuisine, and staying within a $3,000 budget?” That’s a harder question because it involves planning, budgeting, and finding information about different destinations.
With amazon Bedrock Agents, a developer can quickly build a generative assistant to help answer this more complicated question by combining the LLM’s reasoning with additional tools and resources, such as natively integrated knowledge bases to propose personalized itineraries. It could search for flights, hotels, and tourist attractions by querying travel APIs and using private data, public information about destinations, and weather, while also keeping track of the traveler’s budget and preferences. To build this agent, you would need an LLM that understood and answered questions, but you would also need other modules for planning, budgeting, and accessing travel information.
Agents in action
Our customers are using amazon Bedrock Agents to build agents (and agent-powered apps) quickly and efficiently. Consider Rocket, the fintech company helping people own homes and achieve financial freedom:
“Rocket is poised to revolutionize the homebuying experience with ai technology, and Agentic’s ai frameworks are key to our mission. By partnering with AWS and leveraging amazon Bedrock Agents, we are improving the speed, accuracy, and personalization of our technology-driven customer communications. This integration, powered by Rocket’s 10 petabytes of data and industry expertise, ensures our customers can navigate complex financial moments with confidence.”
– Shawn Malhotra, CTO of Rocket Companies.
A closer look at how agents work
Unlike LLMs that offer simple search or content generation capabilities, agents integrate multiple components with an LLM to create an intelligent orchestrator capable of handling sophisticated use cases with nuanced context and domain-specific expertise. The following figure describes the key components of amazon Bedrock Agents:
The process begins with two parts: the LLM and the orchestration message. The LLM, which is typically implemented using models such as those in the Anthropic Claude family or Meta Llama models, provides the basic reasoning capabilities. The orchestration message is a set of messages or instructions that guide the LLM in driving the decision-making process.
In the following sections, we take a deep dive into the key components of amazon Bedrock Agents:
Planning: A Path from Task to Objectives
The planning component of LLMs involves understanding tasks and designing multi-step strategies to address a problem and satisfy a user need. In amazon Bedrock Agents, we use thought chain prompting in combination with React In the decomposition task, the agent must understand the complexities of an abstract request. If we continue to explore our travel scenario, if a user wants to book a trip, the agent must recognize that it includes transportation, lodging, tourist attraction reservations, and restaurants. This ability to break down an abstract request, such as planning a trip, into detailed, executable actions is the essence of planning. Planning extends beyond the initial formulation of a plan, however, because during execution, the plan can be dynamically updated. For example, when the agent has finished arranging transportation and moves on to booking lodging, the agent may encounter circumstances where there are no suitable lodging options that align with the original arrival date. In such scenarios, the agent must determine whether to expand the hotel search or review alternative booking dates, adapting the plan as it evolves.
Memory: home of critical information
Agents have both long-term and short-term memory. Short-term memory is detailed and accurate. It is relevant to the current conversation and is reset when the conversation ends. Long-term memory is episodic and remembers important facts and details in the form of saved summaries. These summaries serve as a memory synopsis of previous dialogues. The agent uses this information from the memory store to better solve the current task. The memory store is separate from long-term memory, with a dedicated storage and retrieval component. Developers have the option to customize and control what information is stored (or excluded) in memory. An identity management feature, which associates memory with specific end users, gives developers the freedom to identify and manage end users, and enables further development based on the memory capabilities of amazon Bedrock agents. amazon Bedrock’s industry-leading memory retention feature, launched at the recent AWS New York Summit, enables agents to learn and adapt to each user’s preferences over time, enabling more personalized and efficient experiences across multiple sessions for the same user. It’s easy to use and allows users to get started with a single click.
Communication: Using multiple agents for greater efficiency and effectiveness
By combining the capabilities we’ve described in a powerful way, amazon Bedrock Agents makes it easy to build agents that transform one-time query responders into sophisticated orchestrators capable of addressing complex, multifaceted use cases with remarkable efficiency and adaptability. But what about using multiple agents? LLM-based ai agents can collaborate with each other to improve efficiency when solving complex queries. Today, amazon Bedrock makes it easy for developers to connect them through LangGraph, part of LangChain, the popular open-source toolkit. The integration of LangGraph into amazon Bedrock enables users to seamlessly leverage the strengths of multiple agents, fostering a collaborative environment that improves the overall efficiency and effectiveness of LLM-based systems.
Tool integration: New tools mean new capabilities
Newer generations of models, such as Anthropic Claude Sonnet 3.5, Meta Llama 3.1, or amazon Titan Text Premier, are better equipped to utilize resources. Using these resources requires developers to keep up with constant updates and changes, requiring new input each time. To reduce this burden, amazon Bedrock simplifies interaction with different models, making it very easy to take advantage of all the features a model offers. For example, the new code interpretation capability announced at the recent AWS Summit in New York allows amazon Bedrock agents to dynamically generate and run code snippets within a secure, isolated environment to tackle complex tasks such as data analysis, visualization, text processing, and equation solving. It also enables agents to process input files in various formats (including CSV, Excel, and JSON) and generate charts from the data.
Railings: Building safely
Accuracy is critical when working with complex queries. Developers can enable amazon Bedrock Guardrails to help reduce inaccuracies. Guardrails improve the behavior of the applications you’re building, increasing accuracy and helping you build responsibly. They can prevent both malicious user intent and potentially toxic ai-generated content, providing a higher level of security and privacy protection.
Extending and scaling generative ai capabilities with amazon Bedrock Agents
Enterprises, startups, ISVs, and system integrators can take advantage of amazon Bedrock Agents today, as it provides development teams with an end-to-end solution for building and deploying ai applications that can handle complex queries, use private data sources, and adhere to responsible ai practices. Developers can get started with proven examples, so-called golden expressions (entry prompts) and golden answers (expected outcomes). You can continuously develop agents to fit your core use cases and drive the development of your generative ai application. Agents open up significant new opportunities to build generative ai applications that truly transform your business. It will be fascinating to see the solutions (and outcomes) that amazon Bedrock Agents inspires.
Resources
For more information about customizing with amazon Bedrock, see the following resources:
About the author
Vasi Philomin is Vice President of Generative ai at AWS. He leads generative ai initiatives including amazon Bedrock and amazon Titan.