Guide · 7 min read
AI agent cost tracking per task, checked against the bill
Provider dashboards tell you what you spent. They don't tell you what a task cost, which client it belongs to or whether the agent was worth it. To know that, the cost has to be tied to the task, converted to one currency and checked against what the provider actually billed. This guide covers the pieces and how to set them up.
Three numbers, three places
- Provider bill: what Anthropic, OpenAI or OpenRouter charge you. The truth, but with no client or task.
- Reported cost: what an agent says a piece of work cost, with model and tokens. Tied to a task, but only as accurate as the reporting.
- Full cost: reported cost plus the people's time to brief and review the work, at their cost rates. This is what decides if the agent pays for itself.
Step 1: tie cost to the task
Each piece of agent work should report its cost once, on the task or project: model, input and output tokens and cost. In Hourtick an agent does it with log_time and the usage field, with agent_reply, or with the report_cost tool for cost without time. The REST API has POST /api/v1/agent-costs. Costs are stored in USD with the model and tokens, once per report.
Step 2: one currency, one report
People's costs and agents' costs often sit in different currencies. Hourtick converts each row at European Central Bank reference rates for the day it happened, refreshed every six hours. A row without a rate for its day counts as zero and the report says so, so gaps show instead of hiding.
Step 3: check it against the bill
- Admins connect an Anthropic Admin API key, an OpenAI admin key or an OpenRouter management key in Settings → AI provider costs. Keys are validated first, stored encrypted and never shown again.
- Map each provider scope to an agent: an Anthropic workspace, an OpenAI project or key, or an OpenRouter key.
- Every six hours Hourtick reads the last 30 days of bills and compares them with what each agent reported for the same month.
- If the bill is higher, the difference is added to the agent's cost. If the agent reported more than was billed, it is flagged and never subtracted, so you can find double reporting.
Step 4: set budgets
Give each agent a monthly limit on reported cost and on logged time. When it is reached the agent is paused, gets no new work and its owner and admins are notified. It starts again in a new month or when you raise the limit.
Step 5: look at cost per outcome
Reports → Agent outcomes lists each finished task with the agent's time and cost, the people's briefing and review time, how often it was sent back and who approved it. Admins also see full cost, revenue and margin per task. Divide by finished tasks to get a cost per outcome, and watch minutes of review per agent hour. Hourtick measures agents and tasks, never ranks people.
Frequently asked questions
Do I need to connect the provider?
No. Without it, cost is what agents report. Connecting Anthropic, OpenAI or OpenRouter adds a monthly check that fills gaps and flags double reporting.
Who can see agent cost?
Admins see cost, revenue and margin. Managers see hours and review counts without money. Agents never see cost reports.
What if an agent reports its cost twice?
The provider check flags months where reported cost exceeds the bill, and admins can delete a duplicate cost row.
Does Hourtick run the models?
No. You use your own AI provider and pay them directly. Hourtick tracks and checks the cost.
Is it included in Free?
Yes. Every feature is on every plan.
Sources
Related guides
Track your first hour in a minute.
Free for your whole team, forever. $29/month when you need 5 GB.