Carbon-aware compute, measured and auditable.
x1zz gate lets a compute job run only when the electricity grid is clean enough, and records the energy and carbon each run used in a ledger that cannot be edited quietly. It is Act 1 of the Energy-Autonomous AI program, and it builds on the power-wall analysis of the sibling project llm-pcag-research.
The interesting limit on computation is not the code. It is power and heat. The PCAG research measured how quantization trades accuracy for energy and where that trade-off collapses. The next question is operational: when should computation run to emit the least carbon? x1zz gate answers it with real grid data, real accounting, and a reproducible ledger.
The story behind it is in STORY.md.
| Command | What it does | Works offline |
|---|---|---|
x1zz-gate now |
Print the current grid carbon intensity (gCO2eq/kWh) | yes (--source mock) |
x1zz-gate watch |
Record intensity over time to a CSV | yes |
x1zz-gate simulate |
Compare "run now" against "run in the lowest-carbon window" | yes |
Data source: the UK National Grid Carbon Intensity API, which is open and needs no key. The mock source is a pure function of the time bucket and a seed, so its output reproduces exactly.
cargo build
# live UK grid
./target/debug/x1zz-gate now --source uk
# offline and deterministic
./target/debug/x1zz-gate simulate --source mock --hours 24 --energy-wh 400 --power-w 100Example output for a 400 Wh job over a 24 hour horizon on live UK data:
baseline (run now) : 65.4 gCO2
carbon-gated : 20.4 gCO2 (10:00 -> 13:30)
reduction : 68.9%
ledger verified : 2 entries, 72.8 gCO2 total (hash chain intact)
crates/
carbon/ grid carbon-intensity sources (trait + UK API + deterministic mock)
ledger/ append-only energy and carbon ledger with a SHA-256 hash chain
x1zz-gate-cli/ the x1zz-gate binary (now / watch / simulate)
Each ledger entry commits to the previous hash, so tampering with history is detectable. Each data row carries a source label, uk-carbon-intensity, mock, and later measured or estimated, the same convention used in llm-pcag-research.
The full map is in docs/README.md. Start with:
- STORY.md: why this exists
- ROADMAP.md: Act 1 / 2 / 3
- docs/act1_design.md: the Act 1 design
- AGENTS.md: operating rules for contributors and agents
- STYLE_GUIDE.md: how we write
English is the canonical language and every public document has a Korean mirror.
cargo test --all
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check
bash scripts/check_docs_sync.shParts of this project are built with AI assistance, under the writing rules in STYLE_GUIDE.md. Every claim, number, and line of code is reviewed and owned by the author.
Apache-2.0. See LICENSE and NOTICE.
See CITATION.cff.
Jangseowoo, ax1s-x1zz, ax1s@x1zz.com.