Install the collector
The collector is a lightweight, open-source agent that reads session files from your AI coding tools (Claude Code, Codex CLI), computes aggregate metrics, and posts them to UnitSense. No proxy required — this is the fastest path to seeing your own data.
You'll need about 5 minutes. The agent supports Claude Code and Codex CLI on macOS, Linux, and Windows.
Log in & accept your invite
Open the invite email from UnitSense and accept it, then log in to your workspace at
<slug>.app.unitsense.ai.
That first part is your tenant slug — click it to set it once and it
fills in across this page.
Get your registration token
Open your agent tokens page — clicking takes you straight there (set your slug first and it points right at your tenant):
https://<slug>.app.unitsense.ai/settings/agent-tokens
Then:
- Click Generate new token.
- In the popup, give it a Label (e.g. your machine name). Leave Max uses (unlimited) and Expires in days at their defaults.
- Click Generate. You'll get a token starting with
ust_reg_— copy it now; you'll paste it during setup.
Your token and slug are personal to your tenant — keep them out of shared docs and scripts.
Install the agent
Pick your operating system. Your choice is remembered across the rest of this page.
First install cosign — the installer uses it to verify the binary's signature against our pinned identity. Then run the installer.
# Install cosign — verifies the signed binary
brew install cosign
# Download, verify the signature, and install the agent
curl -fsSL https://app.unitsense.ai/install-agent.sh | bash
Configure
Run setup with your tenant slug and email. --enable-git-hints opts in to
including your branch name, commit SHAs, and a hashed remote URL in session payloads — it
gives you richer attribution and is recommended.
unitsense-agent setup --tenant <your-slug> --email you@company.com --enable-git-hints
You'll then be prompted for the registration token from Step 1 (input is hidden). To run setup non-interactively, set UNITSENSE_TOKEN in your environment or pipe it in with --token-stdin.
Schedule it
Register the agent to run every 10 minutes — a cron job on macOS / Linux, a Task Scheduler task on Windows.
unitsense-agent install --schedule=10m
Sync now & see your data
Run a sync right away instead of waiting for the first scheduled run:
unitsense-agent run
Then open your dashboard — your coding-agent stats (developer sessions, token usage, and token-to-outcome mapping) appear within a minute. That's it: you're live.
Backfill historical data (optional)
The scheduled job only looks back 24 hours each run. To pull in your earlier sessions,
run a one-shot sync with a wider lookback window. The window is in hours —
168h is 7 days, 720h is 30 days:
unitsense-agent run --window=720h
You can run this anytime, alongside the scheduled job — use a bigger window whenever you need to reach further back. Re-running is safe: syncing the same window again won't double-count your data.
What gets sent
UnitSense ships aggregates only — never your prompts, responses, code, or raw tool inputs and outputs. The agent computes metrics locally and posts only the aggregated numbers. Read the full privacy contract in the agent's SECURITY.md.
Every release binary is signed with cosign keyless via GitHub's OIDC, and the macOS / Linux installer verifies that signature against our pinned identity before installing. The agent is open-source — review it any time at github.com/UnitSense/agent.