Kaggle Agents Intensive - Capstone Project | Track: Agents for Good
AI-powered multi-agent system to support parents of neurodivergent children (ADHD + ASD Level 1) with behavioral understanding, evidence-based strategies, and activity planning.
This capstone project demonstrates 8+ capabilities from the 5-Day AI Agents Intensive Course:
| Day | Capability | Implementation |
|---|---|---|
| 1 | Multi-agent hierarchical system | Manager + 5 specialist agents |
| 2 | Tools & MCP | GoogleSearchTool, Custom FunctionTools, AgentTools |
| 3 | Memory & Context | Cross-session learning, personalization |
| 1 | Agent orchestration | Manager delegates to specialists |
| 2 | Custom tools | Behavior classifier, activity database, pattern analyzer |
| 4 | Session management | Conversation context, state tracking |
| 5 | ParallelAgent | Concurrent expert consultation (ADHD + ASD + Dev) |
| 5 | SequentialAgent | Research pipeline (Research → Analyze → Synthesize) |
This project implements a hierarchical multi-agent system using Google ADK with type-safe Pydantic models throughout.
Run the cell below to see the interactive architecture diagram!
┌─────────────────────────────────────────────────────────┐
│ 🎯 PARENTING COORDINATOR │
│ (Manager Agent) │
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
│ • Orchestrates all specialist agents │
│ • Routes questions to appropriate experts │
│ • Synthesizes multi-perspective responses │
│ • Tools: All 5 specialists as AgentTools │
└───────────────────────────┬─────────────────────────────┘
│
┌───────────────┬───────────────────┼───────────────────┬──────────────────┐
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐
│ 🧠 ADHD │ │ 🌈 ASD │ │ 📊 DEV │ │ 💾 MEMORY │ │ 📅 ACTIVITY │
│ Expert │ │ Expert │ │ Expert │ │ Agent │ │ Planner │
│─────────────│ │─────────────│ │─────────────│ │─────────────│ │─────────────────│
│ Executive │ │ Sensory │ │ Age-typical │ │ Pattern │ │ Structured │
│ function │ │ processing │ │ milestones │ │ learning │ │ activity plans │
│─────────────│ │─────────────│ │─────────────│ │─────────────│ │─────────────────│
│ 🔧 Tools: │ │ 🔧 Tools: │ │ 🔧 Tools: │ │ 🔧 Tools: │ │ 🔧 Tools: │
│ • Search │ │ • Search │ │ • Search │ │ • Pattern │ │ • Activity │
│ • Behavior │ │ • Behavior │ │ │ │ Analyzer │ │ Planner │
│ Classifier│ │ Classifier│ │ │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────────┘
| Agent | Focus Area | Tools | Key Capabilities |
|---|---|---|---|
| 🧠 ADHD Expert | Executive function | GoogleSearch, BehaviorClassifier | Working memory, task initiation, impulse control |
| 🌈 ASD Expert | Sensory processing | GoogleSearch, BehaviorClassifier | Routines, social interaction, flexibility |
| 📊 Dev Expert | Milestones | GoogleSearch | Age-appropriate expectations, typical development |
| 💾 Memory Agent | Personalization | PatternAnalyzer | Session history, successful strategies |
| 📅 Activity Planner | Structured plans | ActivityPlanner | Materials, timing, success criteria |
Type-Safe Design: All models use Pydantic v2 with strict type checking, discriminated unions for results, and comprehensive validation.
1. ADHD Expert
- Executive function challenges (working memory, task initiation, organization)
- Attention regulation and impulse control
- Tools: GoogleSearchTool, BehaviorClassifier
- Searches: CHADD, Russell Barkley research, ADDitude Magazine
2. ASD Expert
- Sensory processing differences
- Communication patterns and social interaction
- Need for routine and predictability
- Tools: GoogleSearchTool, BehaviorClassifier
- Searches: Autism Speaks, CDC autism resources, Temple Grandin
3. Developmental Expert
- Age-appropriate expectations for 8-year-olds
- Typical developmental milestones
- Distinguishing neurodivergent from age-typical behaviors
- Tools: GoogleSearchTool
- Searches: CDC milestones, AAP guidelines
4. Memory Agent
- Pattern learning from session history
- Identifying what works for THIS specific child
- Personalized recommendations based on past successes
- Tools: PatternAnalyzer (custom)
5. Activity Planner
- Structured activity plans with materials and setup
- Executive function, transitions, homework, engagement activities
- Incorporates past successful approaches
- Tools: ActivityPlanner (custom)
6. Parenting Coordinator (Manager)
- Orchestrates all 5 specialist agents
- Routes questions to appropriate specialists
- Synthesizes insights from multiple perspectives
- Maintains empathetic, supportive communication
- Tools: All 5 specialists as AgentTools
This project implements advanced ADK orchestration patterns for multi-agent coordination:
from google.adk.agents import ParallelAgent
from capstone.agents import create_adhd_expert, create_asd_expert, create_developmental_expert
# Consult all three specialists simultaneously
expert_panel = ParallelAgent(
name="parallel_expert_panel",
description="Consults ADHD, ASD, and developmental experts in parallel",
sub_agents=[create_adhd_expert(), create_asd_expert(), create_developmental_expert()],
)Use Cases:
- Get multiple perspectives on a behavior simultaneously
- Reduce latency when consulting multiple specialists
- Compare recommendations from different domains
from google.adk.agents import SequentialAgent
from capstone.agents import create_adhd_expert, create_asd_expert, create_developmental_expert
# Create sequential research pipeline
# Flow: ADHD Expert → ASD Expert → Developmental Expert
pipeline = SequentialAgent(
name="research_pipeline",
description="Sequential pipeline: Research → Analyze → Synthesize",
sub_agents=[create_adhd_expert(), create_asd_expert(), create_developmental_expert()],
)Use Cases:
- Deep investigation workflows requiring multiple stages
- Building on previous analysis (Research → Analyze → Synthesize)
- Structured problem-solving with clear stages
neurodiveragents/
├── src/
│ └── capstone/
│ ├── models/
│ │ ├── behavior.py # BehaviorInput, BehaviorAnalysis, Enums
│ │ ├── activity.py # ActivityPlan, ActivityRequest
│ │ ├── strategy.py # Strategy, BehaviorResponse
│ │ ├── memory.py # SessionOutcome, BehaviorPattern
│ │ └── results.py # ToolSuccess, ToolError, ToolResult
│ ├── tools/
│ │ ├── behavior_classifier.py # Type-safe behavior analysis
│ │ ├── activity_planner.py # Type-safe activity planning
│ │ └── pattern_analyzer.py # Type-safe pattern recognition
│ ├── agents/
│ │ ├── coordinator.py # Manager/coordinator agent
│ │ ├── specialist_factory.py # Factory for specialist agents
│ │ ├── agent_configs.py # Agent configurations and prompts
│ │ ├── tool_wrappers.py # ADK tool wrapper functions
│ │ ├── tool_formatters.py # Output formatting utilities
│ │ ├── specialist_helpers.py # Specialist consultation helpers
│ │ └── retry_config.py # API retry configuration
│ └── infrastructure/
│ └── agent_factory.py # AgentFactory with caching
├── tests/
│ ├── unit/ # Unit tests (237 tests, 94% coverage)
│ └── conftest.py # Test fixtures
├── docs/
│ ├── api_reference.md # Complete API documentation
│ ├── architecture_guide.md # System architecture guide
│ ├── typing_guide.md # Type safety patterns
│ ├── testing_guide.md # Testing best practices
│ └── best_practices.md # Python best practices
├── demo_tools.py # Demonstration of type-safe tools
├── demo_agents.py # Multi-agent system demo
├── demo_comprehensive.py # Full capability demonstration
├── pyproject.toml # Dependencies and configuration
└── README.md # This file
- Python 3.12+
uv(recommended) orpip
# Install dependencies
uv sync
# Or with pip
pip install -e ".[dev]"export GOOGLE_API_KEY="your-api-key-here"Run the foundational tools demo:
uv run python demo_tools.pyThis demonstrates:
- Behavior Classification: Type-safe analysis of ADHD/ASD/age-typical factors
- Activity Planning: Structured activity plans with complete preparation
- Pattern Analysis: Learning from past session outcomes
Run the standard ADK multi-agent demo:
export GOOGLE_API_KEY="your-api-key-here"
uv run python demo_agents.pyThis demonstrates:
- Scenario 1: Behavioral analysis with specialist consultation
- Scenario 2: Activity planning with memory integration
- Scenario 3: Pattern learning from session history
Duration: ~5 minutes | Scenarios: 3
Run the comprehensive demo with all capabilities:
export GOOGLE_API_KEY="your-api-key-here"
uv run python demo_comprehensive.pyThis demonstrates all 6 scenarios showcasing:
- Multi-Factor Analysis: ADHD vs ASD vs age-typical behavior
- Sensory Processing: ASD sensory meltdown analysis
- Activity Planning: Structured bedtime routine creation
- Pattern Learning: Memory agent analyzing session history
- Impulsivity Assessment: ADHD + developmental expert collaboration
- Complex Multi-Factor: ALL 5 specialists working together
Features:
- 🎨 Color-coded output for clarity
- 📊 Detailed metrics tracking (agents, tools, performance)
- 🔧 All 3 custom tools demonstrated
- 👥 All 5 specialist agents activated
- ⚡ Smart retry handling and rate limit protection
- 📈 Comprehensive analytics summary
Duration: ~12 minutes | Scenarios: 6 | Full Capabilities: Yes
See: DEMO_GUIDE.md for complete demo documentation
Showcases:
- Multi-agent hierarchical orchestration (Manager + 5 specialists)
- AgentFactory dependency injection (no global state)
- Custom function tools with Pydantic validation
- Google Search integration (GoogleSearchTool)
- Cross-session learning and personalization
- Production-ready error handling and metrics
This project follows rigorous Python type safety best practices:
All domain data uses Pydantic models with strict validation:
class BehaviorInput(BaseModel):
description: str = Field(..., min_length=10, max_length=1000)
time_of_day: TimeOfDay # Enum, not string!
activity_type: ActivityType # Enum, not string!Tool results are always Success OR Error, never mixed:
ToolResult = Union[ToolSuccess, ToolError]
result = classify_behavior(input)
if is_success(result): # Type narrows to ToolSuccess
print(result.data)
else: # Type narrows to ToolError
print(result.error_code, result.error_message)No typos, full autocomplete:
class ActivityType(str, Enum):
HOMEWORK = "homework"
TRANSITIONS = "transitions"
BEDTIME_ROUTINE = "bedtime_routine"Automatic validation on construction and assignment:
behavior = BehaviorInput(
description="Hi", # ❌ ValidationError: too short (min 10)
time_of_day="morning", # ❌ ValidationError: wrong type (needs enum)
)# Type check
uv run ty check src/
# Lint
uv run ruff check src/
# Format
uv run ruff format src/
# Run tests (when added)
uv run pytestInput: Description of challenging behavior with context Output: ADHD/ASD/age-typical factor analysis + actionable strategies
Input: Activity goal (homework, transitions, engagement) Output: Complete plan with materials, setup, timing, success criteria
Input: Session history with outcomes Output: Identified patterns, successful strategies, common triggers
This is a parenting support tool, NOT medical advice. Always consult healthcare professionals for medical concerns about your child's development or behavior.
- ✅ Type-safe Pydantic models with strict validation
- ✅ Three custom tools (Behavior Classifier, Activity Planner, Pattern Analyzer)
- ✅ Five specialist agents (ADHD, ASD, Developmental, Memory, Activity Planner)
- ✅ Manager coordinator agent with orchestration logic
- ✅ Multi-agent hierarchical system with AgentTool pattern
- ✅ Google Search integration for evidence-based strategies (ADHD, ASD, Dev experts)
- ✅ Cross-session learning with pattern analysis
- ✅ Comprehensive demo scenarios
- ✅ ParallelAgent for concurrent expert consultation
- ✅ SequentialAgent for structured research pipelines
- ✅ 237 unit tests with 94% coverage
Ready for submission! A complete Jupyter notebook demonstration is available at:
notebooks/kaggle_capstone_demo.ipynb
Features:
- ✅ Complete setup instructions for Kaggle environment
- ✅ API key configuration with Kaggle secrets
- ✅ Three interactive demo scenarios
- ✅ Architecture explanations with diagrams
- ✅ Comprehensive capability showcase (6+ ADK features)
- ✅ Results analysis and conclusions
To use on Kaggle:
- Upload the
src/directory to your Kaggle notebook - Add your Google AI API key as a Kaggle secret (
GOOGLE_API_KEY) - Import the notebook file
- Enable internet access in settings
- Run all cells
See notebooks/README.md for detailed instructions.
- ✅
Create Kaggle notebook with inline demonstrationsDONE - ✅
Add comprehensive testing suiteDONE (237 tests, 94% coverage) - ✅
Document ADK capabilities showcaseDONE - ✅
Add real-world scenario examplesDONE - ✅
ParallelAgent & SequentialAgent patternsDONE - 🚧 Performance evaluation and metrics
- 🚧 Video demonstration (optional)
MIT License - This is an educational project for the Kaggle Agents Intensive Capstone.
- Google & Kaggle for the ADK framework and Agents Intensive Course
- CHADD, Autism Speaks, CDC for evidence-based resources
- Parents of neurodivergent children for inspiring this meaningful use case