AgentsTrack collector

See where your coding agents spend your tokens, without sending your code anywhere.

Version
0.7.1
Updated
November 28, 2026
Licence
Apache-2.0
Requires
Node.js 24 or later
Command
agentstrack
Agents
Claude Code, Codex, Gemini CLI, OpenCode, Antigravity, Kimi Code (opt-in)

The short version

What it does

Claude Code, Codex, Gemini CLI, OpenCode and Antigravity each keep a record of every session on your machine. The collector is an open-source command-line tool that reads those records and turns them into one normalized stream of events, ready to send to AgentsTrack, AI coding agent analytics made by DDCode. Kimi Code is supported too, but experimental and switched off until you turn it on.

  • Tokens normalized across agents: input, cached input, cache creation, output and reasoning
  • Cost with its basis: OpenCode’s settled charge as reported, an estimate from a rate card for the rest
  • Tool calls, shell commands and the files each session changed, with line counts
  • The commits a session produced, and which account paid for it
  • Reads files the agents already write: no hooks, no wrapper, nothing written to agent settings
  • Prompts and code are dropped on your machine, before anything is queued for upload

No hooks

It reads what the agent already wrote

It tails the append-only logs Claude Code, Codex, Gemini CLI and Kimi Code write, opens OpenCode’s database read-only, and reads a private copy of each Antigravity database. It installs no hooks, doesn’t wrap your agent, and never writes to your agent’s settings. Uninstalling is npm rm -g plus deleting one directory, and nothing about your agent setup changes.

Agents don’t record identical things, so the data differs by agent. Where a provider reports its real cost, as OpenCode does, that is what you get. For the others, cost is an estimate from a rate card, and it is labelled as one: every figure carries its cost basis.

Filtered locally

Prompts and code never leave your machine

Privacy is enforced in the collector, before anything is queued for upload, not on the server. Prompt text and file contents are discarded locally. Secrets are redacted on your machine too, and the secret itself is never sent, not even a prefix of it. There are three modes:

metadata
Token counts, timings, models and costs; tool names and outcomes; the binary name of each command; relative file paths and line counts; git branch and SHA. No titles, error messages or account email.
analytics (default)
Everything in metadata, plus the full command line (secrets redacted), a short session title worked out locally from the prompt, error messages, and the account’s email or name. Never prompt text or code.
full
Same as analytics. Prompt text and file contents are sent only if you also set privacy.prompts and privacy.code_content to full.

Don’t take our word for it. Run agentstrack sync --dry-run --print and it prints the exact JSON that would be uploaded, after redaction, without uploading any of it. What happens after upload (hashed API keys, tenant isolation, retention) is on the AgentsTrack security page.

Install

Install and log in

Needs Node.js 24 or later. Use a key from your AgentsTrack settings (API keys). The collector CLI docs cover every command and privacy mode.

npm install -g @agentstrack/collector

agentstrack login <your-api-key>
agentstrack start
agentstrack status

start installs a login service and begins collecting; status confirms it is working. On its first pass it reads the transcripts modified in the last 7 days, so there is no separate import step. Nothing showing up? Run agentstrack doctor.

Open source, Apache-2.0

The part that runs on your machine and reads your files is all in the repository, so you can check every claim above. The dashboard it feeds is Claude Code and Codex cost tracking at agentstrack.ai, which has a free plan. It sits alongside Agents Usage Watch, our Mac app for plan limits.