---
title: "Tech Tip #9: An AI agent saved a quarter of the energy"
description: "An AI agent saved a quarter of the energy, on average."
url: https://greencode.ai/tech-tips/9-one-quarter-less-energy/
---

# Tech Tip #9: An AI agent saved a quarter of the energy

**An AI agent saved a quarter of the energy, on average.**

[Watch the video](https://media.greencode.ai/shorts/one-quarter-less-energy-5b5a349b48d7.mp4)

Video created by [explainapaper.com](https://explainapaper.com/?utm_source=greencode.ai&utm_medium=film&utm_campaign=made-by)

### The problem

Energy optimisation sounds like specialist work for a few hot loops. GreenCode's Constitution research applied one method across 45 algorithmic problems in six programming languages.

### The fix you can use today

- Give your team (or your AI agent) a ranked list of anti-patterns to look for.
- Measure a baseline with hardware counters, fix, and re-measure.
- Keep only the changes that save energy and pass every test.

GreenCode researchers found that an AI agent with energy rules saved 25.1% of the energy across 45 problems.

### Tools that help

- [GreenCode Constitution skill](https://greencode-constitution.org/?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode) (GreenCode researchers): open-source energy principles and a catalogue of 37 energy anti-patterns that an AI coding agent can follow to find and fix waste like this
- [GreenCode Constitution profiler (profile.sh)](https://greencode-constitution.org/skill.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode) (GreenCode researchers): a script from the Constitution tooling that measures the energy of a command from processor counters, GPU sensors and an optional smart plug, and writes the result as JSON
- [green-languages](https://github.com/PLEnergyDev/green-languages?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode) (GreenCode researchers): a command-line tool that measures the energy of whole programs or marked sections of code, across languages

### How GreenCode helps

GreenCode helps tackle this by publishing the method, the Constitution, for anyone to use. An AI agent profiles the code, fixes ranked energy anti-patterns, measures again and keeps only changes that save energy, leaving changes developers can review. [More on this](https://greencode.ai/publications/greencode-constitution-agent-principles-for-optimizing-code-and-llm-inference-en/).

### Tags

#llm#refactoring#measurement

### Sources

- [GreenCode Constitution (Kapenekakis et al., GreenAI workshop, ECML PKDD 2026): 25.1% energy saved across 45 algorithmic problems in six languages](https://greencode.ai/publications/greencode-constitution-agent-principles-for-optimizing-code-and-llm-inference-en/)

[All GreenCode Tech Tips](https://greencode.ai/tech-tips/)

#### Key Facts

- Tip **#9**
- For **CTOs and technical leads**
- Category **Code efficiency**
- Format **short video**
![GreenCode](https://greencode.ai/wp-content/uploads/2024/12/greencode-logo-website-small-colours-2.webp)

Want this checked on your own system? Talk to the GreenCode team.

[Get in touch](https://greencode.ai/contact/)
