A terminal-first monitoring tool for AI coding agents, written in Rust.
Track sessions, metrics, and command history across Claude Code and other AI assistants.
When working with AI coding agents via SSH or in terminal multiplexers, you need visibility into what's happening without leaving your workflow. ragentop provides:
- Real-time metrics — Token usage, cost estimates, session duration
- Cost monitoring — Per-model pricing, burn-rate tracking, budget alerts
- Multi-agent support — Claude Code, Codex CLI, Copilot, Gemini CLI, Qwen Code
- Command history — Tool calls with configurable depth (tool-only → full conversation)
- Versioned state — Merkle DAG storage for session history and replay
- TUI dashboard — SSH-friendly interface built with ratatui
- Multiplexer aware — Tmux and Zellij session detection
Current version: v0.1.0
| Component | Status |
|---|---|
| ragentop-core | ✓ Types, traits, DAG, multiplexer, protocol, alerts, cost tracking |
| adapter-claude | ✓ Detection + metrics + parsing |
| adapter-codex | ✓ Detection + history parsing |
| adapter-copilot | ✓ Detection |
| adapter-gemini | ✓ Detection |
| adapter-qwen | ✓ Detection + parsing |
| ragentop-daemon | ✓ Socket API, sessions, tmux/zellij |
| ragentop-tui | ✓ Dashboard + input handling |
| ragentop-cli | ✓ detect/status/tui/web/daemon subcommands |
| ragentop-web | ✓ Axum server + browser launch |
git clone https://github.com/alext/ragentop
cd ragentop
make build && make installRequires Rust 1.75+ (uses async fn in traits).
# Detect all agent sessions on this machine
ragentop detect
# Detect with full detail
ragentop detect --verbose
# Show tracked session status
ragentop status
# Start the web dashboard (opens browser)
ragentop web
# Launch the TUI dashboard
ragentop tui
# Get help
ragentop --helpHybrid Hexagonal + Functional Core design:
┌─────────────────────────────────────────────┐
│ IMPERATIVE SHELL │
│ cli · daemon · tui · web │
├─────────────────────────────────────────────┤
│ HEXAGONAL BOUNDARY │
│ adapter-claude · adapter-codex · ... │
├─────────────────────────────────────────────┤
│ FUNCTIONAL CORE │
│ ragentop-core (pure functions, no I/O) │
│ types · traits · DAG · config · alerts │
│ pricing · burnrate · stats · normalize │
└─────────────────────────────────────────────┘
Key principle: Business logic stays pure in ragentop-core. Adapters implement the AgentAdapter trait. Shell orchestrates I/O.
make check # Type check all crates
make test # Run test suite
make lint # Clippy lints
make pre-commit # Format + lint + test
make demo # Run functionality demoSee Makefile Guide for all targets.
MIT