X-RAIL - Our Multi-Agent Insurance AI Platform Built with Google Cloud & ADK

X-RAIL - Our Multi-Agent Insurance AI Platform Built with Google Cloud & ADK

in

🚂 X-RAIL: Building an Explainable Multi-Agent AI for the Future of Insurance

In the middle of a sleepless week at the Google ADK Hackathon 2025, we asked ourselves a deceptively simple question:

“What if an entire insurance underwriting team — risk scorers, analysts, dashboard builders, compliance checkers — could be reimagined as AI agents?”

That question sparked what would soon become X-RAIL — an ambitious project to redesign how risk is assessed, explained, and acted upon in the insurance industry.


🧩 The Problem that Sparked It All

The insurance industry is massive — nearly $7 trillion — and yet, it often runs on opaque algorithms and black-box decisioning systems. Customers don’t understand their premiums. Regulators are left in the dark. And underwriters, ironically, still rely heavily on spreadsheets and instinct.

We believed there was a better way. A more transparent, auditable, intelligent way.


🚉 Enter X-RAIL

We named our system X-RAIL — short for Xplainable Risk Assessment & Insights Loop. It’s more than just a model. It’s a thinking system, made up of specialized AI agents that work in harmony, just like a real underwriting team would.

From scoring risk to simulating what-if scenarios, from translating SHAP values into narratives to generating branded PDF reports, each agent plays a dedicated role. And everything is coordinated seamlessly via Google’s Agent Development Kit (ADK) and Gemini Flash.


🎛️ Behind the Scenes: The AI Orchestra

At the heart of X-RAIL is the Conductor Agent, an orchestrator powered by Gemini that manages context, memory, and flow across all tasks. Think of it like the underwriting manager delegating jobs across the team.

We then built a cast of specialists:

  • A Risk Agent that uses a calibrated XGBoost model on Vertex AI to score risk in real-time.
  • An Explainability Agent that transforms SHAP values into human-friendly visual and narrative explanations.
  • A Dashboard Agent that whips up interactive Streamlit dashboards with Plotly visualizations.
  • An Impact Simulator for running “what-if” scenarios and comparing outcomes.
  • A Report Agent that turns raw explanations into regulatory-grade PDF reports.
  • A BigQuery Agent that converts natural language into SQL queries using ChaseSQL.
  • A BQML Agent that trains ML models natively inside BigQuery.
  • An Analytics Agent that handles Python-based statistical analysis via Vertex AI’s Code Executor.

Each agent talks to the others — asynchronously, independently, and explainably.

X-RAIL Architecture Diagram


⚙️ The Tech Stack That Made It Possible

Pulling this off required a tightly integrated stack:

  • Google Cloud: BigQuery, Vertex AI, Cloud Run, and Storage
  • ML & Explainability: XGBoost, SHAP, BigQuery ML, Scikit-learn
  • LLMs & Orchestration: Gemini Flash, ADK, Vertex AI RAG
  • UI & Visualization: Streamlit, Plotly, FPDF
  • Dev & Ops: Python, Pydantic, Docker, Poetry, Cloud Run, Pytest

Every agent was designed as an isolated, deployable service, communicating through shared memory and ADK abstractions.


🧪 Challenges That Kept Us Awake

With great complexity came great challenges:

  • Orchestrating multiple agents across workflows, while maintaining shared state and audit logs, was non-trivial.
  • Translating SHAP plots into useful, narrative explanations involved both visual generation and natural language.
  • Deploying these dependency-heavy agents to Cloud Run required stripping down containers and smart caching.
  • IAM and service permissions across BigQuery, Vertex AI, and Cloud Storage had to be finely tuned.
  • And perhaps most critically, we needed synthetic insurance datasets realistic enough to test end-to-end flows.

📈 What We Achieved

Despite the long hours and late nights, X-RAIL delivered real, measurable impact:

  • 🕒 Reduced manual underwriting review time by over 60%
  • 📊 Delivered live dashboards and automated PDF reports within minutes
  • 🔍 Gave regulators and compliance officers a full audit trail of every decision
  • 💡 Made complex model predictions understandable to non-technical users
  • 🚀 Trained and deployed new risk models directly inside BigQuery

And it all ran end-to-end in the cloud, live, auditable, and explainable.


🌱 Where We Go From Here

The version we built at the hackathon was just the beginning. Next on our roadmap:

  • Telematics-based risk scoring for usage-based insurance
  • A Regulatory Mapping Agent to auto-tag compliance requirements
  • Fraud detection agents and anomaly detection at the data ingestion layer
  • Mobile dashboards for field agents
  • And a big one: Counterfactual reasoning — “What would have made this claim less risky?”

💬 Final Reflections

X-RAIL wasn’t just about writing code. It was about reimagining how expert knowledge can be codified, explained, and scaled through AI agents.

We built it not to replace humans, but to enhance decision-making with transparency and speed. In high-stakes, regulated environments like insurance, that matters more than ever.

We’re proud to have taken this leap at the #adkhackathon — and even prouder of what’s ahead.

Stay tuned. The train’s just left the station.