Skip to main content

Local web viewer for AI agent sessions

Project description

agentsview

Browse, search, and track costs across all your AI coding agents. One binary, no accounts, everything local.

Analytics dashboard

Install

# macOS / Linux
curl -fsSL https://agentsview.io/install.sh | bash

# Windows
powershell -ExecutionPolicy ByPass -c "irm https://agentsview.io/install.ps1 | iex"

Or download the desktop app (macOS / Windows) from GitHub Releases or via homebrew: brew install --cask agentsview

Or run the published Docker image:

docker run --rm -p 127.0.0.1:8080:8080 \
  -v agentsview-data:/data \
  -v "$HOME/.claude/projects:/agents/claude:ro" \
  -v "$HOME/.forge:/agents/forge:ro" \
  -e CLAUDE_PROJECTS_DIR=/agents/claude \
  -e FORGE_DIR=/agents/forge \
  ghcr.io/kenn-io/agentsview:latest

Quick Start

agentsview serve           # start server, open web UI
agentsview usage daily     # print daily cost summary

On first run, agentsview discovers sessions from every supported agent on your machine, syncs them into a local SQLite database, and opens a web UI at http://127.0.0.1:8080.

Docker

The container image defaults to local agentsview serve. Set PG_SERVE=1 to switch the startup command to agentsview pg serve instead.

docker-compose.prod.yaml is included as a production example:

docker compose -f docker-compose.prod.yaml up -d

The included compose file persists the agentsview data directory in a named volume and mounts Claude, Codex, Forge, and OpenCode session roots read-only. The container runs as root, so prefer a named volume for /data over a host bind mount; if you do bind-mount, pre-create the directory with the desired ownership to avoid root-owned files in your home directory.

The examples publish the UI on loopback only (127.0.0.1). If you need to expose it beyond localhost, enable --require-auth and publish the port intentionally.

Important: a containerized agentsview instance can only discover agent sessions from directories you explicitly mount into the container. If you do not mount an agent's session directory and point the matching env var at it, that agent will not appear in the UI.

Example PostgreSQL-backed startup:

docker run --rm -p 127.0.0.1:8080:8080 \
  -e PG_SERVE=1 \
  -e AGENTSVIEW_PG_URL='postgres://user:password@postgres.example.com:5432/agentsview?sslmode=require' \
  ghcr.io/kenn-io/agentsview:latest

Token Usage and Cost Tracking

agentsview usage is a fast, local replacement for ccusage and similar tools. It tracks token consumption and compute costs across all your coding agents -- not just Claude Code. Because session data is already indexed in SQLite, queries are over 100x faster than tools that re-parse raw session files on every run.

# Daily cost summary (default: last 30 days)
agentsview usage daily

# Per-model breakdown
agentsview usage daily --breakdown

# Filter by agent and date range
agentsview usage daily --agent claude --since 2026-04-01

# One-line summary for shell prompts / status bars
agentsview usage daily --all --json
agentsview usage statusline

Features:

  • Automatic pricing via LiteLLM rates (with offline fallback)
  • Prompt-caching-aware cost calculation (cache creation / read tokens)
  • Per-model breakdown with --breakdown
  • Date filtering (--since, --until, --all), agent filtering (--agent)
  • JSON output (--json) for scripting
  • Timezone-aware date bucketing (--timezone)
  • Works standalone -- no server required, just run the command

Per-Session Details

agentsview session usage <id> prints per-session token statistics plus a cost estimate for a single session. The output reports the session's total output tokens and peak context tokens, plus a cost estimate in USD (cost_usd) when pricing is available for the session's model(s) (has_cost). Cost is computed from input/output and cache tokens internally, but only the output-token and peak-context totals are reported alongside the cost.

# Print token usage and cost for a specific session
agentsview session usage <id>

# JSON output for scripting
agentsview session usage <id> --format json

The deprecated alias agentsview token-use <id> remains available for compatibility and now also reports cost estimates.

Session Stats

agentsview stats emits window-scoped analytics over recorded sessions: totals, archetypes (automation vs. quick/standard/deep/marathon), distributions for session duration, user-message count, peak context, and tools-per-turn, plus cache economics, tool/model/agent mix, and a temporal hourly breakdown. The --format json output follows a versioned v1 schema (schema_version: 1) suitable for downstream consumers.

By default, stats only reads the local SQLite archive. Git-derived outcome metrics are opt-in because they can be slow or brittle on large/missing repos: use --include-git-outcomes for commits/LOC/files changed, and --include-github-outcomes for GitHub PR counts via gh (this also enables git outcomes).

# Human-readable summary over the last 28 days
agentsview stats

# Machine-readable JSON over a fixed date range
agentsview stats --format json --since 2026-04-01 --until 2026-04-15

# Restrict to one agent and inspect the schema
agentsview stats --format json --agent claude | jq '.schema_version'

# Include expensive local git outcome metrics explicitly
agentsview stats --include-git-outcomes

Session Browser

Dashboard Session viewer
Dashboard Session viewer
Search Activity heatmap
Search Heatmap
  • Full-text search across all message content (FTS5)
  • Token usage and cost dashboard -- per-session and per-model cost breakdowns, daily spend charts, all in the web UI
  • Analytics dashboard -- activity heatmaps, tool usage, velocity metrics, project breakdowns
  • Live updates via SSE as active sessions receive new messages
  • Keyboard-first navigation (j/k/[/], Cmd+K search, ? for all shortcuts)
  • Export sessions as HTML or publish to GitHub Gist

Supported Agents

agentsview auto-discovers sessions from all of these:

Agent Session Directory
Claude Code ~/.claude/projects/
Codex ~/.codex/sessions/
Copilot CLI ~/.copilot/
Gemini CLI ~/.gemini/
OpenCode ~/.local/share/opencode/
OpenHands CLI ~/.openhands/conversations/
Cursor ~/.cursor/projects/
Amp ~/.local/share/amp/threads/
iFlow ~/.iflow/projects/
Zencoder ~/.zencoder/sessions/
VSCode Copilot ~/Library/Application Support/Code/User/ (macOS)
Pi ~/.pi/agent/sessions/
Qwen Code ~/.qwen/projects/
OpenClaw ~/.openclaw/agents/
QClaw ~/.qclaw/agents/
Kimi ~/.kimi/sessions/
Kiro CLI ~/.kiro/sessions/cli/, ~/.local/share/kiro-cli/
Kiro IDE ~/Library/Application Support/Kiro/ (macOS)
Cortex Code ~/.snowflake/cortex/conversations/
Hermes Agent ~/.hermes/sessions/
WorkBuddy ~/.workbuddy/projects/
Forge ~/.forge/
Piebald ~/.local/share/piebald/
Warp ~/.warp/ (platform-dependent)
Positron Assistant ~/Library/Application Support/Positron/User/ (macOS)
Antigravity ~/.gemini/antigravity/
Antigravity CLI ~/.gemini/antigravity-cli/ (summary mode)

Each directory can be overridden with an environment variable. See the configuration docs for details.

PostgreSQL Sync

Push session data to a shared PostgreSQL instance for team dashboards:

agentsview pg push       # push local data to PG
agentsview pg serve      # serve web UI from PG (read-only)

See PostgreSQL docs for setup and configuration.

Privacy

No telemetry, no analytics, no accounts. All data stays on your machine. The server binds to 127.0.0.1 by default. The only outbound request is an optional update check on startup (disable with --no-update-check).

Documentation

Full docs at agentsview.io: Quick Start -- Usage Guide -- CLI Reference -- Configuration -- Architecture


Development

Requires Go 1.26+ (CGO), Node.js 22+.

make dev            # Go server (dev mode)
make frontend-dev   # Vite dev server (run alongside make dev)
make build          # build binary with embedded frontend
make install        # install to ~/.local/bin
make test           # Go tests (CGO_ENABLED=1 -tags fts5)
make lint           # golangci-lint + NilAway
make nilaway        # NilAway through custom golangci-lint
make e2e            # Playwright E2E tests

Pre-commit hooks via prek: run make lint-tools and make install-hooks after cloning (requires prek and uv).

Project Layout

cmd/agentsview/     CLI entrypoint
internal/           Go packages (config, db, parser, server, sync, postgres)
frontend/           Svelte 5 SPA (Vite, TypeScript)
desktop/            Tauri desktop wrapper

Acknowledgements

Inspired by claude-history-tool by Andy Fischer and claude-code-transcripts by Simon Willison.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

agentsview-0.30.1-py3-none-win_amd64.whl (8.5 MB view details)

Uploaded Python 3Windows x86-64

agentsview-0.30.1-py3-none-manylinux_2_28_x86_64.whl (8.3 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

agentsview-0.30.1-py3-none-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

agentsview-0.30.1-py3-none-macosx_11_0_x86_64.whl (8.4 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

agentsview-0.30.1-py3-none-macosx_11_0_arm64.whl (7.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file agentsview-0.30.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: agentsview-0.30.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for agentsview-0.30.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 565494d8c19f78df26a467f2c554005a5bcae4a502a3ea7eb722ffec09ca8e51
MD5 cf0b1e15082670dfead77bc6644af12e
BLAKE2b-256 f44e96bba6c3a459132f89e7f11814348de7d4139045c2308ecdc9c5527d3c3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentsview-0.30.1-py3-none-win_amd64.whl:

Publisher: release.yml on kenn-io/agentsview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentsview-0.30.1-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for agentsview-0.30.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 545e4faa36e2fab2c3a0e6132f52a56a3acb63b413c5457d6cd3ce159ae37525
MD5 bbdf7babf22252a88335697097770eff
BLAKE2b-256 a57c6919649e3bc3e0c6ed670b87aa73eecf8bdf2a32f689173d267020d63439

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentsview-0.30.1-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on kenn-io/agentsview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentsview-0.30.1-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for agentsview-0.30.1-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d0e5750eef2506697cbb7c976a2c8ecdf90ab00f178e7891b74c71f6c1843f44
MD5 1800e61635e75611ec2212750e152c40
BLAKE2b-256 21905a84995db60b1313f040964032ddb59c1f9d3713ad04eff5cf86bcd286e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentsview-0.30.1-py3-none-manylinux_2_28_aarch64.whl:

Publisher: release.yml on kenn-io/agentsview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentsview-0.30.1-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for agentsview-0.30.1-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 6e60285175685208fb011b3ef1dcfefb8f47706755d76183ac3b272946e77e55
MD5 3b8451d9203ebfda9a9772a9f19fe562
BLAKE2b-256 1474538281c4ec85d016abbede947b504da106c87b146004d51363041aa8d5ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentsview-0.30.1-py3-none-macosx_11_0_x86_64.whl:

Publisher: release.yml on kenn-io/agentsview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentsview-0.30.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for agentsview-0.30.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 da12d13b3fbe408fb8d8ad5d05a29e0dfed70b00c14c2744ab978735e31aed6e
MD5 0255c2bea1a61add6ba1bfb854d195e5
BLAKE2b-256 16f0a774c59ecfa19268c3531ddbe7d8997a1f650f3dc4e3b1f7d7bf0561e6ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentsview-0.30.1-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on kenn-io/agentsview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page