cd /news/ai-agents/a-5-column-csv-that-stops-your-ai-ag… · home › topics › ai-agents › article
[ARTICLE · art-150998] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=· neutral

A 5-column CSV that stops your AI agents from silently burning money

A developer published a five-column CSV schema for tracking autonomous agent runs, logging run_id, agent_role, tokens_in/tokens_out, cost_usd and outcome to attribute spend per run and per task. The writeup argues that untracked runs, not model pricing, drive agent cost problems, and that runs ending in no_action often account for 20-40% of spend in loops that re-read state without acting. The schema is packaged as a Notion database template and CSV starter sold on Gumroad for a minimum of $1.

by read1 min views1 publishedOct 15, 2026

Most agent cost problems are not model-pricing problems. They are untracked-run problems: nobody can say which run spent what, for which task, and whether the output was used.

Here is the minimal tracking schema I use for every autonomous agent run. You can start with just a CSV.

column why it matters
run_id lets you join logs, costs and outcomes
agent_role which agent spent the money
tokens_in / tokens_out the raw driver of cost
cost_usd computed at write time, not at month end
outcome shipped ,no_action ,failed ,retried

cost_usd divided by the count of outcome = shipped. If it is rising, your agents are getting less efficient. outcome = no_action. This is pure waste, and it is often 20-40% of spend in loops that re-read state without acting.

import csv, time, pathlib

PATH = pathlib.Path('agent_runs.csv')

def log_run(run_id, role, tin, tout, cost, outcome):
    new = not PATH.exists()
    with PATH.open('a', newline='') as f:
        w = csv.writer(f)
        if new:
            w.writerow(['ts','run_id','role','tokens_in','tokens_out','cost_usd','outcome'])
        w.writerow([time.strftime('%Y-%m-%dT%H:%M:%S'), run_id, role, tin, tout, round(cost, 4), outcome])

Call it in a finally block so failed runs are recorded too. Failed runs are where the money hides.

I packaged this schema as a Notion database template plus a CSV starter and the three views above, so you do not have to wire it up yourself: Agent Ops Tracker (Notion + CSV) - https://renevibe76.gumroad.com/l/ptfvli (pay what you want, minimum $1).

The CSV approach above is fully enough to get started, though. The habit matters more than the tool.

What do you track per agent run? I am curious whether anyone measures cost per useful outcome rather than cost per call.

── more in #ai-agents 4 stories · sorted by recency
── more on @notion 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-5-column-csv-that-…] indexed:0 read:1min 2026-10-15 · —