A terminal trace viewer for AI agents built with belaykit.
Renders agent execution traces as trees with cost, token usage, context utilization, and timing at a glance.
9db91f1c trace 15.0m $0.8530 65.0K↑ 30.2K↓ 2/30 ⚠
├── a1e0mark ◆ phase-0
├── 4982980d subreddit-discovery opus 3.5m $0.2180 ▁▁▂▂▃▄ 24% 8.0K↑ 4.2K↓
│ ├── f12cf671 bash opus 32.0s $0.0280 ░░░░░░░░░░ 4% 8.0K↑ 1.8K↓
│ ├── d53bea7f bash opus 38.0s $0.0340 ░░░░░░░░░░ 9% 18.0K↑ 2.1K↓
│ ├── 67929df2 bash opus 35.0s $0.0390 █░░░░░░░░░ 18% 35.0K↑ 2.4K↓
│ └── 0c002f39 bash opus 29.0s $0.0300 ████░░░░░░ 48% 95.0K↑ 2.6K↓
├── b2f1mark ◆ phase-1
├── f2d498c1 thread-discovery opus 4.0m $0.2640 ▁▁▂▃▄▅ 36% 12.0K↑ 5.8K↓
│ ├── 3fd8e465 bash opus 36.0s $0.0320 ░░░░░░░░░░ 6% 12.0K↑ 1.6K↓
│ └── bf1a42ca bash opus 40.0s $0.0390 ███████░░░ 70% 140.0K↑ 2.8K↓ ⚠
...
go install github.com/hev/belaydevice@latest
Or build from source:
git clone https://github.com/hev/belaydevice
cd belaydevice
make build
View a trace file:
belay path/to/trace.json
Show a demo trace:
belay
Each row in the tree shows:
| Field | Example | Description |
|---|---|---|
| ID | 4982980d |
Short trace node ID |
| Name | bash |
Tool call or phase name |
| Model | opus |
Which model ran this step |
| Duration | 3.5m |
Wall-clock time |
| Cost | $0.2180 |
API cost in USD |
| Context | ████░░░░░░ 48% |
How full the context window is |
| Tokens | 95.0K↑ 2.6K↓ |
Input/output token counts |
| Warning | ⚠ |
Context usage above 60% |
Phase nodes show a sparkline (▁▂▃▄▅▆▇█) summarizing context growth across their children. Leaf nodes show a thermobar (██░░) of their individual context usage.
Colors indicate context pressure: green (<60%), yellow (60-80%), red (>80%).