AI-Powered Multi-Agent System for Policy Analysis & Solution Design
- Problem Statement
- Solution Overview
- Why AI Agents?
- Architecture
- Key Features
- Technical Implementation
- Setup Instructions
- Usage Guide
- Demo
- Project Journey
- Future Enhancements
- Contributing
- License
Policy makers, researchers, and social impact organizations face significant challenges when addressing complex societal issues:
- Information Overload: Vast amounts of data from multiple sources make it difficult to identify root causes and evidence-based solutions
- Time Constraints: Manual research and analysis can take weeks or months, delaying critical interventions
- Limited Global Perspective: Lack of awareness about successful international case studies and best practices
- Implementation Gaps: Difficulty translating research into actionable, context-specific implementation plans
- Resource Inefficiency: Duplication of research efforts across organizations working on similar problems
- Healthcare: Rural areas struggle with limited access to quality healthcare services
- Environment: Cities like Delhi face severe air pollution affecting millions of lives
- Education: Educational inequality persists across socioeconomic divides
- Employment: Youth unemployment requires targeted policy interventions
These problems require comprehensive, data-driven, and actionable solutions that consider local context while learning from global successes.
Policy Solution Creator is an AI-powered multi-agent system that transforms policy research and solution design from a weeks-long manual process into an automated, comprehensive analysis delivered in minutes.
Given any policy issue (e.g., "Air Pollution in Delhi"), the system:
- Analyzes the Problem with current statistics, root causes, and impact assessment
- Researches Global Solutions by finding successful case studies from around the world
- Designs Context-Specific Solutions adapted to local political, economic, and social factors
- Creates Implementation Roadmaps with phased timelines, milestones, and success metrics
- Synthesizes Executive Summaries for decision-makers with actionable insights
- ⏱️ Time Savings: Reduces research time from weeks to 2-5 minutes
- 📊 Data-Driven: Provides current statistics and evidence-based analysis
- 🌍 Global Perspective: Identifies successful international case studies
- 🎯 Actionable: Delivers specific, implementable solutions with roadmaps
- 📚 Verified Sources: All findings backed by credible references
This problem is uniquely suited for AI agents because:
- Parallel Processing: Different aspects of policy analysis (problem analysis, comparative research) can happen simultaneously
- Specialized Expertise: Each agent focuses on a specific domain (analysis, research, design, planning)
- Context Sharing: Agents build upon each other's outputs for comprehensive solutions
- Autonomous Research: Agents independently search, analyze, and synthesize information
- Scalability: The system can handle any policy domain without reprogramming
- ❌ Manual Research: Too slow, limited scope, prone to bias
- ❌ Single LLM: Lacks depth, can't parallelize, limited context window
- ❌ Rule-Based Systems: Inflexible, can't adapt to new domains
- ✅ Multi-Agent AI: Fast, comprehensive, adaptive, and scalable
┌─────────────────────────────────────────────────────────────────┐
│ Policy Solution Creator │
│ (Sequential Orchestrator) │
└─────────────────────────────────────────────────────────────────┘
│
├─────────────────────────────────┐
│ │
┌────────────▼──────────┐ ┌───────────▼──────────┐
│ PHASE 1: ANALYSIS │ │ PHASE 2: SYNTHESIS │
│ (Parallel Agents) │ │ (Sequential Agents) │
└────────────┬──────────┘ └───────────┬──────────┘
│ │
┌────────────┴──────────┐ │
│ │ │
┌──────────▼──────────┐ ┌─────────▼─────────┐ │
│ Problem Analyzer │ │ Comparative │ │
│ │ │ Researcher │ │
│ • Root Cause │ │ • Case Studies │ │
│ • Statistics │ │ • Best Practices │ │
│ • Impact │ │ • Lessons Learned │ │
│ • Sources │ │ • Sources │ │
└──────────┬──────────┘ └─────────┬─────────┘ │
│ │ │
└───────────┬───────────┘ │
│ │
│ Session State (InMemory) │
│ │
┌───────────▼─────────────────────────────────┘
│
┌──────────▼──────────┐
│ Solution Designer │
│ │
│ • Context Analysis │
│ • Solution Design │
│ • Feasibility │
│ • Resources │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Roadmap Generator │
│ │
│ • 4 Phases │
│ • Milestones │
│ • Success Metrics │
│ • Risk Mitigation │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Executive Summary │
│ │
│ • Key Findings │
│ • Top 3 Solutions │
│ • Success Factors │
└─────────────────────┘
| Agent | Role | Tools | Output |
|---|---|---|---|
| Problem Analyzer | Analyzes policy issues comprehensively | Google Search, Date Tool | Problem overview, statistics, root causes, impact assessment, sources |
| Comparative Researcher | Finds global solutions and case studies | Google Search, Date Tool | Case studies, best practices, lessons learned, sources |
| Solution Designer | Adapts global practices to local context | Google Search, Session State | Context-specific solutions, feasibility scores, resource requirements |
| Roadmap Generator | Creates phased implementation plans | Session State | 4-phase roadmap, milestones, metrics, risk mitigation |
| Executive Summary | Synthesizes insights for decision-makers | Session State | Overview, key findings, top 3 solutions, success factors |
- User Input → Policy issue (e.g., "Air Pollution in Delhi")
- Phase 1 (Parallel) → Problem analysis + Comparative research run simultaneously
- Session State → Outputs stored in InMemorySessionService
- Phase 2 (Sequential) → Solution design → Roadmap → Executive summary (each builds on previous)
- Gradio UI → Formatted outputs displayed in tabs
- Parallel Agents: Problem analysis and comparative research run simultaneously for speed
- Sequential Agents: Solution design, roadmap, and summary build on each other for depth
- Session Management: InMemorySessionService maintains state across agents
- Google Search: Real-time web search for current data and case studies
- Custom Date Tool: Ensures agents use current date for recent information
- JSON Schema Enforcement: Structured outputs for reliable parsing
- Root Cause Analysis: Identifies political, economic, social, and geographical factors
- Evidence-Based: All findings backed by statistics and credible sources
- Impact Assessment: Quantifies effects on communities and economies
- Case Studies: 3-5 successful international implementations
- Best Practices: Cross-cutting lessons from multiple contexts
- Transferability Assessment: Evaluates applicability to target location
- Local Adaptation: Considers political, economic, and social feasibility
- Multiple Timelines: Short-term (0-6 months), medium-term (6-18 months), long-term (18+ months)
- Feasibility Scoring: 1-10 scale for implementation practicality
- 4 Phases: Foundation → Pilot → Scale-Up → Optimization
- Detailed Milestones: Specific deliverables with timelines
- Success Metrics: Measurable KPIs for tracking progress
- Risk Mitigation: Identified risks with mitigation strategies
- Gradio Interface: Clean, intuitive web interface
- Progress Tracking: Real-time status updates during analysis
- Tabbed Outputs: Executive Summary, Full Analysis, Solutions & Roadmap, Sources
- Markdown Formatting: Professional, readable output
- Google ADK (Agent Development Kit) 1.18.0: Multi-agent orchestration
- Gemini 2.5 Flash: LLM for all agents
- Gradio: Web interface
- Python 3.10+: Core programming language
- InMemoryRunner: Session and state management
✅ Multi-Agent System
- Parallel agents (problem_analyzer, comparative_researcher)
- Sequential agents (solution_designer, roadmap_generator, executive_summary)
- Hierarchical orchestration (root_agent → analysis_agent → synthesis_agent)
✅ Tools
- Built-in tools:
google_search - Custom tools:
get_current_date(FunctionTool)
✅ Sessions & Memory
- InMemorySessionService for state management
- Session-based context sharing between agents
- Output keys for structured data flow
✅ Observability
- Debug mode with
run_debug() - Progress tracking and status updates
- Error handling and logging
✅ Gemini Integration
- All agents powered by Gemini 2.5 Flash
- JSON schema enforcement for structured outputs
- Context-aware prompting
- Comprehensive Comments: All functions and agents documented
- Error Handling: Try-catch blocks with detailed error messages
- Type Hints: Function signatures with return types
- Modular Design: Separate formatting functions for each output type
- JSON Parsing: Robust handling of LLM outputs (markdown code blocks, strings, dicts)
- Python 3.10 or higher
- Google API Key (for Gemini)
- Internet connection (for Google Search)
-
Open the Notebook
Upload Capstone_Project_Policy_Solution_Creator.ipynb to Google Colab -
Add API Key
- Go to Colab → Secrets (🔑 icon in left sidebar)
- Add secret:
GOOGLE_API_KEY=your_api_key_here
-
Run All Cells
- Runtime → Run all
- Wait for Gradio interface to launch
-
Upload Notebook
Upload Capstone_Project_Policy_Solution_Creator.ipynb to Kaggle -
Add API Key
- Add-ons → Secrets → Add Secret
- Name:
GOOGLE_API_KEY - Value:
your_api_key_here
-
Run Notebook
- Run all cells
- Access Gradio interface via public URL
-
Clone Repository
git clone https://github.com/naazimsnh02/policy-solution-creator.git cd policy-solution-creator -
Install Dependencies
pip install google-adk==1.18.0 gradio
-
Set API Key
export GOOGLE_API_KEY="your_api_key_here"
-
Run Notebook
jupyter notebook Capstone_Project_Policy_Solution_Creator.ipynb
- Visit Google AI Studio
- Click "Create API Key"
- Copy the key and add to your environment
-
Launch the Interface
- Run all cells in the notebook
- Wait for Gradio interface to appear
-
Enter Policy Issue
- Type your policy problem (e.g., "Traffic Management in Bangalore")
- Or use the default example: "Air Pollution in Delhi"
-
Generate Solution
- Click "🚀 Generate Policy Solution"
- Wait 2-5 minutes for analysis
-
Review Results
- Executive Summary: Quick overview for decision-makers
- Full Analysis: Detailed problem analysis and case studies
- Solutions & Roadmap: Specific solutions and implementation plan
- Sources: All references and citations
- Overview: 2-3 sentence problem summary
- Key Findings: 4-6 critical insights with data
- Recommended Solutions: Top 3 solutions with impact and timeframe
- Critical Success Factors: Essential elements for implementation
- Problem Analysis: Overview, statistics, root causes, impact
- Comparative Research: Global case studies, best practices, lessons learned
- Proposed Solutions: 3-5 solutions with feasibility scores and resource requirements
- Implementation Roadmap: 4 phases with milestones, metrics, and risk mitigation
- Problem Analysis Sources: Citations for problem data
- Comparative Research Sources: Citations for case studies
This project is licensed under the MIT License - see the LICENSE file for details.
Thank you to:
- Google & Kaggle for the 5-Day AI Agents Intensive Course and capstone project
Project Maintainer: [Syed Naazim Hussain]
- GitHub: @naazimsnh02
- Email: naazimsnh02@gmail.com
- LinkedIn: Syed Naazim Hussain
Project Link: https://github.com/Naazimsnh02/policy_solution_creator