Skip to main content

Crate agentron

Crate agentron 

Source
Expand description

Agentron (Ag) — a unit of agentic work volume.

Ag = hours × Mtokens          (Mtokens = tokens / 1_000_000)

It fuses the two things that actually cost during an agent run — wall-clock time and tokens — into one comparable number (think kWh, not km/h).

use agentron::{agentron, Time, format_ag};

assert_eq!(agentron(1_500_000.0, Time::Hours(2.0)), 3.0); // 2 h over 1.5M tok
assert_eq!(format_ag(0.0845), "0.08 Ag");

See https://github.com/gravitymir/agentron.

Enums§

Time
Wall-clock time for a run, expressed in one of several units.

Constants§

SYMBOL
Symbol printed in place of the unit name.

Functions§

agentron
Agentrons for a single run: hours × tokens / 1e6.
agentron_total
Multi-agent aggregate: (Σ hours) × (Σ Mtokens).
compute_agentron
Drop-in twin of agent_web’s computeAgentron(durationMs, tokens).
format_ag
Human string, e.g. "3.0 Ag"; values below 1 keep two decimals ("0.08 Ag").