Intelligent multi-agent platform for Kubernetes management and cloud cost optimization
Built with Google Agent Development Kit (ADK) and the A2A (Agent-to-Agent) protocol for seamless inter-agent communication.
Cloud AI Copilots is a multi-agent platform that combines specialized AI agents for comprehensive cloud infrastructure management. The platform consists of three integrated services:
- K8s Copilot - Kubernetes troubleshooting and management
- Cost Copilot - GCP cost analysis and optimization
- Unified Dashboard - Central management UI
- 🔍 Multi-agent diagnostics - Automated cluster health checks and resource monitoring
- 🕵️ Intelligent investigation - Root cause analysis for pod failures and deployment issues
- 💡 Remediation suggestions - Actionable fix recommendations with kubectl commands
- 💰 Integrated cost analysis - Namespace and cluster cost estimation via A2A
- 💸 Idle resource detection - Find unused VMs, disks, IPs, and load balancers
- 📊 Cost optimization - GCP billing analysis and recommendations
- 🎯 K8s cost estimation - Calculate namespace and cluster costs from resource requests
- 📈 Cost comparison - Compare costs across multiple namespaces
- 🎨 Modern UI - Built with TanStack Start, React, and Tailwind CSS
- ⚡ Instant loading - Static configuration for fast page loads
- 🔗 Agent discovery - View all available agents and their capabilities
- 📱 Responsive design - Works on desktop and mobile devices
┌─────────────────────────────────────────────────────────────┐
│ Cloud AI Copilots │
│ (Microservices Architecture) │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────┼─────────────────┬────────────────┐
│ │ │ │
┌────▼────┐ ┌─────▼──────┐ ┌────▼────────┐ ┌────▼────┐
│ K8s │ A2A │ Cost │ │ Unified │ │ User │
│ Copilot │◄────►│ Copilot │ │ Dashboard │ │ │
│ :8000 │ │ :8001 │ │ :3000 │ │ │
└─────────┘ └────────────┘ └─────────────┘ └─────────┘
│ │ │
┌────▼────┐ ┌─────▼──────┐
│ GKE │ │ GCP Billing│
│ Cluster │ │ & Assets │
└─────────┘ └────────────┘
The K8s Copilot and Cost Copilot communicate via the A2A (Agent-to-Agent) protocol:
User: "What's the cost of my namespace?"
│
├─► K8s Copilot (Diagnose namespace resources)
│ ├─► DiagnosticAgent.get_namespace_resources()
│ └─► Returns: 2.0 cores, 8.0 GB RAM, 4 pods
│
└─► Cost Copilot (via A2A)
├─► CostAnalysisAgent.estimate_namespace_cost()
└─► Returns: $69.92/month breakdown
- Python 3.10+
- Node.js 18+
- Google Cloud SDK
- Kubernetes cluster access (for K8s Copilot)
- GCP project with billing enabled (for Cost Copilot)
- Gemini API key
git clone https://github.com/m3rryqold/cloud-copilot.git
cd cloud-copilotcd services/k8s-copilot
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Create .env file
echo "GOOGLE_API_KEY=your-gemini-api-key" > .env
echo "COST_COPILOT_URL=http://localhost:8001" >> .env
# Start the agent
adk web src/agents --port 8000 --host 0.0.0.0Visit: http://localhost:8000
cd services/cost-copilot
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Create .env file
echo "GOOGLE_API_KEY=your-gemini-api-key" > .env
echo "GCP_PROJECT_ID=your-gcp-project-id" >> .env
# Start the A2A server
python start_a2a.pyA2A endpoint: http://localhost:8001
cd services/unified-dashboard
npm install
# Create .env.local file
cat > .env.local <<ENVEOF
VITE_K8S_COPILOT_URL=http://localhost:8000
VITE_COST_COPILOT_URL=http://localhost:8001
ENVEOF
# Start the dashboard
npm run devVisit: http://localhost:3000
💬 "Check the health of my cluster"
💬 "Why is my pod in CrashLoopBackOff?"
💬 "Show me the cost of the production namespace"
💬 "Compare costs between staging and production namespaces"
💬 "Find all idle VMs in my project"
💬 "Show me unattached disks that are costing money"
💬 "Estimate the cost of my Kubernetes cluster"
💬 "What are my top 10 most expensive services?"
- Browse available agents and their capabilities
- View agent architecture and communication flows
- Quick access to agent web UIs
- Responsive design for mobile and desktop
- Google ADK - Agent framework
- Gemini 2.5 - Large language model
- Kubernetes Python Client - K8s API interaction
- Google Cloud Client Libraries - GCP services
- Uvicorn - ASGI server
- TanStack Start - Full-stack React framework
- React 18 - UI library
- TypeScript - Type safety
- Tailwind CSS - Styling
- shadcn/ui - Component library
- Vite - Build tool
cloudcopilot/
├── services/
│ ├── k8s-copilot/ # Kubernetes management agent
│ │ ├── src/agents/
│ │ ├── requirements.txt
│ │ └── .env
│ ├── cost-copilot/ # Cost optimization agent
│ │ ├── src/agents/
│ │ ├── start_a2a.py
│ │ ├── requirements.txt
│ │ └── .env
│ └── unified-dashboard/ # Web dashboard
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── .env.local
├── docs/ # Documentation
├── README.md # This file
├── CLAUDE.md # Development context
└── .gitignore
GOOGLE_API_KEY=your-gemini-api-key
COST_COPILOT_URL=http://localhost:8001 # or Cloud Run URLGOOGLE_API_KEY=your-gemini-api-key
GCP_PROJECT_ID=your-gcp-project-id
PUBLIC_HOST=localhost
PUBLIC_PORT=8001
PROTOCOL=httpVITE_K8S_COPILOT_URL=http://localhost:8000
VITE_COST_COPILOT_URL=http://localhost:8001# Deploy all services via Cloud Build
gcloud builds submit --config cloudbuild.yaml --project=your-project-id
# Services will be deployed to:
# - https://k8s-copilot-xxx.run.app
# - https://cost-copilot-xxx.run.app
# - https://unified-dashboard-xxx.run.app# Check Cost Copilot agent card
curl http://localhost:8001/.well-known/agent-card.json | python3 -m json.tool
# Should return agent metadata with skills list1. Start both K8s Copilot and Cost Copilot
2. In K8s Copilot UI: "Tell me the cost of my default namespace"
3. Expected: Cost breakdown with cores, memory, and estimated monthly cost
See CLAUDE.md for detailed development context and guidelines.
K8s Copilot:
# In services/k8s-copilot/src/agents/diagnostic_agent/tools.py
@tool
def your_new_tool(param: str) -> str:
"""Tool description for the LLM."""
return resultCost Copilot:
# In services/cost-copilot/src/agents/cost_analysis_agent/tools.py
@tool
def your_new_cost_tool(project_id: str) -> dict:
"""Tool description for the LLM."""
return resultDashboard:
// In services/unified-dashboard/src/config/agents.ts
export const AGENT_CONFIGS: AgentConfig[] = [
// Add your new agent configuration
]Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Built with Google Agent Development Kit (ADK)
- Powered by Gemini 2.5
- UI components from shadcn/ui
For issues and questions:
- Create an issue in this repository
- Review the A2A Integration docs
Built with ❤️ using Google ADK and A2A Protocol