Build a multi-agent system that triages, reviews, and adjudicates insurance claims β using the same Agentic Loop, Routing, and Parallelization patterns from today's slides.
β± 35 minutes
What You'll Build
You'll run a multi-agent claims processing system where AI agents coordinate automatically to triage, review, and adjudicate 6 insurance claims β life, health, motor, and travel.
π§ Workshop Concepts in Action
This lab brings together three patterns from the workshop:
The Agentic Loop β Observe (load claims) β Plan (triage them) β Act (review) β Reflect (adjudicate decisions)
Routing β A Triage Agent classifies each claim and sends it to the right processing path
Parallelization β Medical Reviewer and Fraud Analyst examine the same claim at the same time
The Multi-Agent Architecture
Step
What you do
Duration
Pattern
Step 1
Install Strands SDK & explore your first agent
8 min
Agentic Loop
Step 2
Build a Triage Agent that classifies claims
8 min
Routing
Step 3
Run parallel Medical + Fraud reviews
10 min
Parallelization
Step 4
Run the full pipeline β all patterns combined
9 min
All three
Setup: Download Lab Files
All the code and sample data are pre-built for you. You just need to download and install.
π‘ Why pre-built code?
The goal here is to understand how multiple AI agents coordinate to process insurance claims. The code is ready so you can focus on observing the agent behaviors β how they triage, review, and adjudicate β not debugging Python.
βΆ π "What prompt created this code?"
Here's the prompt that was used to generate agentic_claims_processor.py with Kiro. This is the kind of prompt you could write after completing this workshop:
THE PROMPT THAT BUILT THIS LAB
Build a multi-agent insurance claims processing system using the Strands Agents SDK with Amazon Bedrock.
The system should process 6 insurance claims (life, health, motor, travel) from JSON files in sample-data/claims/ and validate them against policy limits (CSV) and adjudication rules (JSON).
Create 4 agents:
1. TRIAGE AGENT β Classifies each claim by type, priority (high >$100K / standard / low <$5K), red flags (early claim, full sum claimed, missing docs), and routes to the right review path
2. MEDICAL REVIEWER β Validates diagnosis appropriateness, cost reasonableness against typical ranges, policy coverage, waiting periods, and pre-existing condition risk
3. FRAUD ANALYST β Checks policy age, claim-to-sum-assured ratio, known fraud indicators, documentation completeness, and timing patterns. Outputs a risk score.
4. ADJUDICATOR β Synthesizes medical + fraud reviews into final decisions: APPROVE β / FLAG β οΈ / DECLINE π΄, ensuring MAS Fair Dealing Guidelines compliance
Each agent should have @tool-decorated functions for its capabilities. Run medical and fraud reviews in parallel using ThreadPoolExecutor. The pipeline should follow the Agentic Loop: OBSERVE (load claims) β PLAN (triage) β ACT (parallel reviews) β REFLECT (adjudicate decisions).
Use BedrockModel with us.anthropic.claude-sonnet-4-20250514-v1:0 in us-west-2. Save the final report as markdown.
All amounts in SGD. Use AnyCompany Insurance as the company name. Include Singapore regulatory context (MAS, PDPA).
The full picture: This prompt uses techniques from across the workshop β understanding what Bedrock models can do, structured prompting with personas, specific output formats, guardrails, and agentic patterns (routing, parallelization, the agentic loop).
π‘ Why --break-system-packages? The Kiro server runs Ubuntu 24.04 which blocks system-wide pip installs by default. Since we're running commands manually in the terminal here, we need this flag. It's safe for our workshop environment.
Pre-existing risk β policy 5 months, back surgery
CLM-2025-0006
Jason Ong
Travel Medical
$8,200
Routine β dengue during covered travel period
Step 1: Your First Agent (The Agentic Loop)
π Pattern: The Agentic Loop
Every agent follows: Observe (receive input) β Plan (decide what tools to use) β Act (call tools, generate output) β Reflect (check results, retry if needed). Watch for this loop in the terminal output.
Run the first script to see a simple agent in action:
KIRO PROMPT β Ask Kiro to run this
Run python3 lab4-agentic-claims/step1_explore_agents.py and show me the output
π What to watch for:
The agent decides on its own to call list_all_claims first β you didn't tell it to
It then reasons about the results to answer your questions
If it needs more detail, it might call read_claim for a specific claim β that's the Reflect β Act again loop
This is the same Observe β Plan β Act β Reflect cycle from the slides!
π¬ Explore: Ask your own questions
Open step1_explore_agents.py in Kiro. Change the question at the bottom of the file to something else:
IDEAS β Try changing the agent's question to:
β’ "What is the total value of all claims combined?"
β’ "Which claims are death claims or critical illness?"
β’ "Read claim CLM-2025-0003 and tell me if anything looks suspicious"
β’ "Which claims have policies less than 12 months old?"
β Checkpoint: You've seen an agent autonomously decide which tools to call, process the results, and answer your question. This is the Agentic Loop in action.
Step 2: The Triage Agent
π Pattern: Routing
A Triage Agent classifies each claim and sends it to the right processing path. Think of it as the claims intake desk β it reads each claim, assesses priority and risk, and routes it to the appropriate review team. This is the Routing pattern: classify β route β process.
Run the triage agent:
KIRO PROMPT
Run python3 lab4-agentic-claims/step2_triage_agent.py and show me the output
π What to watch for:
The Triage Agent checks each policy's status and age β it uses the check_policy_status tool multiple times
It applies adjudication rules (amount thresholds, early claim flags) to decide the route
CLM-2025-0003 (Death claim, $500K, 7-month policy) should be routed to enhanced review
CLM-2025-0005 (Back surgery, 5-month policy) should be flagged β early claim + pre-existing risk
CLM-2025-0004 (Motor, $4,200) might get auto-approved β low value, no red flags
π Connection to Your Work
π‘
This triage pattern applies to any classification task in insurance: routing customer service inquiries, classifying underwriting applications by risk tier, or prioritizing policy renewals. The agent reads the data, applies rules, and decides the path β no hardcoded if/else needed.
β Checkpoint: You've seen the Routing pattern β one agent classifying 6 claims into different processing paths based on business rules.
Step 3: Parallel Reviews
π Pattern: Parallelization
Two specialist agents review the same claim at the same time β a Medical Reviewer checks the diagnosis and costs, while a Fraud Analyst checks for suspicious patterns. Then an Adjudicator combines their findings into a single decision. This is like a claims committee meeting, but in seconds.
Run the parallel review on a suspicious claim (Roberto Santos β Death Claim, $500K, 7-month policy):
KIRO PROMPT
Run python3 lab4-agentic-claims/step3_parallel_review.py and show me the output
π What to watch for:
Both reviews start at the same time β you'll see "Starting parallel reviews..." then both complete
The Medical Reviewer validates the cause of death (Acute MI) and checks if it's medically consistent
The Fraud Analyst flags multiple red flags: policy only 7 months old, full sum assured claimed, death claim on young policy
The Adjudicator combines both views β it should recommend FLAG or require investigation given the fraud indicators, while noting MAS Fair Dealing obligations
Check the output file: output/parallel_review_report.md
π¬ Explore: Try a different claim
Open step3_parallel_review.py and change the TARGET_CLAIM variable to review a different claim:
β Checkpoint: You've seen Parallelization β two agents reviewing the same claim simultaneously, then an adjudicator synthesizing their findings. Check output/parallel_review_report.md for the full report.
Step 4: The Full Pipeline (All Patterns Combined)
π― Everything together
This script combines all three patterns into one pipeline:
OBSERVE β Load all 6 claims
PLAN (Routing) β Triage Agent classifies and routes each claim
ACT (Parallelization) β Medical + Fraud agents review each claim in parallel
REFLECT (Adjudication) β Adjudicator synthesizes all reviews into final decisions
Run the full pipeline:
KIRO PROMPT
Run python3 lab4-agentic-claims/agentic_claims_processor.py and show me the output
β± This takes 2-3 minutes β the system is making multiple calls to Amazon Bedrock for each agent. Watch the terminal output to see each step of the Agentic Loop in real time.
π What to watch for in the output:
OBSERVE β Lists all 6 claims with amounts and policy ages
PLAN β Triage classifies each claim (watch for different routes)
ACT β For each claim, medical + fraud reviews run in parallel
REFLECT β Adjudicator produces final decisions for all 6 claims
Report β Check output/claims_processing_report.md for the full report
Expected Results
Claim
Expected Decision
Why
CLM-2025-0001 (Tan Wei Ming)
APPROVE β
5-year policy, confirmed cancer diagnosis, amount within range
Death claim on 7-month policy, full sum claimed β investigate
CLM-2025-0004 (David Ng)
APPROVE β
Low-value motor claim, panel workshop, complete docs
CLM-2025-0005 (Priya Ramasamy)
FLAG β οΈ
5-month policy, possible pre-existing condition, high cost
CLM-2025-0006 (Jason Ong)
APPROVE β
Travel medical within covered period, reasonable cost
β Final Checkpoint: Open output/claims_processing_report.md and verify:
All 6 claims have decisions
The death claim (CLM-2025-0003) is flagged for investigation
The back surgery claim (CLM-2025-0005) is flagged for pre-existing condition review
There's an executive summary with totals, MAS compliance notes, and action items
Reflection: What Just Happened?
π§ Compare: Manual vs Agentic approach
Manual Claims Process
Agentic (this lab)
Approach
Claims officer reviews one at a time
Agents coordinated automatically
Steps
Triage β medical review β fraud check β decision (sequential)
4 agents, routing + parallel execution
Human role
Human drives every step
You pressed "run" β agents did the rest
Scalability
~20 claims/day per officer
Works for 200 claims the same way
Consistency
Varies by officer experience
Same rules, same agents, every time
Compliance
Manual checklist
Built into agent prompts
The 4 Agents You Ran
Agent
Role
Tools it uses
Pattern
Triage Officer
Classify & route claims
read_claim, check_policy, check_documents
Routing
Medical Reviewer
Diagnosis, cost, coverage
read_claim, check_policy, validate_medical
Parallelization
Fraud Analyst
Risk scoring, indicators
read_claim, check_policy, check_fraud_indicators
Parallelization
Adjudicator
Synthesize & decide
save_report
Agentic Loop
π‘
Key insight: Each agent has a clear role, specific tools, and focused instructions. This is the same principle as persona-based prompting β but now each persona is an independent agent that can be tested, improved, and reused separately. The Medical Reviewer doesn't know about fraud; the Fraud Analyst doesn't assess medical validity. Separation of concerns β just like good software design.
π What You Accomplished
β‘ Ran a multi-agent claims processing system using Strands Agents SDK + Amazon Bedrock
πΊοΈ Saw Routing in action β one agent triaging claims into different paths
π Saw Parallelization β two specialist agents reviewing the same claim simultaneously
π Saw the Agentic Loop β agents autonomously deciding which tools to call and when
π― Saw Adjudication β a senior agent synthesizing multiple reviews into final decisions
π Generated a complete claims processing report with decisions for 6 claims
This is how agentic AI can transform claims operations β from days of manual review to minutes of automated, consistent, auditable processing.
π Connection to Lab 3: Agent Design Canvas
This lab is the realized version of a claims processing canvas. Every section of the canvas maps to something in the code:
Agent Identity β Role became the system_prompt for each agent
Workflow β Pattern became Triage (Routing) + ThreadPoolExecutor (Parallelization)
Data β Inputs became @tool functions like read_claim()
Guardrails β Escalate when became fraud indicators and threshold checks
Open agent-design-canvas-claims.md in the lab folder to see the full canvas that produced this code.
β Bonus: Customize the Agents
If you finish early, try these modifications. Ask Kiro to help you make changes:
IDEA 1 β Add a new specialist agent
Open lab4-agentic-claims/agentic_claims_processor.py and add a "Customer Experience" agent that drafts a personalized communication letter to each claimant explaining the decision, next steps, and timeline. Have it run after the adjudicator makes its decision.
IDEA 2 β Change the triage rules
Modify the Triage Agent's system prompt to add a new route: if a claim involves a hospital that is NOT on AnyCompany's panel list (only Mount Elizabeth, SGH, and Tan Tock Seng are panel hospitals), route it to an "Out-of-Panel Review" path that checks if the costs are reasonable compared to panel rates.
IDEA 3 β Add your own claim
Create a new claim_007.json in lab4-agentic-claims/sample-data/claims/ for a critical illness claim (Stage 1 breast cancer) on a policy that's 3 years old, sum assured $200,000. Make sure all documents are complete. Run the pipeline again and see how the agents handle it β it should be approved.