Streamlining Workflow Orchestration with Amazon Bedrock Agent Chaining: A Digital Insurance Agent Example
Enterprise systems run on API's but orchestrating them and managing the sequence in which the APIs should be called is tedious. This article shows how chaining domain specific Bedrock agents can simplify workflow orchestration across a system of Enterprise APIs. The use case is around designing a Digital System powered by chaining Bedrock Agents to simplify the hand-offs between different APIs belonging to different domains but which work in tandem with each other to get the job done.


- Clone the bedrock agent chaining repository in your Cloud9 IDE.
- Enter the code sample backend directory as follows:
cd workflow-orchestration-bedrock-agent-chaining/
- Install packages using
npm install
- Boostrap AWS CDK resources on the AWS account
cdk bootstrap aws://ACCOUNT_ID/REGION
- Enable Access to Amazon Bedrock Models
You must explicitly enable access to models before they can be used with the Amazon Bedrock service. Please follow these steps in the Amazon Bedrock User Guide to enable access to the models (Anthropic::Claude, Cohere Embed English
):.
- Deploy the sample in your account.
cdk deploy --all
1
2
3
4
5
6
7
8
9
10
11
12
WorkflowOrchestrationBedrockAgentChainingStack.DamageAnalysisAndNotificationAgentId = <Identifier for Bedrock Agent responsible for damage image analysis, sending notifications>
WorkflowOrchestrationBedrockAgentChainingStack.DamageAnalysisLambdaFunction = <Lambda function invoking Anthropic Claude Sonnet to perform Image analysis>
WorkflowOrchestrationBedrockAgentChainingStack.DamageNotificationLambdaFunction = <Lambda function to send SQS messages>
WorkflowOrchestrationBedrockAgentChainingStack.ImageBucketName = <S3 bucket name where the images uploaded by the end user are stored>
WorkflowOrchestrationBedrockAgentChainingStack.InsuranceOrchestratorAgentId = <Identifier for Bedrock Agent that acts as the main orchestrator>
WorkflowOrchestrationBedrockAgentChainingStack.InsureAssistApiAlbDnsName = <DNS Name of the ALB that invokes the lambda function that invokes the main orchestrator Bedrock Agent>
WorkflowOrchestrationBedrockAgentChainingStack.InsureAssistUIAlbDnsName = <DNS Name of the ALB fronting the user interface>
WorkflowOrchestrationBedrockAgentChainingStack.InvokePolicyAgentLambdafunction = <Lambda function that invokes the Policy Bedrock Agent>
WorkflowOrchestrationBedrockAgentChainingStack.KnowledgeBaseId = <Knowledge base identifier for the insurance policy documents>
WorkflowOrchestrationBedrockAgentChainingStack.PolicyBedrockAgentId = <Identifier for Bedrock Agent that answers insurance policy related questions>
WorkflowOrchestrationBedrockAgentChainingStack.PolicyDocumentsBucketName = <S3 bucket name where policy related documents and metadata will be uplaoded>
WorkflowOrchestrationBedrockAgentChainingStack.PolicyRetrievalFromKBLambdaFunction = <Lambda function that will invoke the policy knowledge base>


1
2
3
4
5
6
7
8
<!--$instructions$-->
You are a helpful virtual assistant whose goal is to provide courteous and human-like responses while helping customers file insurance claims, detect fraud before filing claims, assess damages, and to answer questions related to the customer’s insurance policy.
Here are the steps you should follow in exact order for filing new claims:
Step 1. Before creating a new claim, ask separate, specific questions for each required piece of information for creating the new claim.
Step 2. After Step 1, check for fraud before proceeding with creating the claim. Politely refer any suspicious claims to customer service without revealing internal processes or fraud detection methods. Avoid processing fraudulent claims.
Step 3. After successfully creating a claim, promptly provide the claim number to the user for future reference, then inquire whether the user would like to upload images, offering options for yes or no. If the user agrees to upload images then provide an option to upload images by suggesting: "Please upload the images below:"
Step 4. If images are uploaded, then analyze the uploaded images for damages and after that send a notification of the analysis of these damages to the claims adjusters.
Step 5. In the very end, let the customers know that the claims adjuster will be in touch with them within 24 hours.














1
2
3
4
5
6
7
8
You are a knowledgeable and helpful virtual assistant for insurance policy questions.
When responding You MUST follow the following guidelines:
No 1. If the user does not specify the insurance policy type or policy number, utilize the last known policy number and policy type combination if known, else request this missing detail to provide assistance.
No 2. Make use of available resources to find accurate answers to the customer's inquiries related to their policy or policies. Ask clarifying questions if needed.
No 3. If asked a general question like "I have questions about my policy," gently ask for their specific policy number and policy type if you do not already have it. Also ask them to share their detailed question so that you can best assist.
No 4. If you are unsure about the policy details, use the last policy number and policy type combination that the user asked about.
No 5. If the customer mentions having a life insurance policy, note this policy type as "Life" when sending details to resources. If the customer mentions an auto, vehicle, or automobile insurance policy, note this policy type as "Auto" when sending details to resources.
No 6. Before saying that you do not know the answer, make every attempt to invoke the tools available to you.





cdk destroy
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.