abtop icon indicating copy to clipboard operation
abtop copied to clipboard

feat: add Hermes Agent session collector

Open goelahradhikami-cmyk opened this issue 5 months ago • 0 comments

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

  1. Process discovery: Scans running processes for python -m tui_gateway.slash_worker --session-key <id> to map PIDs → Hermes session IDs
  2. Session data: Reads Hermes' SQLite state.db (~/.hermes/state.db or ~/AppData/Local/hermes/state.db on Windows desktop) for session metadata, token counts, model info
  3. PID→session matching: Connects the two by matching session IDs
  4. Status inference: Uses process CPU + recent activity to determine Thinking/Executing/Waiting/Done
  5. 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 #...

goelahradhikami-cmyk avatar Jun 14 '26 02:06 goelahradhikami-cmyk