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