Tokun·IA

Self-hosted agent layer

Your agents,
itemised.

Tokunia runs coding agents on your own machine and keeps the books. Every turn is a line: what it read, what it wrote, what it cost you, and what it cost the planet.

The demo runs entirely in your browser on generated data. No account, no backend, nothing to install.

TOKUNIA

ITEMISED AGENT RUN


SESSION
gbif-images
MODEL
claude-opus-4-8
TURNS
304

  • messages$13.46
  • bash$8.00
  • edit$1.92
  • read$1.33
  • skills$0.87
  • context$0.21

TOTAL$25.79

30.7M tokens


ALSO BILLED TO THE PLANET

  • carbon478 g eqCO2
  • energy1.66 kWh
  • water5.53 L

about 4 km in a petrol car


— KEEP THIS RECEIPT —

One real run from the archive. Carbon estimated with the open-source claude-carbon factors.

Accounted for on the author's own machine:

conversations
482
tokens
10.1B
assistant turns
67,825
spend, to the cent
$11,329

What it does

  1. Spawn a session

    Pick a model and an effort level, attach files, and send. The run streams into a live thread within seconds — interrupt it, resume it, or fork it from any turn.

  2. Watch it work

    Every transcript becomes a readable thread: tool cards with durations and diff stats, thinking blocks, task panels, and the token cost of each turn as it lands.

  3. Account for it

    Spend by tool, by project, by model, over time. Which skills earn their context. Which files are expensive to load. And the same run priced again in carbon, water and energy.

  4. Tune what it reads

    Edit every CLAUDE.md and the whole .claude/ tree — skills, hooks, agents, memories — with real token counts beside each file. Cheaper context, cheaper runs.

The screens

The Environment dashboard: 479 g eqCO2, 5.54 L of water and 1.67 kWh, with everyday equivalents, carbon over time, and a split by model and project.
The footprint of your agents, in grams and in glasses of water.
The conversation view: six running sessions with live costs, project tags and a composer for starting a new one.
Running sessions, priced as they go.
The context dashboard: total context cost, token count, skill usage bars and the most expensive files.
What your context costs to load, file by file.

Why self-hosted

It stays yours

Prompts, transcripts, code and costs live on your disk. Nothing leaves the machine except the model API calls you configure — and you can point those at a local model instead.

It shows the real price

Agents are cheap per token and expensive per hour. Tokunia prices every run twice — once in dollars, once in grams of CO2e — so the cost of a habit is visible before the invoice arrives.

It's one container

Backend, UI and the agent runner ship in a single image. No host agent to install, no cloud account, no per-seat pricing. Read the code, change it, rebuild it.

Run it

git clone https://git.gabvdl.xyz/gabrielvidal/ai-agent
cd ai-agent
AI_AGENT_WORKSPACE=/path/to/your/repo \
  docker compose -f docker-compose.standalone.yml up -d --build
# → http://localhost:8096

Set ANTHROPIC_API_KEY, or mount a logged-in Claude home, and the bundled runner spawns sessions with no host process at all. Catalogs you don't mount simply stay empty.

One honest caveat. That build still resolves this project's design-system package from a private registry, so today it only completes on the author's own network. Publishing that package — and with it a real one-line install — is the next thing on the roadmap. Until then, the demo is the way to try it.