Part of the DEVIN ecosystem
Track: Verify · Nature: product
For: QA engineers, Local-first ops, Data Scientists
Interface: CLI / Dashboard
Path: Data Scientists · step 4/4 — afterdevin-history
devin-metrics
Unofficial community project. Not affiliated with, endorsed by, or sponsored by Cognition AI. "Devin" is a trademark of Cognition AI.
Linux · Personal Windows · Corporate Windows
Part of the awesome-devin ecosystem: the curated hub for the devin-* tools.
Local-only metrics for your Devin usage: sessions per day/week, per-project and per-model rollups, context-size peaks, longest sessions, tool-call mix — zero telemetry, JSON + markdown output.
The problem
Devin sessions accumulate real activity — context growth, model time, tool
calls — but there is no way to answer "which project ate my week?" or "how
big did my sessions get?". The data already exists on disk in sessions.db
and acp-messages/*.db; nothing reads it. devin-metrics is the missing
read side.
Prior art
Agent-usage trackers exist for other tools — e.g. ccusage for Claude Code
reads ~/.claude transcripts and reports cost/token rollups. This project
adapts the same idea; it does not reinvent it. What is different here is the
source: Devin's stores are private, schema-versioned (17 migrations), and
undocumented — so the reading layer is delegated to
devin-internals-spec
which owns parsing + schema detection.
What makes it Devin-native
- Side-by-side: generic token trackers cannot open Devin's stores at
all — the format is unpublished. This tool reads them directly, so
metrics come from protocol data (
sessions.db,acp-messages), not scraped text. - No-Devin: remove Devin and there is nothing to measure — no store, no metrics.
- One sentence: it reads Devin's own databases and tells you what your sessions did — locally, with nothing sent anywhere.
Per-session working_directory gives project attribution for free.
Install
Requires Python ≥ 3.10 and pipx or uv. Per-OS setup lives in the platform guides: Linux · Personal Windows · Corporate Windows.
uv tool install devin-metrics
# or
pipx install devin-metrics
Usage
devin-metrics summary # headline numbers + top-5 lists
devin-metrics projects # per-project session/activity table
devin-metrics daily --days 14 # activity over time
devin-metrics dashboard --out usage.html
devin-dashboard build --out usage.html # dashboard executable alias
devin-dashboard data --json # same dashboard source data as JSON
devin-metrics summary --json # raw JSON for scripting
devin-dashboard is an alias shipped by the same package. Its build command
writes a standalone HTML dashboard; data prints the normalized stats payload.
By default, sessions.db is read from the platform data root (%APPDATA%/devin
on Windows, $XDG_DATA_HOME/devin on Linux, normally ~/.local/share/devin).
ACP logs are read from the separate UI config root (%APPDATA%/Devin/User
on Windows, $XDG_CONFIG_HOME/Devin/User on Linux). Override with
--data-dir, --sessions-db or --acp-dir.
devin-metrics summary --sessions-db path/to/sessions.db --acp-dir path/to/acp-messages
A missing acp-messages dir degrades gracefully: cost_usd shows -
(unknown ≠ zero). Note that per-turn cost is not persisted even when
the dir exists (verified — see Limitations); context_tokens is the real
per-session token signal.
Works with Devin alone (Devin-only mode)
All metrics are computed locally from Devin's own stores and written to a
local database — zero telemetry, zero network calls. The devin-dashboard
console alias included in this package (it absorbed the old standalone
dashboard) also renders entirely on your machine.
Platform support
Tested on Windows and Linux (windows-latest + ubuntu-latest in CI).
The CLI database is auto-detected from %APPDATA%/devin/cli/sessions.db on
Windows and $XDG_DATA_HOME/devin/cli/sessions.db on Linux (default
~/.local/share/devin/cli/sessions.db). ACP logs are read from
$XDG_CONFIG_HOME/Devin/User/acp-messages (default
~/.config/Devin/User/acp-messages). Legacy ~/.config/devin layouts are
also checked. Override with --sessions-db or --acp-dir.
The dashboard also charts peak num_tokens_preceding per day — the only token signal persisted locally (verified: no cost fields are stored). Cost charts show a "no data" note rather than fake zeros.
devin-metrics churn (needs devin-graph build)
Rework stats from the knowledge graph: files re-touched by multiple tool calls in the same session, per session and per model. Known noise: pseudo-paths like /dev/null and shell builtins can rank high — they are real file_touched edges, just not meaningful rework.
devin-metrics watch is an advisory context guard (ME-2): lists
sessions/days whose context_tokens exceed thresholds
(--session-warn, --daily-warn, --fail for CI). It never blocks —
and it watches context size, not cost: local stores have no cost data
(verified, see SCHEMA.md).
Limitations
- Read-only, no network. Stores are opened
mode=ro; nothing is written or sent anywhere. - Cost is not persisted locally — verified. A real install (2026-10)
confirms acp payloads and
tool_call_statecarry no cost/token fields; per-turn cost lives only in the live ACP session meta and is never written to disk.cost_usdtherefore shows-on real data. The one token signal that does persist —num_tokens_precedinginmessage_nodes.metadata— is reported per session ascontext_tokens(peak context size). Details:docs/SCHEMA.md. - Schema-gated.
sessions.dbversions outside v15–v17 are refused loudly (viadevin-internals-spec's detector) rather than misread. - Drift-checked —
devin-inspect contract(from devin-internals-spec) validates this install against every known contract boundary.
Development
pip install -e ".[dev]"
python -m pytest
When to use this
- You want a local view of Devin activity: sessions per project, model, or day, context-size peaks, longest sessions and tool-call mix.
- You need a scriptable JSON feed of usage stats (
--jsonon every command). - You want a standalone HTML dashboard of activity (
devin-metrics dashboardor thedevin-dashboardalias). - Telemetry is a hard no — everything is computed and stored locally.
When NOT to use this
- You need to search message content — use
devin-search; or relationship queries across sessions/files/tools — usedevin-graph. - You need live, real-time session monitoring — use
devin-office. - The machine has no Devin CLI/Desktop install — there is nothing to measure.
FAQ
What is devin-metrics? A local CLI that reads Devin's own session
databases and reports local observability metrics: sessions per day/week,
activity and context-size peaks per project and model, longest sessions, and
tool-call mix. It also
ships a devin-dashboard alias that writes a standalone HTML dashboard.
How does devin-metrics get cost data? Honest answer: it mostly
doesn't — verified on a real install, Devin's local stores persist no
cost or token fields (cost exists only in the live ACP session meta and
is never written to disk). What it does measure: sessions, messages,
tool calls, durations, per-project/per-model rollups, and context_tokens
(peak num_tokens_preceding — the only token signal that persists). The
extract_usage() adapter remains ready if a future schema starts
persisting cost.
Does devin-metrics send data anywhere? No. All metrics are computed
locally and written to a local database. There are no network calls and no
telemetry; Devin's own stores are opened mode=ro and never written.
License
MIT — see LICENSE.
Metadata
Release files for devin-metrics 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| devin_metrics-0.2.1.tar.gz | 35.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| devin_metrics-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.9 kB
Release files / devin_metrics-0.2.1.tar.gz
| Download URL | devin_metrics-0.2.1.tar.gz |
|---|---|
| Size | 35.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
797ec5eb9bbd1150cb973290aeb879d68963bad99c295b89ec9f769f512b826e
|
|
BLAKE2b-256 checksum How to use checksums |
742cfe575af00937dd16fbafed3c3ab6311d4dba76c604e108d2d2c73043e304
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / devin_metrics-0.2.1-py3-none-any.whl
| Download URL | devin_metrics-0.2.1-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2178415145eb8bcdb0409304eb9c7b71d7059c994ec130bf4875cf1bbe71ea90
|
|
BLAKE2b-256 checksum How to use checksums |
37376c9d5cc5d4bd0f2e4025840adc3712ed39ebb6ac7e3d9eebd3ca13ec685e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency log