---
title: How do I track AI token usage and cost on every engineering task? | AEC Agents
url: https://aecagents.si/use-cases/ai-task-cost-tracking
description: A standing rule in the agent's instruction file (for example AGENTS.md) makes every engineering task log record tokens and cost, so you learn what AI help actually costs per task type.
last_modified: 2026-11-27
source: AEC Agents (free, open workflows; not engineering advice)
---

[AI assists](https://aecagents.si/use-cases/ai-task-cost-tracking#honesty-labels)Based on our own use · in regular use

# How do I track AI token usage and cost on every engineering task?

A standing rule in the agent's instruction file (for example AGENTS.md) makes every engineering task log record tokens and cost, so you learn what AI help actually costs per task type.

Role
:   [Project Manager](https://aecagents.si/roles/project-manager)

Discipline
:   Construction

Tools
:   AGENTS.md convention

Updated
:   27 November 2026

Tool links listed below; vendor features and pricing change, so confirm with the vendor.

## Short answer

Use Claude Code or OpenAI Codex (AGENTS.md rule): The agent logs its own token use and cost at the end of every task into a ledger. A standing rule in the agent's instruction file (for example AGENTS.md) makes every engineering task log record tokens and cost, so you learn what AI help actually costs per task type. A person still checks: totals against your provider's billing.

## AI tie-in

**Tool:** Claude Code or OpenAI Codex (AGENTS.md rule)

The agent logs its own token use and cost at the end of every task into a ledger.

### Prompt 1

```
At the end of this task, append to usage-ledger.csv: date, task name, model, input tokens, output tokens, cached tokens, estimated cost, and wall time.
```

**Human check:** Totals against your provider's billing.

## The problem

Track AI token usage and cost on every engineering task. This is a common, time-consuming task for a project manager.

## What this workflow does

A standing rule in the agent's instruction file (for example AGENTS.md) makes every engineering task log record tokens and cost, so you learn what AI help actually costs per task type.

**How it works:** AI drafts or analyzes. A person operates the tools, checks the work, and takes action.

**Your checkpoint:** Reported token counts vary by tool; reconcile with your provider's billing.

## Before you start

- Access to the named tool; confirm license, version and cost with the vendor.
- A small, non-confidential sample to try the workflow on first.
- A qualified person to review the output before it is used.

### Tools and access

- [AGENTS.md convention](https://agents.md/)

## Follow the steps

1. Add a rule to the agent instructions: record input, output and cached tokens and model at the end of every task.
2. Keep a simple ledger (task, date, model, tokens, cost, time saved estimate).
3. Review monthly by task type.
4. Drop or change models for tasks where cost exceeds value.

## Try a small example

Replace the bracketed fields with your own project details. No tested sample run is published for this workflow yet.

### Sample input

```
Fill in the bracketed [fields] in the text below with your project data.
```

### Starter prompt

```
At the end of this task, append to usage-ledger.csv: date, task name, model, input tokens, output tokens, cached tokens, estimated cost, and wall time.
```

### Expected output

```
Not published yet. Treat any output as a draft and check it against the source documents.
```

## Check the result

- Every value, citation or quantity traces back to a source document.
- Missing information is marked as missing, not filled in.

## Limits and recovery

- Reported token counts vary by tool; reconcile with your provider's billing.
- Check your organization’s data policy before sharing project files with third-party tools.

**Stop or switch when:** The source cannot be verified, permissions are missing, or the result contains unsupported facts.

## Frequently asked questions

How does AI help with this?

Claude Code or OpenAI Codex (AGENTS.md rule): The agent logs its own token use and cost at the end of every task into a ledger. A person still checks: Totals against your provider's billing.

How do I how do I track AI token usage and cost on every engineering task??

Add a rule to the agent instructions: record input, output and cached tokens and model at the end of every task. Keep a simple ledger (task, date, model, tokens, cost, time saved estimate). Review monthly by task type. The full step list is above.

Does this use an AI agent or regular software?

It is labeled AI assists: AI drafts or analyzes. A person operates the tools, checks the work, and takes action.

What tools do I need?

AGENTS.md convention. Confirm license, version and cost with the vendor, and try it on a small non-confidential sample first.

Has this workflow been tested?

Based on our own use · in regular use. Written from a workflow we built and use. Specifics are generalized and no project data is published. Not independently verified.

## Where to go next

- [How do I search project documents with AI to answer field questions, then confirm the source?](https://aecagents.si/use-cases/project-document-search)
- [How do I compare construction schedule scenarios with AI-assisted scheduling tools?](https://aecagents.si/use-cases/schedule-optimization)
- [How do I spot schedule delays and quality problems early with schedule analytics?](https://aecagents.si/use-cases/schedule-health)
- [All Project Manager workflows](https://aecagents.si/roles/project-manager)
- [All Schedules, submittals and project controls workflows](https://aecagents.si/tasks/project-controls)

## Evidence and maintenance

Written from a workflow we built and use. Specifics are generalized and no project data is published. Not independently verified.

- [AGENTS.md convention (vendor site)](https://agents.md/)

## On this page

Start with a small sample and keep the original record open while you verify the result.

## How each workflow is labeled

Agent executes
:   An AI agent calls connected tools to carry out bounded actions. You set permissions and review the result.

AI assists
:   AI drafts or analyzes. A person operates the tools, checks the work, and takes action.

Conventional automation
:   Rules or specialist software perform the task. No AI agent is required.
