Skip to main content

Agentron (Ag): a unit of agentic work volume — Ag = hours × Mtokens.

Project description

agentrons

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).

PyPI name is agentrons (the bare agentron is taken by an unrelated project). Import name is agentrons.

Install

pip install agentrons

Use

from agentrons import agentron, agentron_total, format_ag

agentron(1_500_000, hours=2)      # 3.0   — a 2 h run over 1.5M tokens
agentron(316_887, seconds=960)    # 0.0845
agentron(1_000_000, ms=3_600_000) # 1.0

format_ag(0.0845)                 # "0.08 Ag"

# several agents at once: sum the inputs, THEN multiply
agentron_total([(1_000_000, 1), (1_000_000, 1)])   # 4.0, not 2.0

compute_agentron(duration_ms, tokens) mirrors the reference JS computeAgentron in gravitymir/agent_web.

Why multiply for multi-agent?

Parallel agents share the same real-time window, so their combined volume multiplies rather than adds: two agents, each 1 h over 1M tokens, give (1+1) × (1+1) = 4 Ag, not 2 Ag.

License

MIT. Part of https://github.com/gravitymir/agentron.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentrons-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentrons-0.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file agentrons-0.1.0.tar.gz.

File metadata

  • Download URL: agentrons-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for agentrons-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d455158db469d5a290ae14555d84a244d2fda773c2ce20f3014fc60ff867d80
MD5 38df78eb4a70828a4d545369633995d1
BLAKE2b-256 f0fedfee611ae9fc12e74fb4c2e5e7a1b286d5591df09f4b4c68dbcd7feb4d31

See more details on using hashes here.

File details

Details for the file agentrons-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentrons-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for agentrons-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96a42359404a6fdb83478673ae08f1dce176d3064ed029d4798b0a5fbe90bfac
MD5 5551b1275ed382da9fd010aa8a609d7e
BLAKE2b-256 5d6eb0ec1422febe55905b9610d9366067ef4239d5aa193d48a3322ac440601a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page