Skip to main content

Bough: Tool Analyzes AI Token Costs and Sessions

Developer builds Bough to track AI token usage and session history, revealing a $1,278 API cost across 542 prompts and 36 keyboard hours.

AI-written
Inewgen
28 Sep 2026Source: Dev.to2 min read (0 views)
Share
Bough: Tool Analyzes AI Token Costs and Sessions

Stock photo for illustration only, not from the actual event

Font size
  • Bough is an open-source tool to inspect local AI agent transcripts.
  • Test project used 542 prompts, 32 sessions, and cost $1,278 in API rates.
  • Transforms walls of JSON into an interactive timeline of tasks and costs.
  • Runs entirely local with no internet connection or account required.

AI-assisted software development often leaves lingering questions about time spent and token costs. Vague estimates like about a week or monthly subscription plans fail to reveal which feature ate up the hours or which bug led to a costly cycle of trial and error amounting to dozens of dollars in tokens.

Driven by this curiosity, a developer built a tool named Bough to parse data already sitting on local disk storage. The test project analyzed through this tool yielded striking statistics: 542 prompts, 32 sittings, 36 hours at the keyboard, and an actual API cost of $1,278.

code editor timeline dashboard analytics UI

Stock photo for illustration only, not from the actual event

Popular AI agents like Claude Code, Codex, and Pi automatically record session transcripts locally, capturing every prompt, file touched, command executed, and token burned. However, these logs remain unreadable walls of JSON data spanning weeks of unrelated tasks, causing developers to ignore them completely.

Never miss the latest news?

Subscribe to get news summaries by email - not often enough to be annoying.

โฆษณา

Bough reads these transcripts and maps out the actual shape of the project built. Installation runs via a simple terminal command, opening the interface directly in a browser with zero setup, no accounts, no API keys, and zero data leaving the machine without internet access.

Storing raw agent transcripts locally creates a rich data source that is typically overlooked due to its complex format. Building a tool that processes these logs entirely offline provides powerful insights into AI usage habits while preserving strict code privacy and security.

542Total Prompts
36 hrsKeyboard Time
$1,278API Token Cost

The primary interface features a horizontal timeline where large blocks represent sittings and smaller squares hang off as distinct tasks. The system determines task boundaries by analyzing pause durations, memory compaction events, and concurrent file changes, transforming obscure session IDs into meaningful milestones.

Source: Dev.to

Comments

Leave a Comment
0/2000

Found something wrong in this article? Report an issue with this article