Note: This is a capstone project demonstrating multi-agent architecture concepts from Google's AI Agents Intensive course. The implementation uses simulated data to showcase agent coordination patterns and MCP integration structure. For production use, real API integrations would need to be implemented.
The Problem: Development Teams Flying Blind
Working with engineering teams at scale, I've observed a persistent challenge: teams need visibility into repository health, code quality, and deployment metrics, but existing solutions are prohibitively expensive or inflexible.
Many engineering teams simply go without this crucial information - not because they don't need it, but because commercial enterprise-grade platforms (such as CodeClimate, SonarQube, or Snyk) typically operate on per-seat pricing models that can range from $10–50 per developer monthly. For a mid-sized engineering organization, this operational cost can easily exceed $15,000–100,000 annually.
For my capstone, I wanted to demonstrate that there's a better way.
Why Existing Solutions Fall Short
The market is well-served by enterprise-grade repository analysis platforms like CodeClimate, SonarQube, and Snyk. These are powerful tools designed for large-scale compliance. However, for many agile teams, they can present challenges regarding modularity and cost-efficiency. Their monolithic architectures often make it difficult to integrate custom, agent-based workflows without significant friction.
The Cost Problem
Traditional commercial solutions use a "per-developer" pricing model:
- CodeClimate: $10–50 per developer/month
- SonarQube: Enterprise editions start at $20,000+/year
- For a 50-person team: $6,000–50,000 annually
- For a 500-person team: $60,000–500,000 annually
Many engineering teams - especially in startups, open source communities, and smaller enterprises - simply can't afford this.
The Customization Problem
You're locked into predefined metrics:
- Can't add metrics specific to your organization
- Can't remove metrics you don't need
- Pay for everything whether you use it or not
- Your unique development workflows aren't supported
The Control Problem
Everything runs in someone else's cloud:
- Subject to their SLA, uptime, and maintenance schedules
- Data governance concerns for regulated industries
- Can't truly control costs (scaling = exponential price increases)
- Infrastructure decisions made by vendors, not your team
What If There Was A Better Way?
For most organizations, there isn't an alternative. Until now.
Why Multi-Agent Architecture?
Rather than building a monolithic analysis tool, I chose a multi-agent approach inspired by the course curriculum. Each specialized agent handles one responsibility:
- Repository Analysis Agent - Fetches commits, PRs, issues, and contributor data
- Code Quality Agent - Analyzes complexity, duplication, and technical debt
- Development Metrics Agent - Calculates DORA metrics (the gold standard for DevOps performance)
- Security Scanner Agent - Detects secrets, vulnerabilities, and best practice violations
- Insights Agent - Generates AI-powered recommendations with ROI estimates
- Report Generator Agent - Synthesizes everything into actionable intelligence
A Coordinator Agent orchestrates this entire workflow, managing dependencies and ensuring agents execute in the right sequence (or in parallel where possible).
The Architectural Elegance
The beauty of this architecture is its modularity. Want to add a new analysis type? Just create a new agent. Need to change how data is fetched? Update the MCP server interface, and all agents benefit without code changes.
The Cost & Efficiency Advantage
Beyond architectural elegance, the multi-agent approach offers a practical advantage: resource efficiency and cost control.
Traditional monolithic systems run all analysis every time, consuming resources continuously. CodePulse's agents are discrete and can be orchestrated:
- Run only what you need: Execute only the analyses your team actually needs
- Schedule intelligently: Run during off-peak hours to reduce cloud infrastructure costs
- Add/remove flexibly: Customize which agents run based on your organizational priorities
- Scale proportionally: Resource consumption scales with actual usage, not a fixed SaaS bill
This architectural choice translates directly to 60–95% cost reduction compared to commercial SaaS alternatives while providing MORE customization, not less.
The Technical Stack
Google Agent Development Kit (ADK): The foundation for building multi-agent systems with built-in coordination patterns
Model Context Protocol (MCP): Provides a clean abstraction layer between agents and tools, making the system extensible
Gemini LLM: Powers the insights engine for contextual analysis and recommendations
Python + AsyncIO: Enables concurrent agent execution for better performance
Key Capabilities
1. Development Performance (DORA Metrics)
CodePulse calculates the four key DORA metrics that separate high-performing from low-performing teams:
- Deployment Frequency: How often code ships to production
- Lead Time for Changes: Time from code commit to production
- Mean Time to Recovery: How quickly teams recover from incidents
- Change Failure Rate: Percentage of deployments causing failures
The system demonstrates how these metrics can be calculated from repository data and contextualized against industry benchmarks with actionable recommendations.
2. Code Quality Analysis
Beyond basic complexity metrics, CodePulse identifies:
- Cyclomatic complexity patterns and hotspots
- Technical debt accumulation over time
- Code duplication across the codebase
- Maintainability index trends
- Test coverage gaps
Each finding comes with an estimated ROI for prioritization.
3. Security Intelligence
The Security Scanner Agent demonstrates detection of:
- Hardcoded secrets (API keys, tokens, credentials)
- Known vulnerabilities in dependencies (with CVE references)
- Security best practice violations
Critical findings are automatically prioritized with immediate action recommendations.
4. AI-Powered Insights
This is where the system shines. The Insights Agent doesn't just report problems - it:
- Compares metrics to industry standards
- Estimates the business impact of each issue
- Prioritizes recommendations by urgency and ROI
- Creates immediate, short-term, and long-term action plans
5. Cost-Controlled Analysis
Unlike commercial platforms with fixed pricing, CodePulse offers:
- Granular Execution Control: Run only the analysis you need
- Flexible Scheduling: Batch analysis during off-peak hours to reduce compute costs
- Custom Metrics: Add/remove agents based on your organization's needs
- Model Flexibility: Use any LLM (Gemini, GPT-4, open-source alternatives)
- Predictable Costs: Scale linearly, not exponentially
A team can go from "can't afford repository analysis tool" to "have customized, production-grade repository intelligence" for less than the cost of a single commercial subscription.
The Multi-Agent Coordination Pattern
One of the most interesting architectural decisions was how agents communicate. I implemented a three-phase execution pattern:
Phase 1: Data Collection
Repository Analysis Agent runs first, gathering all raw data
Phase 2: Parallel Analysis
Code Quality, DORA Metrics, and Security Scanner run concurrently
(Each works on the data independently, maximizing performance)
Phase 3: Synthesis
Insights Agent combines all findings
Report Generator creates the final deliverable
The Coordinator Agent maintains a shared results dictionary that serves as memory across the workflow. Each agent contributes its analysis, and later agents can access everything that came before - a key demonstration of the memory management concepts from Day 3 of the course.
Model Context Protocol (MCP) Integration
MCP was a game-changer for this architecture. Rather than hardcoding tool calls, I defined three MCP server interfaces:
GitHub API Tools Server
- get_repository_metadata()
- get_commits()
- get_pull_requests()
- get_issues()
- get_contributors()
Code Analysis Tools Server
- analyze_complexity()
- detect_duplicates()
- identify_code_smells()
- calculate_maintainability()
Reporting Tools Server
- generate_insights()
- create_visualizations()
- calculate_roi()
Current Implementation: For the capstone demonstration, these servers connect to intelligent mock data generators that produce realistic patterns.
Production Path: The agent code remains unchanged - only the MCP server implementations need to be swapped to call real APIs and tools. Agents call tools through MCP without knowing implementation details, demonstrating the abstraction and modularity that makes the system extensible.
This means the system could support GitHub, GitLab, or Bitbucket by simply creating new MCP server implementations without changing any agent code.
Real-World Example Output
Let's say CodePulse analyzes your repository and finds:
❌ High PR Lead Time Detected (Priority: 9/10)
Description: PRs take 8.5 days on average (industry best: < 3 days)
Impact: Delays feature delivery by 5.5 days per PR
Recommendation: Implement 24–48h code review SLA, distribute code ownership
Estimated ROI: 25% improvement ($15K-30K annually in faster time-to-market)
This isn't just a metric - it's actionable intelligence. Your team knows exactly what's wrong, why it matters, and what to do about it.
Challenges and Solutions
Challenge 1: Demonstrating Real Patterns Without API Dependencies
Solution: I implemented intelligent mocking that generates realistic patterns:
- Weekday/weekend commit distributions
- Power-law contributor patterns (few very active, many occasional)
- Varied PR lead times with 80/20 distribution (most fast, some slow)
- Realistic security findings with actual CVE format
This allows the notebook to demonstrate the complete workflow while remaining reproducible for reviewers without requiring API tokens or dealing with rate limits.
Challenge 2: Agent Coordination Complexity
Solution: The Coordinator Agent pattern centralizes orchestration logic. Each individual agent stays simple and focused. Adding new analysis steps is straightforward - just add a new agent and update the coordinator's execution sequence.
Challenge 3: Making Insights Actionable
Solution: Every insight includes:
- Severity rating (critical/high/medium/low)
- Priority score (1–10)
- Industry benchmark comparison
- Specific recommendation
- Estimated ROI with dollar amounts
This transforms raw metrics into business value - a key requirement for enterprise adoption.
The Economics: Why CodePulse Matters
The Cost Problem Nobody Talks About
Commercial repository analysis platforms are a tax on engineering organizations. For a typical company:
50-person engineering team (annual cost):
| Cost Element | Commercial Platform | CodePulse Approach |
|---|---|---|
| Base service | $15,000-50,000 | $0 |
| API calls | Included | $120-240 |
| Infrastructure | Included | $600-1,200 |
| TOTAL | $15K-50K | $720-1,440 |
| Savings | — | 95% reduction |
500-person engineering team (annual cost):
| Cost Element | Commercial Platform | CodePulse Approach |
|---|---|---|
| Base service | $150,000-500,000 | $0 |
| API calls | Included | $1,200-2,400 |
| Infrastructure | Included | $6,000-12,000 |
| TOTAL | $150K-500K | $7.2K-14.4K |
| Savings | — | 95% reduction |
What Changes This Equation?
1. Orchestration Control
The Coordinator Agent manages when and how frequently analysis runs:
- Run on-demand when needed (not continuous background processing)
- Schedule analysis for off-peak hours (save cloud compute costs)
- Batch multiple repositories in one execution
- Control resource consumption precisely
2. LLM Flexibility
You're not locked into expensive proprietary models:
- Use Gemini API (more cost-effective than competitors)
- Switch to open-source models (Llama, Mistral) running on your infrastructure
- Cost per analysis: $0.10–0.50 (vs $5–20 with commercial platforms)
- Scalable without exponential cost increases
3. Custom Agents
Traditional platforms force you to use their predefined metrics. CodePulse lets you:
- Remove agents you don't need
- Add custom agents for YOUR specific metrics
- Combine metrics unique to your organizational context
- Pay only for what you use
Who Benefits From This Approach?
Engineering Teams in Startups
- Building fast, don't have time to manually monitor code quality
- Need insights but can't justify $20K+/year spend
- Solution: CodePulse, customized to startup priorities
Open Source Maintainers
- Steward multiple community projects
- Need visibility into code health across projects
- Can't afford commercial tools
- Solution: CodePulse, free and community-friendly
Enterprise Teams with Unique Needs
- Your metrics don't fit standard platforms
- SaaS tools don't adapt to your workflow
- Need infrastructure you control
- Solution: CodePulse, fully customizable
Organizations in Regulated Industries
- Data residency requirements
- Can't use cloud-hosted SaaS
- Need complete system control
- Solution: CodePulse, self-hosted and compliant
Democratizing Development Intelligence
CodePulse wasn't built to replace commercial platforms for enterprises that can afford them. It was built to democratize repository intelligence for everyone else.
The real innovation isn't the individual agents - it's the realization that development intelligence should be composable, customizable, and cost-controlled.
By using a multi-agent architecture with MCP abstraction, CodePulse proves that you don't need to be locked into expensive vendor platforms to get enterprise-grade insights. You can build smarter, more customized solutions at a fraction of the cost.
This is what democratized development intelligence looks like.
Performance Optimization
The system completes a full analysis cycle in under 60 seconds through:
- Parallel execution where agents don't depend on each other (async/await patterns)
- Efficient data structures (agents share a single results dictionary)
- Smart data generation (pre-computed patterns loaded quickly)
In production, additional optimizations would include:
- API response caching
- Incremental analysis (only new commits)
- Background job processing for large repositories
Path to Production
While this was built as a capstone demonstration, the architecture provides a solid foundation for production deployment:
What's Already There:
- ✅ Multi-agent coordination patterns
- ✅ MCP abstraction layer
- ✅ Memory management across agents
- ✅ Parallel execution framework
- ✅ Insights generation logic
- ✅ Health scoring algorithms
What Would Need Implementation:
Step 1: Implement Real MCP Servers
# Current (Demo)
class GitHubToolsServer:
async def call_tool(self, tool_name, **kwargs):
return self._generate_mock_data(tool_name, **kwargs)
# Production (Real Integration)
class GitHubToolsServer:
async def call_tool(self, tool_name, **kwargs):
return await self.github_api.call(tool_name, **kwargs)
Step 2: Add persistent storage for historical analysis and trend tracking
Step 3: Wrap in a REST API (FastAPI makes this straightforward)
Step 4: Deploy with containerization (Docker)
Step 5: Add authentication, rate limiting, comprehensive error handling
The multi-agent architecture, MCP integration patterns, and workflow orchestration remain unchanged - these production additions are infrastructure and integration layers around the core system.
Key Learnings from the AI Agents Course
This project demonstrates practical application of all five days from Google's AI Agents Intensive:
Day 1 - Agent Architecture: Multi-agent coordination with clear separation of concerns. Each agent has a single responsibility, and the Coordinator manages the workflow.
Day 2 - Tools & MCP: Tool abstraction through Model Context Protocol. The MCP layer allows agents to call tools without knowing implementation details, making the system modular and extensible.
Day 3 - Memory: Shared state management across agent workflows. The coordinator maintains a results dictionary that serves as memory, allowing later agents to build on earlier analysis.
Day 4 - Evaluation: Built-in DORA metrics calculation and comprehensive performance logging throughout the workflow.
Day 5 - Deployment: Agent-to-Agent communication patterns ready for production deployment, with clear separation between business logic and infrastructure concerns.
The course emphasized that agents should be composable, maintainable, and scalable - principles that guided every design decision in CodePulse.
Try It Yourself
The complete demonstration is available on Kaggle: CodePulse Notebook
To Explore the Architecture:
Fork the notebook on Kaggle
-
Run the notebook - no setup required
- Uses simulated data for consistent demonstration
- Complete analysis workflow executes in under 60 seconds
- All outputs are generated for review
-
Review the architecture:
- See how 6 agents coordinate through the Coordinator
- Observe MCP integration patterns
- Study the insights generation framework
-
Experiment with the code:
- Modify agent logic to see how changes propagate
- Adjust thresholds for insights generation
- Try different repository configurations
Note: The current notebook uses simulated data to demonstrate the multi-agent architecture. To analyze real repositories, you would need to:
- Implement the MCP server backends (GitHub API, code analysis tools)
- Add your GitHub API token to Kaggle Secrets
- Update the data source methods to call real APIs instead of mock generators
- Add error handling for API failures and rate limits
The agent coordination, workflow patterns, and insights generation logic would remain unchanged - demonstrating how the architecture separates concerns between business logic and data sources.
Conclusion
Building CodePulse taught me that multi-agent systems aren't just academic concepts - they're practical architectural patterns for solving complex real-world problems. By breaking repository analysis into specialized agents coordinated through MCP, the system becomes modular, testable, and extensible.
While this is a demonstration project using simulated data, the architecture showcases how DORA metrics, code quality analysis, security scanning, and AI-powered insights can be combined into a comprehensive development intelligence platform. More importantly, it proves that this can be delivered at 1/10th the cost of commercial alternatives while providing more customization, not less.
The key takeaway: Focus first on architecture and coordination patterns, then layer on production integrations. This approach, emphasized throughout the AI Agents Intensive course, creates systems that are easier to test, maintain, and evolve.
CodePulse demonstrates that the barrier to enterprise-grade development intelligence isn't technical complexity - it's vendor lock-in and pricing models. When you apply thoughtful multi-agent design principles, you can democratize access to intelligence that was previously available only to well-funded enterprises.
Whether you're an engineering leader exploring development intelligence platforms, or a developer interested in multi-agent architectures, I hope CodePulse demonstrates the power of thoughtful multi-agent design and the value of cost-controlled, customizable intelligence.
Technical Details
- Project: CodePulse - AI-Powered Repository Health & Performance Analyzer (Capstone Demonstration) Architecture: Multi-Agent System with 6 specialized agents + Coordinator
- Framework: Google Agent Development Kit (ADK) concepts
- Integration Pattern: Model Context Protocol (MCP)
- Language: Python 3.11+
- Key Libraries: asyncio, pydantic, dataclasses
- Deployment: Kaggle Notebook (portable to any Python environment)
- Data Approach: Simulated data with realistic patterns for demonstration
- Competition: Kaggle AI Agents Intensive Capstone (Enterprise Track)
- Course: Google AI Agents Intensive (5-day program)
- Author: Shazim Surmawala
- Date: November 2025
Connect
I'd love to hear your thoughts on multi-agent architectures or discuss how these patterns might apply to your projects!
- LinkedIn: linkedin.com/in/shazim-surmawala
- GitHub: github.com/sshazim
- Kaggle Notebook: CodePulse Demo
- Github Repository: CodePulse Repository
This blog post describes the capstone project for Google & Kaggle's AI Agents Intensive Course. The project demonstrates practical application of multi-agent architectures, MCP integration patterns, and coordination design - providing a foundation for cost-effective, democratized development intelligence platforms.
Tags: #AI #MachineLearning #MultiAgent #SoftwareEngineering #DevOps #GitHub #DORA #CodeQuality #AgenticAI #MCP #CostEffectiveness

Top comments (0)