Local store¶
Harnesses delete their own transcripts. Claude Code removes sessions older than cleanupPeriodDays, 30 by default, and every number agent-top computed from them goes too: agent-top report --since all shows less than it did a month earlier.
The local store is a SQLite file on your machine that keeps those numbers. agent-top sync fills it from the transcripts on disk, agent-top sql queries it, agent-top ui charts it, and agent-top report counts the sessions in it whose transcripts are gone.
agent-top sync # keep what is on disk now
agent-top sql "select * from cost_by_day order by day desc limit 7"
| Page | What it covers |
|---|---|
| Sync | agent-top sync: what it reads, what it skips, running it on a schedule |
| Query | agent-top sql: output formats, the saved views, other SQLite clients |
| Web view | agent-top ui: charts and session waterfalls in a browser, on this machine |
| Receive telemetry | agent-top serve --listen: OpenTelemetry spans from your own agents, in the same store |
| Schema | the tables and columns, times, and how stored cost relates to the price table |
Where the file is¶
The first of these that is set: --db, AGENT_TOP_DB, $XDG_DATA_HOME/agent-top/agent-top.db, ~/.local/share/agent-top/agent-top.db. It is created with mode 0600. Only agent-top sync and agent-top serve create or write it; sql, ui, report and the live view never do.
What is in it¶
What --json shows, and nothing else. agent-top never reads prompt, reply or tool content, so none can be stored. The file does hold working-directory paths and project names.
Nothing leaves the machine. To delete the store, delete the file.