Eco-Agent is an autonomous monitoring and optimization tool designed to make Green AI accessible. By tracking hardware metrics in real-time and providing actionable optimization intelligence, Eco-Agent helps developers reduce the carbon footprint of their machine learning models without sacrificing performance.
Modern AI training consumes massive amounts of energy. Most developers have no idea how much carbon their models emit. Eco-Agent fills this gap by acting as a "Sustainability Co-pilot," providing transparency and data-driven suggestions to optimize training loops.
- Core Logic: Python 3.9+
- Emissions Tracking: CodeCarbon
- System Metrics:
psutil - Data Analysis:
pandas&numpy - Dashboard:
Streamlit
Eco-Agent/
├── .venv/ # Virtual environment
├── eco_agent/ # Core logic package
│ ├── __init__.py
│ ├── monitor.py # Hardware sensing logic
│ ├── estimator.py # Carbon calculation logic
│ └── optimizer.py # AI suggestion engine
├── dashboard.py # Streamlit visual interface
├── main.py # Terminal-based entry point
├── requirements.txt # Project dependencies
└── README.md # Project documentation
- Real-Time Monitoring: Tracks CPU usage, RAM consumption, and energy (kWh).
- Carbon Estimation: Calculates CO2 emissions based on local grid intensity.
- Optimization Engine: An intelligent rule-based agent that suggests:
- Early Stopping for inefficient epochs.
- Mixed Precision Training to save compute.
- Hardware Optimization for high-load scenarios.
- Interactive Dashboard: A visual interface to simulate and monitor training sessions.
Ensure you have Python 3.9 or higher installed.
# Clone the repository
git clone [https://github.com/your-username/Eco-Agent.git](https://github.com/your-username/Eco-Agent.git)
cd Eco-Agent
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
## 🚀 Running the Project
### To launch the interactive dashboard:
```bash
streamlit run dashboard.pypython main.pyWe are actively looking for contributors to help with the following milestones:
- GPU Tracking: Integrate NVIDIA/AMD sensor monitoring to track high-performance training (High Priority).
- Grid API Integration: Connect to live "Carbon Intensity" APIs (e.g., ElectricityMaps) to adjust training based on local grid greenness.
- ML Optimizer: Transition from rule-based suggestions to a Reinforcement Learning model that learns from historical training data.
- Advanced UI/UX: Enhance the Streamlit dashboard with real-time plotting, dark mode, and downloadable PDF sustainability reports.
We welcome contributions from developers of all skill levels! To contribute:
- Fork the Project repository to your own account.
- Create a new Feature Branch:
git checkout -b feature/AmazingFeature
- Commit and Push Commit your changes with a descriptive message:
git commit -m 'Add some AmazingFeature'- Open a Pull Request Open a Pull Request on the main repository. In your description, clearly explain the problem you are solving or the specific feature you have added to the Eco-Agent ecosystem.
Distributed under the MIT License. This means you are free to use, modify, and distribute this software, provided that the original copyright notice and permission notice are included.
See the LICENSE file in the root directory for more detailed information.
Developed with ❤️ by the Eco-Agent Community.