
aieds
io.github.random-knights/aieds
AI energy, carbon and water estimates from compute metrics, and AiEDs disclosure record checks
Documentation
Random Knights | Standard
🏫 rand0m.ai 2025-2030 🛸 roswell, ga 🍑 ᴚk.xyz + ᴚk.llc + ᴚk.org 🏰
🌝 randomly.engineering & knightly.engineering 🌚
Read our docs site »
AiEDs
·
E+
·
Artifacts
·
Report Bug
·
Request Feature
STANDARD
Open standard from Random Knights. AiEDs is how we report modeled energy and carbon from AI work. E+ scores the health of Earth systems and shows where Ai's resource use meets them.
- Built with:
- Maximum Effort
- Rand0m AI Standard : E+ w/ AiEDs
- Randomly & Knightly . Engineering
- Node.js · TypeScript · JSON Schema 2020-12 · nvidia-smi · Ollama
AiEDs is published and free to read. It is CC BY 4.0, so you can adopt it without asking. E+ 1.2.0 was ratified on 2026-09-22, its wording-only patch 1.2.1 followed on 2026-10-15, and it is published the same way, CC BY 4.0. Both live in this repository.
| Standard | Version | License | Canonical text | Read it |
|---|---|---|---|---|
| AiEDs - AI Energy Disclosure Standard | methodology 2.5.1 | CC BY 4.0 prose and data, Apache 2.0 code and schema | spec/methodology.md with spec/, lib/, mcp/ | standard.rand0m.ai |
| E+ - Earth + Ai Impact Standard | 1.2.1, ratified | CC BY 4.0 prose, Apache 2.0 conformance checker | eplus/v1/methodology.md | standard.rand0m.ai/eplus/v1/methodology.md |
E+ Earth + Ai Impact Standard
A 0 to 100 planetary health index (the Earth Health Score) from nine environmental domains. The text specifies the weights and normalizers the reference implementation computes, the coverage-normalized region mean and the exposure-weighted headline, a provenance ladder under which a document must not claim live for a synthetic input, a non-averageable breach panel with cited thresholds, and what a conforming document and a conforming implementation must be able to prove. It invents nothing: every constant traces to a ratified ADR, the producer source, the four independent audits of 2026-09-10, or a recorded owner decision, and the undecided items are listed as open questions.
The long name was changed from "Earth Health Score Methodology" in 1.2.1, a wording-only patch: the 0 to 100 score keeps the name Earth Health Score and no rule moved. "Ai Impact" means modeled resource demand and the published context found near it, never cause. This version carries no impact data. Co-location is not causation.
AiEDs AI Energy Disclosure Standard
An open schema and toolset for self-attested energy and carbon footprint disclosures for AI models, agents, and apps.
AiEDs surfaces:
/spec- the JSON Schema (aieds.schema.json) + methodology (methodology.md) + conformance examples./lib- the reference library (TypeScript/Node): tokens + model in; energy-first disclosure out (energy modeled from per-model coefficients, carbon derived from energy), byte-mirroring the rand0m.ai app so app and standard agree to the number./mcp- a keyless MCP server (TypeScript/Node) exposing three tools:aieds_estimate,aieds_factors,aieds_disclose.
CURRENT VERSION: methodology 2.2.0 (MCP server 2.0.1). Versions 1.x are SUPERSEDED and MUST NOT be implemented. 1.x specified a flat 0.30 gCO2e per 1k tokens for every model and derived energy backward from carbon. Both are wrong. If you are new here, implement 2.2.0; do not pick up 1.0.0 because it sounds like the stable base. 2.1.0 is clarifying and 2.2.0 is additive, and neither changes an existing number, so 2.0.0 and 2.1.0 records remain valid. See
spec/methodology.md.
Metric hierarchy (methodology section 1.1): Level 1 modeled scientific estimates (energy, CO2e) -> Level 2 operational metrics (tokens, cost, latency) -> Level 3 human equivalencies (Tree-Time, phone charges, ...; educational only, never offsets).
AiEDs scope is device / usage / inference / training. It is NOT the planetary Earth Health Score produced by
rand0m.ai/earthHealthScoreRefresh. See spec/methodology.md section 1.
Install the Claude Code plugin
Get an AiEDs receipt after every Claude Code response, with no code to write:
/plugin marketplace add Random-Knights/Standard
/plugin install random-knights@standard
After the second command, each response ends with a short receipt: the modeled
energy, carbon, water and Tree-Time of that response, of the session so far and
of your own running total, at one significant figure, then a comparison and one
plain line of basis. The short receipt counts cached text as free, a PROPOSED
rule (methodology section 2.7) that is not yet ratified. /random-knights:aieds
prints the receipt on demand and /random-knights:aieds-explain prints the
formulas, the source of every coefficient, both counts and the sentences AiEDs
requires on every rendered disclosure.
- What is measured: token counts only (input, cache write, cache read, output) and the model name, read from the session transcript Claude Code already keeps. Prompt and response text are never read into a figure.
- Privacy: until you run
aieds connect, nothing leaves your computer (no network access, no telemetry). One file is written, your running total in your own config folder (numbers and hashed session keys, never sent), and no other unless you setAIEDS_RECEIPT_LOGto a path. Afterconnect, and only then, each response's allowlisted numbers (time, model, token counts, our estimates, the tool's name and a random id) go to your own account; never prompts, replies, file names or keys. See the plugin README, "Network and privacy". - Same numbers as the standard: the plugin carries the reference library
from
lib/, not a second implementation, and CI fails if the copy drifts. - Turn it off: set
AIEDS_RECEIPTStooffin theenvblock of your Claude Code settings, or runclaude plugin disable random-knights. - Uninstall:
claude plugin uninstall random-knights@standard.
Node.js 20 or newer is required. Full details: plugins/random-knights.
Other tools
The same plugin directory carries readers for other coding agents. A tool is marked verified only after a real session of that tool produced a receipt whose token counts matched the tool's own reported usage. Everything else says what was and was not seen.
| Tool | Status | Tested version | Receipt | Fixture | Install |
|---|---|---|---|---|---|
| Claude Code | Verified | 2.1.302 | automatic, under each reply | session-tool-turns.jsonl (shape only) | claude plugin marketplace add Random-Knights/Standardclaude plugin install random-knights@standard |
| Codex CLI | Verified | 0.162.1 | automatic, shown as a hook line in the interactive UI | codex-real-0.162.1.jsonl (real numbers) | codex plugin marketplace add Random-Knights/Standardcodex plugin add random-knights@standard |
| Ollama | Verified | 0.40.4 | printed by the command, for one chat call | ollama-stream.ndjson (real numbers) | npx @randomknights/aieds ollama --model <name> "<prompt>" |
| Grok Build | On demand | 1.0.50 | on demand, after the session | grok-real-1.0.50.jsonl (real numbers) | grok plugin marketplace add Random-Knights/Standardgrok plugin install random-knights@Standard --trustnpx @randomknights/aieds receipt --last grok |
| Copilot CLI | Numbers verified, live hook not yet run | 1.0.100 | automatic, printed by the agentStop hook | copilot-usage-real.jsonl (real numbers) | npx @randomknights/aieds install copilot |
-
Verified: The whole path was run on a real session of that tool, and the receipt's token counts matched the tool's own reported usage.
-
On demand: No automatic receipt after a reply. You ask for the receipt after the session, and the counts were checked on a real session.
-
Numbers verified, live hook not yet run: The token counts were checked against the tool's own totals on a real session file. The installed hook has not yet been run inside a live session of the tool.
-
Claude Code: Run on Claude Code 2.1.302 on Windows. The committed fixture carries the transcript's shape and counters with the text removed; a fixture of real numbers is still to be added.
-
Codex CLI: Then run /hooks once inside Codex and trust its hook, the Stop receipt (again after each plugin update).
codex execruns the hook but prints nothing; synced receipts are still sent. Also ran on 0.163.0. -
Ollama: A wrapper, not a plugin: it makes the chat call itself and reads the counts from the reply. Add --stream for a streamed reply.
-
Grok Build: Grok 1.0.50 printed no automatic receipt in an interactive session, so the receipt is asked for.
npx @randomknights/aieds receipt --last grokreads the newest session file; add --sync to send it. -
Copilot CLI: Real counts: the hook reads only the session.usage_record lines of the session's own events file. The counts equal the session.shutdown totals of a real 1.0.100 session. The installed hook has not yet been run inside a live Copilot session.
Not in v1: Gemini CLI and Antigravity (no documented usage field), Cursor,
Windsurf, OpenCode, Aider and a local proxy. Hugging Face works through the
chat-completion wrapper and has not been run against a Hugging Face endpoint.
Quick start (one minute)
Disclose your first response with the reference library:
cd lib && npm install && npm run build
node examples/request-to-disclosure.mjs # request in -> disclosure out
Or in your own code (ENERGY-FIRST: pass tokens + model; energy is modeled from the per-model coefficient and carbon is DERIVED from energy - you never pass carbon in):
import { disclosureFromResponse } from "@random-knights/aieds-reference";
const d = disclosureFromResponse({
provider: "GoogleAI",
model: "gemini-2.0-flash",
inputTokens: 412,
outputTokens: 890,
costUsd: 0.0031,
});
// Real output (run examples/request-to-disclosure.mjs to reproduce):
// d.energyWh 0.47664 modeled FIRST from gemini's coefficient
// d.carbonGrams 0.20448 derived: energyWh / 1000 * 429
// 429 gCO2e/kWh is the pinned
// response-surface grid intensity
// (methodology 2.4). It is a project
// modeled constant with no external
// citation, labeled as such in
// spec/v2/aieds-factors.json.
// d.treeTimeLabel "5.1 min"
// d.provenance "vendor-published" the per-model rung, never hidden
// d.confidence "low" a token proxy, unless you override it
// d.citation "Google (Aug 2025) ... arxiv.org/abs/2508.15734 ..."
Validating a record today
The schema is spec/aieds.schema.json, JSON Schema draft 2020-12, methodology
2.2.0. The schema file itself changed in neither 2.1.0 nor 2.2.0.
Its $id is https://standard.rand0m.ai/aieds/v2/aieds.schema.json, and the
host serves the schema at that URL, byte-identical to spec/aieds.schema.json
(a test in spec/ rebuilds the site tree and refuses a deploy where they
differ). A JSON Schema $id is an identifier, not a locator: a schema loaded
from a local file validates just as well, because nothing dereferences it.
Local file validation is the supported path.
So, to validate a record, load the file:
cd spec && npm install
node examples/validate.mjs # the bundled fixtures
import Ajv2020 from "ajv/dist/2020.js";
import addFormats from "ajv-formats";
import { readFileSync } from "node:fs";
const ajv = new Ajv2020({ strict: false });
addFormats(ajv);
const validate = ajv.compile(
JSON.parse(readFileSync("spec/aieds.schema.json", "utf-8")),
);
if (!validate(myRecord)) console.error(validate.errors);
A record stamping a 1.x methodologyVersion is REJECTED. Methodology 1.x is
superseded and must not be used for new disclosures, so a v2 schema that accepted
a v1 record would be certifying nonconformance. The deprecated-v1-*.json
fixtures exist to prove that rejection, not to be copied.
provenance is optional. It carries the section 5.1 ladder and says where the
FACTOR came from. confidence carries the section 5 ladder, which says how the
ENERGY figure was arrived at, and defaults to low for any token-proxy method.
They are different ladders and neither implies the other, which is why they are
separate fields rather than one widened one.
Methodology 2.2.0 states the provenance ladder as measured,
vendor-published, class-estimated, synthetic, unknown, strongest first.
The schema enum still carries only the first three and the last: synthetic is
normative prose from 2.1.0 onward and a proposed addition to a FUTURE schema
revision, which methodology 2.2.0 did not make, so a machine-validated record
cannot stamp it yet. A producer with a generated input
stamps the nearest rung the schema carries and says in prose that the input was
generated.
The rest of the toolset:
# Validate the bundled examples against the schema:
cd spec && npm install && node examples/validate.mjs
# Build and test the MCP server:
cd mcp && npm install && npm run build && npm test
# Wire the MCP server into your agent (stdio):
node mcp/dist/index.js
What AiEDs is
Energy and carbon transparency for AI is fragmented: model cards use ad-hoc fields, EU AI Act compliance requires documented energy figures, and agent frameworks have no standard way to surface per-session footprint.
AiEDs provides:
- A schema (
aieds.schema.json, JSON Schema draft 2020-12) that is field-compatible with Hugging Faceco2_eq_emissionsand the EU AI Act model-documentation form - so a single disclosure is legible to both. - A methodology (
methodology.md) with versioned factor tables (hardware TDP, grid intensity, token proxies) and a governance rule: no silent drift (owner-ratified changes, CHANGELOG). - An MCP server that any agent can wire in to get
aieds_estimate/aieds_factors/aieds_discloseover stdio - keyless, deterministic, zero network calls.
Why 2.0.0 (energy-first) beats 1.x
1.x used a single flat constant - 0.30 gCO2e per 1k tokens for every model - and derived energy backward from carbon. That is what 2.0.0 abolishes. The response-surface path (methodology 2.4, implemented in /lib) replaces it with:
- Per-model energy coefficients, not one constant. Each model class has its own
whPer1kIn/whPer1kOut(output tokens cost ~4x input: decode is sequential, prefill is parallel). Gemini0.12 / 0.48, GPT/o*0.17 / 0.68, Claude0.145 / 0.58Wh per 1k tokens, plus a per-provider PUE. - Confidence tiers on every coefficient, surfaced in the disclosure, never hidden:
| tier | meaning |
|---|---|
measured | we benchmarked it |
vendor-published | the provider published a figure (cited; split assumptions noted) |
class-estimated | inferred from model class; no provider figure exists |
unknown | nothing sourceable; frontier-class fallback, labeled unknown |
<\div>
- A sourced citation per coefficient (the honesty contract: a number without provenance does not belong in the table). Gemini cites Google Aug 2025 (arXiv:2508.15734); GPT cites the OpenAI Jun 2025 blog figure; Claude states plainly it is a class estimate (no Anthropic figure as of 2026-01); an unlisted model returns the frontier-class fallback labeled
unknownrather than a confident guess.
Concretely: the same 412-in / 890-out exchange that 1.x would have blurred into one flat number now discloses 0.47664 Wh energy-first with a vendor-published tier and a citation for Gemini, versus 0.691128 Wh labeled unknown for a model not in the table - the reader can see both the number and how much to trust it.
Ai Energy Disclosure Standard ( AiEDs v2.2.0 )
🌎 Total AiEDs Usage | standard 🏰
|
⚡ |
🌫️ |
🌳 |
🔢 |
Tree-Time is the time one mature tree (two or more years of growth) needs to capture this carbon at its yearly rate, 21 kg CO₂e per year; shown in days.
The figures above are the AiEDs impact of developing this repository,
measured by a SessionEnd hook on the developers' machines and reported under AiEDs section 2.4.1,
which counts plain input, cache-creation and cache-read tokens all as input at the input coefficient.
97.5 percent of our input is cache reads, so that rule decides the answer by 7.6x.
Weighting a cache read at 0.1 instead gives 1.7 kWh, 0.7 kg CO₂e, 12 days of Tree-Time.
That lower figure is a local departure from the standard, not a reading of it. It is
published because it is what this project offsets against.
Equivalencies
The same educational comparisons the rand0m.ai app renders, from the same constants. Educational comparisons, not measurements.
| Equivalent | Amount | Basis |
|---|---|---|
| Phone charges | 1,051 | 12 Wh per charge |
| LED bulb hours | 1,261 | 10 W bulb |
| Laptop hours | 252 | 50 W laptop |
| Driving distance | 32 km | 170 g CO₂e per km |
| Tree-Time | 94 days | 21 kg CO₂e per mature tree per year |
Offset
What the figures above cost, and what it would take to absorb them. Modeled, like everything else here.
Energy cost: USD 2.31. 12.6 kWh at USD 0.1834 per kWh, the United States average residential price for June 2026 (18.34 cents per kilowatthour), from U.S. Energy Information Administration, Electric Power Monthly, Table 5.3. The rate is pinned, not looked up at render time, so this figure is reproducible.
Modeled provider spend: USD 30.05. The same sessions priced at published API list prices, rates version 2026-09-01, with cache writes at 1.25x and cache reads at 0.1x an input token. It is a MODEL, not a bill: this work runs on a subscription, so the marginal cost was nothing. It covers the 8 of 13 sessions counted above whose model that file prices; the other 5 carry a model nobody has priced and add nothing, rather than an assumed rate.
Trees needed: 1. 5.4 kg CO₂e divided by 21 kg CO₂e, the yearly capture of one mature tree, rounded up: 1 mature tree would absorb this carbon within one year. Put the other way round, that is the Tree-Time above: one mature tree working for 94 days.
Offset cost: USD 0.03. 0.0 tonnes of CO₂e at USD 6.03 per tonne, the REDD+ (Reduced Emissions from Deforestation and Degradation in Developing Countries) average, 2024, Ecosystem Marketplace, State of the Voluntary Carbon Market 2025, Table 4. That is a nature-based avoidance and protection, not removals average: this project prices itself against keeping land, animals and trees standing, never against carbon removals or industrial and household offsets. Buying an offset is not the same as not spending the energy, and this line does not claim otherwise.
class-estimated, the second-weakest provenance tier
· grid 429 gCO₂e/kWh pinned
· measured by a `SessionEnd` hook, not modeled from a guessEnergy and carbon are modeled estimates. Tree-Time and equivalents are educational comparisons.
Measured by a SessionEnd hook on one developer machine; a second machine's ledger is not yet merged in, over 293 recorded sessions covering 2026-07-27 to 2026-09-13, which is every session the hook recorded and no session it did not. Two attribution bases are published: BY LANE LEDGER in the table above, and BY WORKING DIRECTORY, the stricter view, in aieds-readme.json. The organization totals are the same under both. Both bases are DATE AWARE: the application repository was named xyz until 2026-08-19 and is named ruok now, so a row written before that day is placed on the repository the name meant then. Any offset figure is a nature-based average, not removals. Generated, never hand-typed.
ARCHITECTURE (ADR 0010)
AiEDs is specified in an owner-ratified architecture decision record. The key design choices:
- Self-attestation - producers derive and sign their own disclosures; consumers verify schema conformance. No registry or central authority.
- Methodology versioning -
methodologyVersionin every disclosure ties the number to a specific factor table snapshot. An auditor can replay the math. - Agent-native - the MCP tool interface means an agent can disclose its own session footprint inline, not as a post-hoc batch job.
- Keyless - the schema and MCP server require no API keys, no auth, no secrets.
SURFACES
| Surface | Path | License | Description |
|---|---|---|---|
| Schema | spec/aieds.schema.json | Apache 2.0 | JSON Schema 2020-12 for one disclosure |
| Methodology | spec/methodology.md | CC BY 4.0 | 2.2.0: energy-first path + per-model coefficients + factor tables + the provenance ladder + two-term measured device coefficients |
| Coefficient tables | spec/v2/aieds-factors.json | CC BY 4.0 | The published factor data every surface reads |
| Measurements | spec/measurements/ | CC BY 4.0 | Measurement harnesses (their code is Apache 2.0), method documents and raw power samples. EVIDENCE, not coefficients: nothing here is in a factor table unless a factor table cites it. |
| Examples | spec/examples/ | CC BY 4.0 | 4 valid disclosures, 3 superseded-1.x records the schema must reject, and a conformance script |
| Reference library | lib/ | Apache 2.0 | Energy-first disclosures: per-model coefficients + provenance + citations (mirrors the rand0m.ai app; contract-tested) |
| MCP server | mcp/ | Apache 2.0 | TypeScript Node MCP: estimate / factors / disclose |
| Claude Code plugin | plugins/random-knights/ | Apache 2.0 | An AiEDs receipt after every Claude Code or Codex response, computed locally from token usage with the reference library; Grok Build session files, Ollama and Hugging Face responses are read too (see the plugin README for what is verified). Marketplace: .claude-plugin/marketplace.json |
| E+ | eplus/v1/methodology.md | CC BY 4.0 | E+ - Earth + Ai Impact Standard, 1.2.1, ratified 2026-09-22. The canonical text, including the public implementation changelog. |
ROADMAP
Shipped (this repo)
-
aieds.schema.json(JSON Schema draft 2020-12) -
methodology.md2.2.0 (energy-first; per-model coefficients + the provenance ladder + two-term measured device coefficients + citations) with factor tables + governance - 7 conformance examples (4 valid, 3 superseded-1.x rejection cases) + validate script
- MCP server 2.0.0:
aieds_estimate,aieds_factors,aieds_disclose - Reference library 2.1.0: energy-first, byte-mirrors the app, emits provenance + confidence
- Claude Code plugin
random-knights(marketplacestandard): an AiEDs receipt after every response, from the reference library - CI: schema validation + build + unit tests
Deferred
- Read API / SDK for ingesting disclosures from external producers
-
.well-known/aieds.jsonauto-discovery endpoint - npm publish
@random-knights/aieds-mcp - Scope 3 embodied carbon (hardware manufacture)
- Real-time grid intensity (carbon-aware scheduling)
OPERATING
- CONTRIBUTING.md - contributors and agents: what belongs where, versioning and governance, the keyless rule, and how to deploy the site.
CITATION
Cite the version you implemented or adopted. AiEDs versions are not interchangeable: 1.x derived energy backward from carbon and 2.0.0 models energy first, so a citation without a version does not say which numbers were used.
Random Knights, LLC (2026). AiEDs - AI Energy Disclosure Standard, version 2.2.0. CC BY 4.0. https://standard.rand0m.ai
E+ 1.2.1 is ratified (1.2.0, 2026-09-22; 1.2.1 renames the standard and moves no rule). Cite the version you implemented:
Random Knights, LLC (2026). E+ - Earth + Ai Impact Standard, version 1.2.1. CC BY 4.0. https://github.com/random-knights/standard
Author: Random Knights, LLC, ORCID https://orcid.org/0009-0006-5066-1693
Machine-readable metadata: CITATION.cff describes AiEDs and is the file GitHub reads to offer APA and BibTeX exports from the sidebar; CITATION.eplus.cff describes the E+ draft.
LICENSE
Two licenses, split by what a path IS, not by which directory it sits in. Code and the schema (so implementers can vendor them without attribution friction) are Apache 2.0. Text and data that document or parameterize the standard (so attribution survives forks and citation stays intact) are CC BY 4.0.
| Path | License |
|---|---|
lib/ | Apache 2.0 |
mcp/ (code) | Apache 2.0 |
spec/aieds.schema.json | Apache 2.0 |
spec/examples/validate.mjs | Apache 2.0 |
spec/test/ | Apache 2.0 |
spec/measurements/*/harness/ | Apache 2.0 |
eplus/v1/conformance/ (code) | Apache 2.0 |
scripts/, .github/ | Apache 2.0 |
packages/ (manifests and code) | Apache 2.0 |
spec/methodology.md | CC BY 4.0 |
spec/v2/aieds-factors.json | CC BY 4.0 |
spec/v2/standard-versions.json | CC BY 4.0 |
spec/examples/*.json | CC BY 4.0 |
spec/measurements/ (not harness/) | CC BY 4.0 |
eplus/v1/methodology.md | CC BY 4.0 |
READMEs, CONTRIBUTING.md, docs/ | CC BY 4.0 |
<\div>
A file not in the table follows the same split: code is Apache 2.0, prose and
data are CC BY 4.0. The two npm packages built from this repository,
@randomknights/aieds and @randomknights/earthplus, each carry both licenses and
declare Apache-2.0 AND CC-BY-4.0; NOTICE says which part of each
is which. Nothing in this repository is third-party material under another
license.
See LICENSE, LICENSE-DOCS and NOTICE for full terms.
TECHNOLOGY
CLI
IDE
Source Control
Database
Tools
Development
Testing
AI
Design
Pipelines
Research & Funding
@randomknights/aieds-mcpnpm install @randomknights/aieds-mcp