⚑ Lab 4: Agentic Claims Processing

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

OBSERVE PLAN ACT REFLECT πŸ“‹ 6 Insurance Claims Life Β· Health Β· Motor Β· Travel πŸ—ΊοΈ TRIAGE AGENT Classifies each claim by type, priority, risk flags Routes to the right processing path ⚑ PARALLEL EXECUTION πŸ₯ Medical Reviewer Diagnosis Β· Cost Β· Coverage πŸ” Fraud Analyst Policy age Β· Indicators Β· Risk 🎯 ADJUDICATOR Synthesizes all reviews into final decisions βœ… APPROVE ⚠️ FLAG πŸ”΄ DECLINE
StepWhat you doDurationPattern
Step 1Install Strands SDK & explore your first agent8 minAgentic Loop
Step 2Build a Triage Agent that classifies claims8 minRouting
Step 3Run parallel Medical + Fraud reviews10 minParallelization
Step 4Run the full pipeline β€” all patterns combined9 minAll 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).

Download and extract the lab files:

  1. Download lab4-agentic-claims.zip
  2. Extract it into your Kiro workspace β€” you should see a lab4-agentic-claims/ folder

Install dependencies:

TERMINAL β€” Run in Kiro terminal
pip install --break-system-packages strands-agents strands-agents-tools
πŸ’‘ 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.
βœ… Checkpoint: You should have:
  • lab4-agentic-claims/sample-data/claims/ β€” 6 claim JSON files
  • lab4-agentic-claims/sample-data/policy_limits.csv β€” policy coverage details
  • lab4-agentic-claims/sample-data/adjudication_rules.json β€” business rules
  • lab4-agentic-claims/step1_explore_agents.py through step3_parallel_review.py
  • lab4-agentic-claims/agentic_claims_processor.py β€” the full pipeline

Understanding the Sample Claims

The 6 claims are designed to trigger different processing paths β€” some straightforward, some suspicious:

ClaimClaimantTypeAmount (SGD)What it tests
CLM-2025-0001Tan Wei MingCritical Illness$250,000Legitimate β€” policy 5 years old, confirmed diagnosis
CLM-2025-0002Sarah LimHospitalization$18,500Straightforward β€” emergency surgery, complete docs
CLM-2025-0003Maria SantosDeath Claim$500,000Suspicious β€” policy only 7 months old, full sum
CLM-2025-0004David NgMotor Accident$4,200Low value β€” minor collision, panel workshop
CLM-2025-0005Priya RamasamyHospitalization$45,000Pre-existing risk β€” policy 5 months, back surgery
CLM-2025-0006Jason OngTravel Medical$8,200Routine β€” 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:

TRY THESE
TARGET_CLAIM = "CLM-2025-0001" # Critical Illness β€” 5-year policy, $250K TARGET_CLAIM = "CLM-2025-0005" # Hospitalization β€” 5-month policy, back surgery, $45K TARGET_CLAIM = "CLM-2025-0002" # Appendicitis β€” straightforward, should auto-approve
βœ… 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:
  1. OBSERVE β€” Load all 6 claims
  2. PLAN (Routing) β€” Triage Agent classifies and routes each claim
  3. ACT (Parallelization) β€” Medical + Fraud agents review each claim in parallel
  4. 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

ClaimExpected DecisionWhy
CLM-2025-0001 (Tan Wei Ming)APPROVE βœ…5-year policy, confirmed cancer diagnosis, amount within range
CLM-2025-0002 (Sarah Lim)APPROVE βœ…Emergency appendectomy, complete docs, reasonable cost
CLM-2025-0003 (Maria Santos)FLAG ⚠️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 ProcessAgentic (this lab)
ApproachClaims officer reviews one at a timeAgents coordinated automatically
StepsTriage β†’ medical review β†’ fraud check β†’ decision (sequential)4 agents, routing + parallel execution
Human roleHuman drives every stepYou pressed "run" β€” agents did the rest
Scalability~20 claims/day per officerWorks for 200 claims the same way
ConsistencyVaries by officer experienceSame rules, same agents, every time
ComplianceManual checklistBuilt into agent prompts

The 4 Agents You Ran

AgentRoleTools it usesPattern
Triage OfficerClassify & route claimsread_claim, check_policy, check_documentsRouting
Medical ReviewerDiagnosis, cost, coverageread_claim, check_policy, validate_medicalParallelization
Fraud AnalystRisk scoring, indicatorsread_claim, check_policy, check_fraud_indicatorsParallelization
AdjudicatorSynthesize & decidesave_reportAgentic 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.