π π Welcome to the Amazon Bedrock Agent Samples repository π π
This repository provides examples and best practices for working with Amazon Bedrock Agents.
Amazon Bedrock Agents enables you to automate complex workflows, build robust and scalable end-to-end solutions from experimentation to production and quickly adapt to new models and experiments.
With the Amazon Bedrock multi-agent collaboration feature you can plan and execute complex tasks across different agents using the supervisor collaboration mode. As well as have an unified conversation across agents with built-in intent classification using the supervisor with routing collaboration mode and fallback to the supervisor mode when an intention cannot be detected. Amazon Bedrock Agents will provide you with traces to observe your agents behavior across multi-agent flows and with the guardrails, security and privacy that are standard across Amazon Bedrock features.
This one-hour video takes you through a deep dive introduction to Amazon Bedrock multi-agent collaboration, including a pair of demos, and a walkthrough of Unifying customer experiences, and Automating complex processes. Youβll also see a customer explain their experience with multi-agent solutions.
- Overview
- Repository Structure
- Getting Started
- Amazon Bedrock Agents examples
- Amazon Bedrock multi-agent collaboration examples
- Best Practices
- Security
- License
Amazon Bedrock Agents enables you to create AI-powered assistants that can perform complex tasks and interact with various APIs and services.
This repository provides practical examples to help you understand and implement agentic solutions.
The solutions presented here use the boto3 SDK in Python, however, you can create Bedrock Agents solutions using any of the AWS SDKs for C++, Go, Java, JavaScript, Kotlin, .NET, PHP, Ruby, Rust, SAP ABAP or Swift
βββ examples/amazon-bedrock-agents/
β βββ code_assistant_agent/
β βββ human_resources_agent/
β βββ inline_agent/
| βββ ....
βββ examples/amazon-bedrock-multi-agent-collaboration/
β βββ 00_hello_world_agent/
β βββ devops_agent/
β βββ energy_efficiency_management_agent/
| βββ ....
βββ src/shared/
β βββ working_memory/
β βββ stock_data/
β βββ web_search/
| βββ ....
βββ src/utils/
β βββ bedrock_agent_helper.py
| βββ bedrock_agent.py
| βββ knowledge_base_helper.py
| βββ ....
-
examples/amazon-bedrock-agent/: Shows Amazon Bedrock Agents examples.
-
examples/amazon-bedrock-multi-agent-collaboration/: Shows Amazon Bedrock multi-agent collaboration examples.
-
src/shared: This module consists of shared tools that can be reused by Amazon Bedrock Agents via Action Groups. They provide functionality like Web Search, Working Memory, and Stock Data Lookup.
-
src/utils: This module contains utilities for building and using various Amazon Bedrock features, providing a higher level of abstraction than the underlying APIs.
- Navigate to
src/
for more details. - To get started, navigate to the example you want to deploy in the
examples/*
directory. - Follow the deployment steps in the
examples/*/*/README.md
file of the example.
- Code Assistant Agent using code Interpretation
- Human Resource Agent using return of control and user confirmation
- Configure an inline agent at runtime
- Insurance Claim Agent using OpenAPI schema
- Online Banking Agent using Amazon Bedrock Guardrails
- Restaurant Booking Agent using AWS CDK
- Restaurant Booking Agent using custom orchestration
- Restaurant Booking Agent using non-optimized models
- Solar Panel Agent using Amazon Bedrock Knowledge Bases
- Travel Assistant Agent with memory
- 00_hello_world_agent
- DevOps Agent
- Energy Efficiency Management Agent
- Mortgage Assistant Agent
- Portfolio Assistant Agent
- Startup Advisor Agent
- Team Poems Agent
- Trip Planner Agent
- Voyage Virtuso Agent
The code samples highlighted in this repository focus on showcasing different Amazon Bedrock Agents capabilities.
Please check out our two-part blog series for best practices around building generative AI applications with Amazon Bedrock Agents:
- Best practices for building robust generative AI applications with Amazon Bedrock Agents β Part 1
- Best practices for building robust generative AI applications with Amazon Bedrock Agents β Part 2
π Related Links:
- Amazon Bedrock Agents Documentation
- Amazon Bedrock multi-agent collaboration
- Boto3 Python SDK Documentation
- Amazon Bedrock Samples
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.
Important
Examples in this repository are for demonstration purposes. Ensure proper security and testing when deploying to production environments.