Skip to main content
Energy observability · a fork of Zed

AI coding on a fraction of the energy.

It starts with energy observability — Agent Joule meters every edit in real joules. Then its deterministic-first cascade resolves most changes locally, for picojoules, and the energy of writing code falls exponentially.

this session 0.000 J
L0 lookup · 0.000 J the cascade, resolving
The thesis

A session, metered

Most edits never reach a model.

One real change — refactor an auth module — closing tier by tier, each op priced in joules as it lands.

agent-joule · refactor auth module
0.381 J total
rename isAuthed → hasSession L1 · template 0.000 J
propagate rename to 14 call sites L0 · cache 0.000 J
add null-guard in token parser L1 · template 0.001 J
extract sessionGuard() helper L0 · cache 0.000 J
organize imports · format file L1 · template 0.000 J
write session-expiry test (novel) L3 · local model 0.380 J
Five of six closed without a model. the model ran once · 0.381 J for the whole change

The thesis

AI coding can usher in energy-optimized compute.

Today, each AI edit is a datacenter round-trip — energy per change is rising. It doesn't have to. Three moves turn the curve around, and they build on each other.

01

Energy observability

You can't optimize what you can't see. Agent Joule meters every edit in real joules, read from the host's own power counter — the status line shows exactly what a change cost.

02

Energy-optimized compute

Seeing the cost lets you drive it down. A deterministic-first cascade resolves most edits with lookup, search, and templates — for picojoules. A model is the last resort, not the default.

03

Exponential decrease

The cascade learns. Closed work is cached and retrieved, so a growing share of edits resolve at the cheapest tier — and the energy of writing code falls, edit over edit.

01 · Energy observability

You can't optimize what you can't measure.

Agent Joule reads energy from the host's own counter wherever the hardware exposes one — the same probe, the same way, across the ecosystems developers use. Every change carries its real cost in joules. That measurement is the foundation; nothing else is possible without it.

Energy per close, by tier
LUT Search Tmpl Local Model energy / close →
Deterministic tiers cost almost nothing, so most sessions barely move the meter.
Hardware Counter Provenance Reading
Apple Silicon IOReport Energy Model ModelBased 25.5 W / 74 J
Windows + RTX 2060 NVML HwShunt 9.4 W / 18.8 J
Linux x86 + Tesla T4 NVML HwShunt 71.8 W / 148 J
Linux x86 Xeon RAPL powercap HwShunt 77.1 W / 154 J

Verified on real silicon. Each reading declares its provenance — HwShunt for a hardware counter, ModelBased for a vendor energy model — so the number is honest about how it was known.

02 · Energy-optimized compute

The cheapest method that can close the change, wins.

Once you can see the cost, you can drive it down. JouleClaw runs every request down a cascade and stops at the first tier that resolves it. Lookup, search, and templates — deterministic, near-free — take precedence. A model is the last thing tried, not the first.

Lookup
LUT / cache det

The change was resolved before. A content-addressed lookup returns it instantly, for picojoules — exact, reproducible, free.

Search
retrieval det

Answerable from a search over your tree and prior changes — the nearest known solution, surfaced without generating anything new.

Template
deterministic rule det

A formatter, a codemod, a rename, a scaffold — a transformation with one correct answer, applied by rule. No model involved.

Local model
on-device gen

When generation is genuinely needed, a local model runs first — on your hardware, metered in joules, nothing leaving the machine.

Any model
last resort · your key gen

When nothing else can close, a model is invoked — free-tier, paid, or openweight, your own key. The rigid harness elevates whichever you bring. On most changes, it's never reached.

03 · The exponential

The more you code, the cheaper each edit gets.

The cascade has a memory. Every closed change is content-addressed, cached, and made retrievable — so a repeat resolves at L0 for zero joules and zero dollars, 140× faster. As that hit-rate climbs, the average energy per edit decays toward the deterministic floor.

energy / edit → edits over time, as the cache fills → deterministic floor — picojoules first edit · model · full cost cache warming · cost halving mostly L0/L1 · near-free
Illustrative of the mechanism — measured today: a repeat edit closes at L0 for $0.0000, 140× faster than the cloud round-trip it replaces.

Proof · joule-bench

Same resolution. ~10× lower cost and energy.

On a realistic operation mix, the cascade reaches the same resolution as a frontier cloud agent — because it escalates novel work to the same model at L4 — while most edits close locally and never make the trip. Measured by an executable test oracle paired with host-counter energy and vendor billing.

Resolution × cost per resolved task
resolution → $ per resolved task (less is better →) 100% 0 Claude · cloud$0.2043 · 100% Agent Joule$0.0207 · 100% ≈ 10× cheaper · same result
10/10 resolved, both. Measured on Apple Silicon (IOReport, ModelBased); dollars from vendor billing.
~10×
lower dollar cost at identical resolution
$0.00
a repeat edit, closed at L0 from cache
140×
faster than the cloud round-trip it replaces

Accounted for

Every edit is an object you can name, sign, and price.

Observability isn't only energy — it's provenance. Each change is a content-addressed, signed coding operation with a receipt: what changed, on what base, at which tier, for how many joules. No phone home; the trail stays on your machine.

JCR-1 RECEIPT det-CBOR · COSE_Sign1
op
b3:Ynpl53wU4pwfokr8h2c…
prior
b3:8fK2q9Lm4nRtZ0xV…
tier
L1 · Template
energy
0.004 J · HwShunt
sig
ed25519 ✓ verified

Content-addressed

Every change is named by its BLAKE3 hash over a canonical encoding. The same change always has the same id — a stable fingerprint for every edit.

Signed & attributed

Each operation is an Ed25519-signed transition bound to the prior state of the tree. Who changed what, on what base, by what tier — provable, not assumed.

Receipted in joules

Each change carries a receipt: the tier that produced it and the joules it cost, with honest provenance — lookup or frontier model, you can see which did the work.

Reproducible

The deterministic tiers give the same output for the same input, every time. Most of your history is replayable, not a random walk.

Private & federated

Nothing phones home. Optionally, a fleet agrees.

The loop runs on your machine — no sign-in, no telemetry, no auto-update, with a build-level egress backstop. When you want scale, nodes federate over QUIC and reach byte-identical agreement by BFT consensus: a result reproducible across a fleet, none of them trusting a server.

any server no egress your machines · BFT consensus over QUIC
Verified by packet capture: startup is network-silent. Federation is opt-in, peer-to-peer, server-free.

Get it

Install Agent Joule. Watch the meter.

A fork of Zed, in the open — Apache-2.0 lineage, pinned to the Transaction Science pillars by git revision. Install it, point it at any model key, and let JouleClaw reach for the deterministic answer first.

macOS · Homebrew
brew install --cask transaction-science/tap/agent-joule

Picks your chip automatically. Direct .dmgApple Silicon → aarch64, Intel → x86_64 — from Releases.

Linux · apt
sudo apt install agent-joule

x86_64 & arm64, after adding the apt repo. Or .deb / .tar.gz.

Windows · Scoop
scoop install agent-joule

x86_64 & arm64, after scoop bucket add transaction-science …. Or the .exe / .zip from Releases.

First launch on macOS

The build is open-source and unsigned (no Apple Developer toll), so Gatekeeper warns once on first open. Homebrew installs clean — for a direct .dmg, run this one line, then open normally:

xattr -dr com.apple.quarantine "/Applications/Agent Joule.app"

Or: right-click the app → Open → Open. On recent macOS: System Settings → Privacy & Security → Open Anyway.

# or build from source
git clone https://github.com/Transaction-Science/agent-joule
cargo build --release --bin agent-joule
# point it at any model — free-tier, paid, or openweight — with your own key