Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentron

Agentron

A brand mark and a unit of agentic work volume — a stopwatch-robot.

spent unit license

npm crates.io PyPI Go Reference

English · Русский


This repo holds all sources of the Agentron mark: SVG (masked and mask-free), flat paths, PNG icons and OpenMoji variants — plus the definition of the Ag unit and the "spent in agentrons" badge.

What it is

The mark is a stylized stopwatch-robot: a round body, clock hands (time), two side "ear" buttons and a "sensor antenna" at the top-right (the agent's link to the world). The brand color is orange. The negative space (clock face, hands, button hole) is transparent, so the mark reads on both light and dark backgrounds.

The same sign is the logo of the gravitymir/agent_web app and the symbol of the Ag unit (printed inline in place of the letters "Ag").

Files

File What it is
svg/agentron.svg Primary logo. 1000×947, mask-free, single flat path, #e07005.
svg/agentron-masked.svg Same look, negative space via <mask> (source for "baking").
svg/agentron-original.svg First export (doubled stroke+fill contours, no mask).
svg/agentron-72.svg Compact 72×72, tight margins — for icons/favicon.
svg/agentron-line.svg Outline (line) version, 24×24.
openmoji/agentron-color.svg OpenMoji format: grid/color/line layers, palette, no mask (passes their checks).
openmoji/agentron-native.svg OpenMoji style "A": orange + thin black outline.
openmoji/agentron-pure.svg Style "B": pure orange, no black.
png/agentron-{512,180,48,32}.png Transparent raster icons.
path/agentron-{1000,72}.path.txt Flat path d data in 1000×947 and 72×72 coordinate spaces.
badge/agentron.json Value for the "spent, Ag" badge (shields endpoint).
badge/agentron.mjs Badge updater script (applies the formula).
packages/python/ agentrons library (PyPI) — computes Ag.
packages/js/ agentron library (npm) — computes Ag.
packages/rust/ agentron crate (crates.io) — computes Ag.
packages/go/ agentron module (Go) — computes Ag.

Colors

Role HEX RGB
Main orange (fill) #e07005 224, 112, 5
Edge orange (in source) #d7761e 215, 118, 30
Nearest in the OpenMoji palette #e27022 226, 112, 34

The Agentron (Ag) unit formula

Ag is a unit of the volume of agentic work per run (like kWh, not km/h). It combines the two resources that actually "cost" — time and tokens — into one number:

Ag = hours × Mtokens
  • hours — run duration in hours (duration_ms / 3 600 000)
  • Mtokens — tokens in millions (tokens / 1 000 000), counting input + output + cache

A 2 h run over 1.5M tokens = 2 × 1.5 = 3.0 Ag. Values < 0.1 Ag are shown as a flat 0.

Several agents at once — sum the inputs first, then multiply:

Ag = ( Σ hoursᵢ ) × ( Σ Mtokensᵢ )

This is deliberately not Σ(hoursᵢ × Mtokensᵢ): parallel agents share one real-time window, so the volume multiplies. Two agents of 1 h × 1M tok each give (1+1) × (1+1) = 4 Ag, not 2 Ag.

Reference — computeAgentron() in agent_web/static/js/render.js, full description in docs/AGENTRON.md.

Libraries

Tiny packages to compute Ag in your own code — tokens and time in, a ready value out.

Python (packages/python/, PyPI name is agentrons, since agentron is taken by another project):

pip install agentrons
from agentrons import agentron, agentron_total, format_ag
agentron(1_500_000, hours=2)        # 3.0
agentron(316_887, seconds=960)      # 0.0845
format_ag(0.0845)                   # "0.08 Ag"
agentron_total([(1e6, 1), (1e6, 1)])# 4.0  (several agents)

JavaScript (packages/js/, npm name is agentron):

npm install agentron
import { agentron, formatAg } from "agentron";
agentron(1_500_000, { hours: 2 });   // 3
formatAg(0.0845);                    // "0.08 Ag"

Rust (packages/rust/, crates.io name is agentron):

[dependencies]
agentron = "0.1"
use agentron::{agentron, Time, format_ag};
agentron(1_500_000.0, Time::Hours(2.0));  // 3.0
format_ag(0.0845);                         // "0.08 Ag"

Go (packages/go/):

go get github.com/gravitymir/agentron/packages/go@latest
import agentron "github.com/gravitymir/agentron/packages/go"
agentron.Agentron(1_500_000, 2*time.Hour)  // 3.0
agentron.FormatAg(0.0845)                   // "0.08 Ag"

Names: npm / crates.io / Go — agentron; PyPI — agentrons (bare agentron is taken there by another project). All mirror the reference computeAgentron(durationMs, tokens) from agent_web. All four are published (v0.1.0): npm · crates.io · PyPI · Go.

The "spent in agentrons" badge

The badge at the top reads its value from badge/agentron.json via a shields.io endpoint. To update:

node badge/agentron.mjs <tokens> <minutes>
# example: 316,887 tokens over 16 min
node badge/agentron.mjs 316887 16     # -> badge/agentron.json: "0.08 Ag"

Then commit badge/agentron.json — the badge updates itself (can be wired to CI / the app).

How the SVG mark is built

Two formal steps: baking the mask and fitting into 72×72.

1. Mask → flat path. The source draws the negative space via <mask>. The visible shape = a boolean difference (picosvg + skia-pathops):

visible = union(orange_paths) − union(mask_cuts)

The result is a single path with fill-rule="nonzero", no <mask>.

2. Fit into 72×72 (canvas center = 36, target content T = 62):

bbox(1000): x∈[195.94, 832.53]  y∈[102.46, 756.00]   w=636.59  h=653.54
cx=514.24   cy=429.23

s  = T / max(w,h) = 62 / 653.54 = 0.094868
tx = 36 − s·cx = −12.785
ty = 36 − s·cy = −4.720
→ bbox(72): x∈[5.8, 66.2]  y∈[5.0, 67.0]

The affine [s,0,0,s,tx,ty] is baked straight into the path coordinates.

Usage

<img src="https://raw.githubusercontent.com/gravitymir/agentron/master/svg/agentron.svg"
     width="48" height="48" alt="Agentron">

OpenMoji status

The OpenMoji assets are ready (openmoji/), but not submitted yet: their process is "open an issue first → get a green light → then PR", and brand logos are accepted reluctantly. Later.

License

MIT.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages