Build a gen AI–powered financial assistant with Amazon Bedrock multi-agent collaboration
This post explores a financial assistant system that specializes in three key tasks: portfolio creation, company research, and communication. This post aims to illustrate the use of multiple specialized agents within the Amazon Bedrock multi-agent collaboration capability, with particular emphasis on their application in financial analysis.

The Amazon Bedrock multi-agent collaboration feature gives developers the flexibility to create and coordinate multiple AI agents, each specialized for specific tasks, to work together efficiently on complex business processes. This enables seamless handling of sophisticated workflows through agent cooperation. This post aims to demonstrate the application of multiple specialized agents within the Amazon Bedrock multi-agent collaboration capability, specifically focusing on their utilization in various aspects of financial analysis. By showcasing this implementation, we hope to illustrate the potential of using diverse, task-specific agents to enhance and streamline financial decision-making processes.
The role of financial assistant
This post explores a financial assistant system that specializes in three key tasks: portfolio creation, company research, and communication.
Portfolio creation begins with a thorough analysis of user requirements, where the system determines specific criteria such as the number of companies and industry focus. These parameters enable the system to create customized company portfolios and format the information according to standardized templates, maintaining consistency and professionalism.
For company research, the system conducts in-depth investigations of portfolio companies and collects vital financial and operational data. It can retrieve and analyze Federal Open Market Committee (FOMC) reports while providing data-driven insights on economic trends, company financial statements, Federal Reserve meeting outcomes, and industry analyses of the S&P 500 and NASDAQ.
In terms of communication and reporting, the system generates detailed company financial portfolios and creates comprehensive revenue and expense reports. It efficiently manages the distribution of automated reports and handles stakeholder communications, providing properly formatted emails containing portfolio information and document summaries that reach their intended recipients.
The use of a multi-agent system, rather than relying on a single large language model (LLM) to handle all tasks, enables more focused and in-depth analysis in specialized areas. This post aims to illustrate the use of multiple specialized agents within the Amazon Bedrock multi-agent collaboration capability, with particular emphasis on their application in financial analysis.
This implementation demonstrates the potential of using diverse, task-specific agents to improve and simplify financial decision-making processes. Using multiple agents enables the parallel processing of intricate tasks, including regulatory compliance checking, risk assessment, and industry analysis, while maintaining clear audit trails and accountability. These advanced capabilities would be difficult to achieve with a single LLM system, making the multi-agent approach more effective for complex financial operations and routing tasks.
Overview of Amazon Bedrock multi-agent collaboration
The Amazon Bedrock multi-agent collaboration framework facilitates the development of sophisticated systems that use LLMs. This architecture demonstrates the significant advantages of deploying multiple specialized agents, each designed to handle distinct aspects of complex tasks such as financial analysis.
The multi-collaboration framework enables hierarchical interaction among agents, where customers can initiate agent collaboration by associating secondary agent collaborators with a primary agent. These secondary agents can be any agent within the same account, including those possessing their own collaboration capabilities. Because of this flexible, composable pattern, customers can construct efficient networks of interconnected agents that work seamlessly together.
The framework supports two distinct types of collaboration:
- Supervisor mode – In this configuration, the primary agent receives and analyzes the initial request, systematically breaking it down into manageable subproblems or reformulating the problem statement before engaging subagents either sequentially or in parallel. The primary agent can also consult attached knowledge bases or trigger action groups before or after subagent involvement. Upon receiving responses from secondary agents, the primary agent evaluates the outcomes to determine whether the problem has been adequately resolved or if additional actions are necessary.
- Router and supervisor mode – This hybrid approach begins with the primary agent attempting to route the request to the most appropriate subagent.
- For straightforward inputs, the primary agent directs the request to a single subagent and relays the response directly to the user.
- When handling complex or ambiguous inputs, the system transitions to supervisor mode, where the primary agent either decomposes the problem into smaller components or initiates a dialogue with the user through follow-up questions, following the standard supervisor mode protocol.
Use Amazon Bedrock multi-agent collaboration to power the financial assistant
The implementation of a multi-agent approach offers numerous compelling advantages. Primarily, it enables comprehensive and sophisticated analysis through specialized agents, each dedicated to their respective domains of expertise. This specialization leads to more robust investment decisions and minimizes the risk of overlooking critical industry indicators.
Furthermore, the system’s modular architecture facilitates seamless maintenance, updates, and scalability. Organizations can enhance or replace individual agents with advanced data sources or analytical methodologies without compromising the overall system functionality. This inherent flexibility is essential in today’s dynamic and rapidly evolving financial industries.
Additionally, the multi-agent framework demonstrates exceptional compatibility with the Amazon Bedrock infrastructure. By deploying each agent as a discrete Amazon Bedrock component, the system effectively harnesses the solution’s scalability, responsiveness, and sophisticated model orchestration capabilities. End users benefit from a streamlined interface while the complex multi-agent workflows operate seamlessly in the background. The modular architecture allows for simple integration of new specialized agents, making the system highly extensible as requirements evolve and new capabilities emerge.
Solution overview
In this solution, we implement a three-agent architecture comprising of one supervisor agent and two collaborator agents. When a user initiates an investment report request, the system orchestrates the execution across individual agents, facilitating the necessary data exchange between them. Amazon Bedrock efficiently manages the scheduling and parallelization of these tasks, promoting timely completion of the entire process.
The financial agent serves as the primary supervisor and central orchestrator, coordinating operations between specialized agents and managing the overall workflow. This agent also handles result presentation to users. User interactions are exclusively channeled through the financial agent through invoke_agent
calls. The solution incorporates two specialized collaborator agents:
The portfolio assistant agent performs the following key functions:
- Creates a portfolio with static data that is present with the agent for companies and uses this to create detailed revenue details and other details for the past year
- Stakeholder communication management through email
The data assistant agent functions as an information repository and data retrieval specialist. Its primary responsibilities include:
- Providing data-driven insights on economic trends, company financial statements, and FOMC documents
- Processing and responding to user queries regarding financial data such as previous year revenue and stakeholder documents of the company for every fiscal quarter. This is merely static data for experimentation; however, we can stream the real-time data using available APIs.
The data assistant agent maintains direct integration with the Amazon Bedrock knowledge base, which was initially populated with ingested financial document PDFs as detailed in this post.
The overall diagram of the multi-agent system is shown in the following diagram.
This multi-agent collaboration integrates specialized expertise across distinct agents, delivering comprehensive and precise solutions tailored to specific user requirements. The system’s modular architecture facilitates seamless updates and agent modifications, enabling smooth integration of new data sources, analytical methodologies, and regulatory compliance updates. Amazon Bedrock provides robust support for deploying and scaling these multi-agent financial systems, maintaining high-performance model execution and orchestration efficiency. This architectural approach not only enhances investment analysis capabilities but also maximizes the utilization of Amazon Bedrock features, resulting in an effective solution for financial analysis and complex data processing operations. In the following sections, we demonstrate the step-by-step process of constructing this multi-agent system. Additionally, we provide access to a repository (link forthcoming) containing the complete codebase necessary for implementation.
Prerequisites
Before implementing the solution, make sure you have the following prerequisites in place:
- Create an Amazon Simple Storage Bucket (Amazon S3) bucket in your preferred Region (for example,
us-west-2
) with the designation financial-data-101.To follow along, you can download our test dataset, which includes both publicly available and synthetically generated data, from the following link. Tool integration can be implemented following the same approach demonstrated in this example. Note that additional documents can be incorporated to enhance your data assistant agent’s capabilities. The aforementioned documents serve as illustrative examples. - Enable model access for Amazon Titan and Amazon Nova Lite. Make sure to use the same Region for model access as the Region where you build the agents.
These models are essential components for the development and testing of your Amazon Bedrock knowledge base.
Build the data assistant agent
To establish your knowledge base, follow these steps:
- Initiate a knowledge base creation process in Amazon Bedrock and incorporate your data sources by following the guidelines in Create a knowledge base in Amazon Bedrock Knowledge Bases.
- Set up your data source configuration by selecting Amazon S3 as the primary source and choosing the appropriate S3 bucket containing your documents.
- Initiate synchronization. Configure your data synchronization by establishing the connection to your S3 source. For the embedding model configuration, select Amazon: Titan Embeddings—Text while maintaining default parameters for the remaining options.
- Review all selections carefully on the summary page before finalizing the knowledge base creation, then choose Next. Remember to note the knowledge base name for future reference.
The building process might take several minutes. Make sure that it’s complete before proceeding.
Upon completion of the knowledge base setup, manually create a knowledge base agent:
- To create the knowledge base agent, follow the steps at Create and configure agent manually in the Amazon Bedrock documentation. During creation, implement the following instruction prompt:
Utilize this knowledge base when responding to queries about data, including economic trends, company financial statements, FOMC meeting outcomes, SP500, and NASDAQ indices. Responses should be strictly limited to knowledge base content and assist in agent orchestration for data provision.
- Maintain default settings throughout the configuration process. On the agent creation page, in the Knowledge Base section, choose Add.
- Choose your previously created knowledge base from the available options in the dropdown menu.
Build the portfolio assistant agent
The base agent is designed to execute specific actions through defined action groups. Our implementation currently incorporates one action group that manages portfolio-related operations.
To create the portfolio assistant agent, follow the steps at Create and configure agent manually.
The initial step involves creating an AWS Lambda function that will integrate with the Amazon Bedrock agent’s CreatePortfolio
action group. To configure the Lambda function, on the AWS Lambda console, establish a new function with the following specifications:
- Configure Python 3.12 as the runtime environment
- Set up function schema to respond to agent invocations
- Implement backend processing capabilities for portfolio creation operations
- Integrate the implementation code from the designated GitHub repository for proper functionality with the Amazon Bedrock agent system
This Lambda function serves as the request handler and executes essential portfolio management tasks as specified in the agent’s action schema. It contains the core business logic for portfolio creation features, with the complete implementation available in the referenced Github repository.
Use this recommended schema when configuring the action group response format for your Lambda function in the portfolio assistant agent:
After creating the action group, the next step is to modify the agent’s base instructions. Add these items to the agent’s instruction set:
In the Multi-agent collaboration section, choose Edit. Add the knowledge base agent as a supervisor-only collaborator, without including routing configurations.
To verify proper orchestration of our specified schema, we’ll leverage the advanced prompts feature of the agents. This approach is necessary because our action group adheres to a specific schema, and we need to provide seamless agent orchestration while minimizing hallucination caused by default parameters. Through the implementation of prompt engineering techniques, such as chain of thought prompting (CoT), we can effectively control the agent’s behavior and make sure it follows our designed orchestration pattern.
In Advanced prompts, add the following prompt configuration at lines 22 and 23:
The solution uses Amazon Simple Email Service (Amazon SES) with the AWS SDK for Python (Boto3) in the portfoliocreater Lambda function to send emails. To configure Amazon SES, follow the steps at Send an Email with Amazon SES documentation.
Build the supervisor agent
The supervisor agent serves as a coordinator and delegator in the multi-agent system. Its primary responsibilities include task delegation, response coordination, and managing routing through supervised collaboration between agents. It maintains a hierarchical structure to facilitate interactions with the portfolioAssistant and DataAgent, working together as an integrated team.
Create the supervisor agent following the steps at Create and configure agent manually. For agent instructions, use the identical prompt employed for the portfolio assistant agent. Append the following line at the conclusion of the instruction set to signify that this is a collaborative agent:
In this section, the solution modifies the orchestration prompt to better suit specific needs. Use the following as the customized prompt:
In the Multi-agent section, add the previously created agents. However, this time designate a supervisor agent with routing capabilities. Selecting this supervisor agent means that routing and supervision activities will be tracked through this agent when you examine the trace.
Demonstration of the agents
To test the agent, follow these steps. Initial setup requires establishing collaboration:
- Open the financial agent (primary agent interface)
- Configure collaboration settings by adding secondary agents. Upon completing this configuration, system testing can commence.
Save and prepare the agent, then proceed with testing.
Look at the test results:
Examining the session summaries reveals that the data is being retrieved from the collaborator agent.
The agents demonstrate effective collaboration when processing prompts related to NASDAQ data and FOMC reports established in the knowledge base.
If you’re interested in learning more about the underlying mechanisms, you can choose Show trace, to observe the specifics of each stage of the agent orchestration.
Conclusion
Amazon Bedrock multi-agent systems provide a powerful and flexible framework for financial AI agents to coordinate complex tasks. Financial institutions can deploy teams of specialized AI agents that seamlessly solve complex problems such as risk assessment, fraud detection, regulatory compliance, and guardrails using Amazon Bedrock foundation models and APIs. The financial industry is becoming more digital and data-driven, and Amazon Bedrock multi-agent systems are a cutting-edge way to use AI. These systems enable seamless coordination of diverse AI capabilities, helping financial institutions solve complex problems, innovate, and stay ahead in a rapidly changing global economy. With more innovations such as tool calling we can make use of the multi-agents and make it more robust for complex scenarios where absolute precision is necessary.
About the Authors
Suheel is a Principal Engineer in AWS Support Engineering, specializing in Generative AI, Artificial Intelligence, and Machine Learning. As a Subject Matter Expert in Amazon Bedrock and SageMaker, he helps enterprise customers design, build, modernize, and scale their AI/ML and Generative AI workloads on AWS. In his free time, Suheel enjoys working out and hiking.
Qingwei Li is a Machine Learning Specialist at Amazon Web Services. He received his Ph.D. in Operations Research after he broke his advisor’s research grant account and failed to deliver the Nobel Prize he promised. Currently he helps customers in the financial service and insurance industry build machine learning solutions on AWS. In his spare time, he likes reading and teaching.
Aswath Ram A. Srinivasan is a Cloud Support Engineer at AWS. With a strong background in ML, he has three years of experience building AI applications and specializes in hardware inference optimizations for LLM models. As a Subject Matter Expert, he tackles complex scenarios and use cases, helping customers unblock challenges and accelerate their path to production-ready solutions using Amazon Bedrock, Amazon SageMaker, and other AWS services. In his free time, Aswath enjoys photography and researching Machine Learning and Generative AI.
Girish Krishna Tokachichu is a Cloud Engineer (AI/ML) at AWS Dallas, specializing in Amazon Bedrock. Passionate about Generative AI, he helps customers resolve challenges in their AI workflows and builds tailored solutions to meet their needs. Outside of work, he enjoys sports, fitness, and traveling.