abtop
abtop copied to clipboard
feat: add Hermes Agent session collector
Summary
Adds a new collector for Hermes Agent — an open-source AI agent framework by Nous Research. Hermes belongs to the same category as Claude Code, Codex CLI, and OpenCode.
How it works
- Process discovery: Scans running processes for
python -m tui_gateway.slash_worker --session-key <id>to map PIDs → Hermes session IDs - Session data: Reads Hermes' SQLite state.db (
~/.hermes/state.dbor~/AppData/Local/hermes/state.dbon Windows desktop) for session metadata, token counts, model info - PID→session matching: Connects the two by matching session IDs
- Status inference: Uses process CPU + recent activity to determine Thinking/Executing/Waiting/Done
- Context window: Built-in model→context_size lookup table for 20+ models (configurable)
Supported features
| Feature | Status |
|---|---|
| Session Discovery | ✅ |
| Token Tracking (input/output/cache) | ✅ |
| Status Detection | ✅ |
| Context Window % | ✅ (model lookup table) |
| Child Processes | ✅ |
| Git Status | ✅ (via existing MultiCollector git sweep) |
| Rate Limit | ❌ (Hermes doesn't expose this) |
Usage
Hermes sessions appear automatically with agent_cli "hermes". To hide them:
hidden_agents = ["hermes"]
Cross-platform
Tested on Windows. Works on Linux and macOS via the same sqlite3 CLI approach used by OpenCodeCollector.
Closes #...