Multi-agent system for optimizing data center AI workloads with real-time grid energy signals
Submission for Digital Energy Grid Hackathon 2025 - Problem Statement 2: Compute-Energy Convergence
AI and data centers are now major energy loads. How do we ensure our digital future doesn't destabilize the physical grid that powers it?
CACO transforms data centers from passive grid loads into active flexibility providers by intelligently scheduling AI workloads during low-carbon, low-cost periods while maintaining SLA compliance.
- π€ Multi-Agent Architecture: Compute, Grid, and Coordination agents working in harmony
- π± Carbon-Aware Scheduling: Minimize g COβ/inference with real-time grid signals
- π° Cost Optimization: 30-40% reduction in electricity bills
- β‘ Flexibility Monetization: Earn Β£150-250/MWh from P415 grid services
- π Beckn Protocol Integration: Publish compute flexibility as tradeable products
- π Real-Time Forecasting: LSTM-based carbon intensity & price predictions
- π Blockchain Audit Trail: Immutable logs for P444 settlement compliance
- Architecture
- Installation
- Quick Start
- Documentation
- Data Sources
- Roadmap
- Contributing
- License
- Team
- References
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β COMPUTE AGENT β
β Job Queue β Power Estimator β Flexibility Assessor β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GRID AGENT β
β Carbon API β LSTM Forecaster β Opportunity Detector β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OPTIMIZATION ENGINE β
β Minimize: cost + carbon_penalty β
β Subject to: deadlines, SLA, carbon caps β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β COORDINATION AGENT (Beckn Protocol) β
β Catalog Publisher β Order Handler β Settlement Verifier β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
Grid Operator (UKPN/ESO)
See full architecture diagram: docs/DESIGN_DOCUMENT.pdf
src/domain/models.py- shared dataclasses (JobSpec,CarbonPoint,FlexOffer, etc.)src/data_sources/- async clients for Carbon Intensity API + Elexon BMRS.src/compute_agent/,src/grid_agent/,src/coordination_agent/- the three A2A agents.src/optimization/engine.py- heuristic scheduler producingScheduledJob+FlexOffer.src/beckn/server.py- FastAPI Beckn BPP faΓ§ade exported viapython main.py beckn.data/synthetic/workloads.json- sample AI workloads ingested by the compute agent.
Each agent responds with JSON strings; the coordination agent emits both optimized schedules and Beckn-ready flexibility offers which the Beckn server publishes as catalog items.
- Every Beckn API (
/search,/init,/confirm, β¦) immediately ACK/NACKs with{"message":{"ack":{"status":"ACK"}}}while the actual business payload is delivered asynchronously via the matching callback (/on_search,/on_init,/on_confirm). contextobjects follow the Beckn Core 1.0.0 schema (domain,country,city,action,core_version,bap_id,bpp_id,transaction_id,message_id,timestamp,ttl). The transaction id stays constant across the entire flow; callback message IDs are regenerated./searchrequests expect Becknβs canonical intent shape (message.intent.fulfillment.start.location/time, optionalintent.tagsfor power/duration filters). The BPP turns the resulting flexibility offers into proper Beckn catalog items undermessage.catalog["bpp/providers"].- Example interaction:
- BAP
POST /search(intent describes time/location & tags likepower_kw,duration_hours). - CACO BPP returns
ACKimmediately and, once the optimizer finishes, callsPOST {bap_uri}/on_searchwith the catalog. - BAP
POST /initwith selectedorder; BPP ACKs and later invokes{bap_uri}/on_init. - BAP
POST /confirm; BPP ACKs and follows up with{bap_uri}/on_confirmthat includes the committed fulfillment.
- BAP
This keeps the prototype faithful to the Beckn asynchronous contract while still allowing the coordination agent to perform multi-minute optimizations before publishing the catalog.
- Python 3.9+
- Git
- (Optional) Docker for containerized deployment
git clone https://github.com/YOUR_USERNAME/deg-hackathon-carbon-aware-compute.git
cd deg-hackathon-carbon-aware-compute# Create uv-managed virtual environment
uv venv
.\.venv\Scripts\activate # macOS/Linux: source .venv/bin/activate
# Install project in editable mode
uv pip install -e .# Copy example config
cp config/config.example.yaml config/config.yaml
# Add API keys (optional for MVP)
# - Carbon Intensity API: https://carbonintensity.org.uk (no key needed)
# - Elexon BMRS: Register at https://bmreports.compython scripts/generate_synthetic_data.py --days 30 --output data/synthetic/uv run python main.py launch --horizon-hours 24# in separate shells
uv run python main.py coordination
uv run python main.py compute
uv run python main.py grid
uv run python main.py beckn --port 8000main.py is a Typer CLI, so uv run python main.py --help lists all available commands.
- Design Document (PDF) - Complete hackathon submission
- Architecture Guide - Detailed component breakdown
- API Reference - Agent interfaces and Beckn endpoints
- User Guide - How to use CACO in production
- Contributing Guide - Development workflow
| Source | Purpose | API/Link | Cost |
|---|---|---|---|
| UK Carbon Intensity API | Real-time & forecast grid carbon | https://carbonintensity.org.uk | Free |
| Elexon BMRS | Imbalance pricing, system frequency | https://api.bmreports.com | Free (registration) |
| Azure Workload Traces | Historical compute job patterns | https://github.com/Azure/AzurePublicDataset | Free |
| Google Cluster Traces | Job scheduling baselines | https://github.com/google/cluster-data | Free |
| Met Office DataPoint | Weather forecasts (cooling load) | https://www.metoffice.gov.uk/datapoint | Β£ (optional) |
- Synthetic data generation
- Rule-based scheduler
- Carbon Intensity API integration
- Basic dashboard
- LSTM forecasting model
- XGBoost job predictor
- CVXPY optimization solver
- Performance benchmarking
- Catalog publisher
- Order handler (P415 activation)
- Mock grid operator
- Settlement verification
- University HPC cluster deployment
- Real AI workload testing
- Cost/carbon measurement
- Blockchain audit trail
- Cloud provider partnership
- Multi-region orchestration
- Commercial SaaS platform
- P415 market integration
We welcome contributions! See CONTRIBUTING.md for guidelines.
# Install dev dependencies
pip install -r requirements-dev.txt
# Run tests
pytest tests/
# Run linter
flake8 src/
# Format code
black src/- Data Scientists: Improve forecasting models
- Energy Experts: Validate grid integration logic
- DevOps: Kubernetes deployment, CI/CD pipeline
- Frontend: Enhance dashboard visualizations
This project is licensed under the MIT License - see LICENSE file for details.
TL;DR: You can use, modify, and distribute this software freely, even commercially, as long as you include the original license.
FlexCompute Labs - DEG Hackathon 2025
| Name | Role | GitHub | |
|---|---|---|---|
| Xiaoyi Sun | AI/ML Engineer | https://www.linkedin.com/in/xiaoyi-sun-xs522 | https://github.com/weepsdanky |
| Charles Cai | Energy Analyst | [Link] | https://github.com/charles-cai |
| Mathew Obasuyi | Backend Dev | https://gravatar.com/cyrilobasuyi1 | https://github.com/Megabrain256 |
| Khin Saw | Data Scientist | https://www.linkedin.com/in/khin-s-3946a161/ | [link] |
Contact: brainiac@hybridy.site | Discord: divineseal040
- Microsoft Research: Carbon Explorer (2024)
- Meta AI: Chasing Carbon (2023)
- Google: 24/7 Carbon-Free Energy Methodology
- Beckn Protocol v1.1
- BSC P415 - VLP for DER Aggregation
- BSC P444 - Half-Hourly Settlement
Event: Digital Energy Grid Hackathon 2025
Problem: #2 - Compute-Energy Convergence
Platform: Dora Hacks
Deadline: 23 Nov 2025, 17:00 GMT
Submission Materials:
| Metric | Value | Basis |
|---|---|---|
| Cost Reduction | 30-40% | Shift to low-price periods |
| Carbon Reduction | 60-70% | Schedule during renewable surplus |
| Flexibility Revenue | Β£200k/year | P415 market rates (2 MW capacity) |
| Grid Benefit | 20-30 MW | Per 100 MW data center cluster |
| Emissions Avoided | 150k tons COβ/yr | If 10% of UK data centers adopt |
CACO directly contributes to:
- UN SDG 7: Affordable and Clean Energy
- UN SDG 9: Industry, Innovation, Infrastructure
- UN SDG 13: Climate Action
By enabling 24/7 carbon-free computing and transforming data centers into grid stability assets, we're building the infrastructure for a sustainable AI future.
If you find this project interesting, please give it a star β and share it with your network!
Built with β€οΈ for the Digital Energy Grid | Powered by Beckn Protocol | Carbon-Aware Computing FTW π±