@misha_misha/agentwatch 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -31
- package/bin/agentwatch.js +0 -0
- package/dist/index.js +8277 -5193
- package/dist/web/assets/ActiveShapeUtils-CtEvtbYg.js +1 -0
- package/dist/web/assets/Bar-DEgd_1jq.js +1 -0
- package/dist/web/assets/BarChart-CLHGmIz1.js +1 -0
- package/dist/web/assets/CartesianChart-DgJKUG1O.js +1 -0
- package/dist/web/assets/CategoricalChart-DEGrE0Qv.js +33 -0
- package/dist/web/assets/ErrorBarContext-BMnGmrrB.js +1 -0
- package/dist/web/assets/Legend-CEa2zCmi.js +4 -0
- package/dist/web/assets/Line-CCyE37cb.js +1 -0
- package/dist/web/assets/LineChart-DmMubyEd.js +1 -0
- package/dist/web/assets/ProjectActivity-BG5hEcJl.js +1 -0
- package/dist/web/assets/ProjectYield-vVxXaT6e.js +1 -0
- package/dist/web/assets/SessionActivity-BUzJpWwc.js +1 -0
- package/dist/web/assets/SessionCompaction-Dx3tbM9N.js +1 -0
- package/dist/web/assets/SessionDiffs-CDUkVqua.js +65 -0
- package/dist/web/assets/SessionGraph-DWP1YyP0.js +1 -0
- package/dist/web/assets/SessionReplay-kz1EhiaI.js +1 -0
- package/dist/web/assets/SessionTokens-BjuXcVM2.js +1 -0
- package/dist/web/assets/SessionYield-DXF-Xb5T.js +1 -0
- package/dist/web/assets/Settings-CXCDYvsc.js +1 -0
- package/dist/web/assets/Trends-wdNqOtnn.js +1 -0
- package/dist/web/assets/arrow-left-B-iQ08P0.js +1 -0
- package/dist/web/assets/chart-column-BwF4X7mz.js +1 -0
- package/dist/web/assets/clsx-DnEFlO87.js +1 -0
- package/dist/web/assets/createLucideIcon-Bjwrp8ZV.js +8 -0
- package/dist/web/assets/dist-BYqqB4pa.js +1 -0
- package/dist/web/assets/file-pen-CHXP3wF7.js +1 -0
- package/dist/web/assets/format-zsCsqELF.js +1 -0
- package/dist/web/assets/getRadiusAndStrokeWidthFromDot-CFcPogcT.js +1 -0
- package/dist/web/assets/graphicalItemSelectors-DJeUEv0O.js +1 -0
- package/dist/web/assets/index-CJArQihV.js +2 -0
- package/dist/web/assets/index-CTAomrBX.css +1 -0
- package/dist/web/assets/play-ONoP4Jfr.js +1 -0
- package/dist/web/assets/tooltipContext-BT7phkqZ.js +1 -0
- package/dist/web/assets/triangle-alert-BhvAiLmv.js +1 -0
- package/dist/web/assets/useMutation-CfQYV-vU.js +1 -0
- package/dist/web/index.html +28 -0
- package/package.json +27 -4
package/README.md
CHANGED
|
@@ -2,25 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
# agentwatch
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Local observability + control plane for every AI coding agent on your machine.**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
A terminal live-tail *and* a browser dashboard — one process, one event
|
|
8
|
+
stream, served from `localhost`. Unified timeline across Claude Code,
|
|
9
|
+
Codex, Gemini CLI, Cursor, Hermes, and OpenClaw. Token + cost accounting,
|
|
10
|
+
compaction + anomaly detection, hybrid search, SVG call graphs,
|
|
11
|
+
monaco-style diff attribution, agent-aware replay ("what would the agent
|
|
12
|
+
say if I edited the prompt?"), policy editor, MCP server agents can query
|
|
13
|
+
their own history from, and an OpenTelemetry exporter with `gen_ai.*`
|
|
14
|
+
semantic conventions. All local. No cloud. No telemetry. No sign-in.
|
|
12
15
|
|
|
13
16
|
[](https://www.npmjs.com/package/@misha_misha/agentwatch)
|
|
14
17
|
[](https://github.com/mishanefedov/agentwatch/actions/workflows/ci.yml)
|
|
15
18
|
[](./LICENSE)
|
|
16
19
|
[](./package.json)
|
|
20
|
+
[](https://glama.ai/mcp/servers/mishanefedov/agentwatch)
|
|
17
21
|
|
|
18
22
|
</div>
|
|
19
23
|
|
|
20
24
|
<div align="center">
|
|
21
|
-
|
|
25
|
+
|
|
26
|
+
[](https://glama.ai/mcp/servers/mishanefedov/agentwatch)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div align="center">
|
|
31
|
+
<img src="./docs/timeline.png" alt="agentwatch web UI — unified timeline across 5 agents, each in its own workspace" width="1100" />
|
|
32
|
+
<br />
|
|
33
|
+
<img src="./docs/event-detail.png" alt="agentwatch event detail view — full command, tool I/O, usage + cost" width="1100" />
|
|
22
34
|
</div>
|
|
23
35
|
|
|
36
|
+
**The TUI is the live tail. The web UI is where you drill in** — projects,
|
|
37
|
+
sessions, token charts, compaction sparklines, SVG call graphs, diff
|
|
38
|
+
attribution, replay, anomaly triage, policy editing. Both run in one
|
|
39
|
+
process. Press `w` in the TUI to open the browser.
|
|
40
|
+
|
|
24
41
|
---
|
|
25
42
|
|
|
26
43
|
## Table of contents
|
|
@@ -63,6 +80,37 @@ stack, in the terminal, with zero infrastructure and zero network.**
|
|
|
63
80
|
|
|
64
81
|
---
|
|
65
82
|
|
|
83
|
+
## Why this over `claude-devtools` if you run multiple agents?
|
|
84
|
+
|
|
85
|
+
Short, factual diff. `claude-devtools` is a great tool for Claude-only
|
|
86
|
+
workflows — if you only use Claude Code, it's probably the better pick.
|
|
87
|
+
agentwatch is the answer when you run more than one agent on the same
|
|
88
|
+
machine and want one timeline + one cost ledger + one alerting surface
|
|
89
|
+
across all of them.
|
|
90
|
+
|
|
91
|
+
| What | claude-devtools | **agentwatch** |
|
|
92
|
+
| -------------------------------------------- | ----------------------- | ------------------------------------- |
|
|
93
|
+
| Claude Code coverage | ✅ full | ✅ full |
|
|
94
|
+
| Codex coverage | ❌ | ✅ tokens + tools + cost + compaction |
|
|
95
|
+
| Gemini CLI coverage | ❌ | ✅ tokens + tools + cost |
|
|
96
|
+
| OpenClaw coverage | ❌ | ✅ tokens + cost |
|
|
97
|
+
| Hermes Agent coverage | ❌ | ✅ tokens + tools + cost (SQLite) |
|
|
98
|
+
| Cursor coverage | ❌ | 🟡 config level |
|
|
99
|
+
| Per-agent budget alarms | ❌ | ✅ session + daily caps |
|
|
100
|
+
| Statistical anomaly detection (loops / spikes) | rule-based only | ✅ MAD z-score + period-1-to-4 loops |
|
|
101
|
+
| OpenTelemetry exporter (`gen_ai.*`) | ❌ | ✅ Jaeger / Tempo / Grafana ready |
|
|
102
|
+
| MCP server — agents query their own history | ❌ | ✅ 5 tools over stdio |
|
|
103
|
+
| User-defined regex/threshold triggers | ❌ | ✅ live-reloaded |
|
|
104
|
+
| Install | Homebrew / Electron ~150 MB | `npm i -g` · 220 KB · TUI |
|
|
105
|
+
| Data boundary | local | local |
|
|
106
|
+
|
|
107
|
+
If "every agent on one pane of glass + programmatic access via MCP +
|
|
108
|
+
pipeline-friendly OTel" matches your setup, agentwatch is the tool.
|
|
109
|
+
If you're Claude-only and want the Electron polish, `claude-devtools`
|
|
110
|
+
is still excellent.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
66
114
|
## Install
|
|
67
115
|
|
|
68
116
|
```bash
|
|
@@ -85,11 +133,18 @@ name was already taken by a CyberArk tool. The installed binary on your
|
|
|
85
133
|
|
|
86
134
|
```bash
|
|
87
135
|
agentwatch doctor # detects installed agents + readiness
|
|
88
|
-
agentwatch #
|
|
136
|
+
agentwatch # TUI live-tail + web UI at http://127.0.0.1:3456
|
|
137
|
+
agentwatch serve # web UI only (remote boxes / server cron)
|
|
89
138
|
agentwatch mcp # runs the MCP stdio server (for agents, not humans)
|
|
90
139
|
agentwatch --help
|
|
91
140
|
```
|
|
92
141
|
|
|
142
|
+
Flags:
|
|
143
|
+
|
|
144
|
+
- `--no-web` — TUI only, don't start the web server
|
|
145
|
+
- `--port <n>` / `--host <addr>` — override web server bind
|
|
146
|
+
- `AGENTWATCH_PORT=… AGENTWATCH_HOST=…` — env equivalents
|
|
147
|
+
|
|
93
148
|
`doctor` output looks like:
|
|
94
149
|
|
|
95
150
|
```
|
|
@@ -99,15 +154,40 @@ agents:
|
|
|
99
154
|
● Claude Code installed (events captured)
|
|
100
155
|
● Codex installed (events captured)
|
|
101
156
|
● Gemini CLI installed (events captured)
|
|
157
|
+
● Hermes Agent installed (events captured)
|
|
102
158
|
● Cursor installed (config-level only)
|
|
103
159
|
● OpenClaw installed (events captured)
|
|
104
160
|
○ Aider not detected
|
|
105
161
|
○ Cline (VS Code) not detected
|
|
106
162
|
```
|
|
107
163
|
|
|
108
|
-
Launch
|
|
109
|
-
|
|
110
|
-
|
|
164
|
+
Launch `agentwatch` and every event your agents emit streams in. The TUI
|
|
165
|
+
shows a live tail; the web UI at `http://127.0.0.1:3456` is where you
|
|
166
|
+
drill in — projects, sessions, token charts, SVG call graphs, diff
|
|
167
|
+
attribution, prompt replay, trends. Press `w` in the TUI to open it.
|
|
168
|
+
|
|
169
|
+
### Web UI map
|
|
170
|
+
|
|
171
|
+
| Route | What it is |
|
|
172
|
+
| ------------------------------------ | ------------------------------------------------------- |
|
|
173
|
+
| `/` | Live timeline (SSE-streamed) with agent + type filters |
|
|
174
|
+
| `/projects` | Grid of detected projects + cost + session counts |
|
|
175
|
+
| `/projects/:name` | Sessions table for one project |
|
|
176
|
+
| `/sessions/:id` | Chronological event list · export .md / .json |
|
|
177
|
+
| `/sessions/:id/tokens` | Stacked-area token chart per turn |
|
|
178
|
+
| `/sessions/:id/compaction` | Context fill % over time + compaction markers |
|
|
179
|
+
| `/sessions/:id/graph` | Call graph (d3-hierarchy SVG) — click nodes to drill |
|
|
180
|
+
| `/sessions/:id/diffs` | Writes paired with the prompt that triggered them |
|
|
181
|
+
| `/sessions/:id/replay` | Edit prompt → re-run the agent in single-turn exec |
|
|
182
|
+
| `/search` | Unified search (live / cross / semantic) |
|
|
183
|
+
| `/agents` | Grid of every supported agent + install status |
|
|
184
|
+
| `/permissions` | Per-agent permission config |
|
|
185
|
+
| `/cron` | OpenClaw cron jobs + heartbeats |
|
|
186
|
+
| `/trends` | Cost, cache-hit ratio, events per agent (30d default) |
|
|
187
|
+
| `/settings/{budgets,anomaly,triggers}` | Form editors for `~/.agentwatch/*.json` |
|
|
188
|
+
|
|
189
|
+
`⌘K` / `Ctrl+K` opens the command palette.
|
|
190
|
+
`/` focuses the timeline filter.
|
|
111
191
|
|
|
112
192
|
---
|
|
113
193
|
|
|
@@ -117,21 +197,22 @@ What actually works per agent, as of v0.0.3. Features not listed here
|
|
|
117
197
|
work across every agent (timeline, export, syntax highlighting, notifications,
|
|
118
198
|
triggers, search, stale detection, clipboard yank).
|
|
119
199
|
|
|
120
|
-
| Feature | Claude Code | Codex | Gemini CLI | Cursor | OpenClaw |
|
|
121
|
-
| ------------------------------ | :---------: | :---: | :--------: | :----: | :------: |
|
|
122
|
-
| Live events on timeline | ✅ | ✅ | ✅ | 🟡 | ✅ |
|
|
123
|
-
| Token usage + cost | ✅ | ✅ | ✅ | ❌ | ✅ |
|
|
124
|
-
| Tool call + result pairing | ✅ | ✅ | ✅ | ❌ | 🟡 |
|
|
125
|
-
| Per-turn token attribution | ✅ | ✅ | ✅ | ❌ | ✅ |
|
|
126
|
-
| Budget alarms (session + day) | ✅ | ✅ | ✅ | ❌ | ✅ |
|
|
127
|
-
| Anomaly detection (cost/loops) | ✅ | ✅ | ✅ | 🟡 | ✅ |
|
|
128
|
-
| Compaction visualizer | ✅ | ✅ | ❌ | — | ❌ |
|
|
129
|
-
| Permissions view | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
130
|
-
| Cross-session search | ✅ | ✅ | ✅ | ❌ | ❌ |
|
|
131
|
-
| Subagent drilldown | ✅ | — | 🟡 | — | 🟡 |
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
200
|
+
| Feature | Claude Code | Codex | Gemini CLI | Cursor | OpenClaw | Hermes |
|
|
201
|
+
| ------------------------------ | :---------: | :---: | :--------: | :----: | :------: | :----: |
|
|
202
|
+
| Live events on timeline | ✅ | ✅ | ✅ | 🟡 | ✅ | ✅ |
|
|
203
|
+
| Token usage + cost | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
|
|
204
|
+
| Tool call + result pairing | ✅ | ✅ | ✅ | ❌ | 🟡 | ✅ |
|
|
205
|
+
| Per-turn token attribution | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
|
|
206
|
+
| Budget alarms (session + day) | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
|
|
207
|
+
| Anomaly detection (cost/loops) | ✅ | ✅ | ✅ | 🟡 | ✅ | ✅ |
|
|
208
|
+
| Compaction visualizer | ✅ | ✅ | ❌ | — | ❌ | ❌ |
|
|
209
|
+
| Permissions view | ✅ | ✅ | ✅ | ✅ | ✅ | — |
|
|
210
|
+
| Cross-session search | ✅ | ✅ | ✅ | ❌ | ❌ | 🟡 |
|
|
211
|
+
| Subagent drilldown | ✅ | — | 🟡 | — | 🟡 | 🟡 |
|
|
212
|
+
| Replay (agent-aware exec) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
|
|
213
|
+
| Agent memory file overhead | `CLAUDE.md` | `AGENTS.md` | `GEMINI.md` | `.cursorrules` | `OPENCLAW.md` | `SOUL.md` |
|
|
214
|
+
| OTel span coverage | ✅ | ✅ | ✅ | 🟡 | ✅ | 🟡 |
|
|
215
|
+
| MCP server exposes history | ✅ | ✅ | ✅ (raw) | ❌ | ❌ | ❌ |
|
|
135
216
|
|
|
136
217
|
- **Cursor** exposes config state (MCP servers, `.cursorrules`, approval
|
|
137
218
|
mode, sandbox) but its actual AI activity lives in a SQLite database we
|
|
@@ -140,6 +221,12 @@ triggers, search, stale detection, clipboard yank).
|
|
|
140
221
|
compaction detection is Claude + Codex only.
|
|
141
222
|
- **OpenClaw** doesn't persist tool_result content or compaction markers
|
|
142
223
|
to its JSONL — structural limit of what's on disk, not an adapter gap.
|
|
224
|
+
- **[Hermes Agent](https://github.com/NousResearch/hermes-agent)** (by
|
|
225
|
+
Nous Research — the OpenClaw successor with a closed learning loop)
|
|
226
|
+
persists sessions to `~/.hermes/state.db` (SQLite + FTS5). The adapter
|
|
227
|
+
polls the DB over chokidar + 2s safety-net and emits the full
|
|
228
|
+
session/prompt/response/tool-call stream. Replay re-runs single turns
|
|
229
|
+
via `hermes chat -q <prompt> -Q --max-turns 1`.
|
|
143
230
|
|
|
144
231
|
---
|
|
145
232
|
|
|
@@ -153,11 +240,11 @@ Columns: time · agent · type · `[project]` summary · duration · error.
|
|
|
153
240
|
|
|
154
241
|
```
|
|
155
242
|
09:54:01 openclaw response [content_agent] <think> Checked the KB…
|
|
156
|
-
09:52:53 claude-code response [
|
|
243
|
+
09:52:53 claude-code response [example] Commit bddc363. q now exits instantly…
|
|
157
244
|
09:52:48 codex shell_exec [dataset_research] ls -la · 12ms
|
|
158
|
-
09:52:43 claude-code tool_call [
|
|
245
|
+
09:52:43 claude-code tool_call [example] Edit: src/ui/App.tsx · 7ms
|
|
159
246
|
09:51:51 gemini file_write [landing] write_file: public/llms.txt
|
|
160
|
-
09:51:51 claude-code tool_call [
|
|
247
|
+
09:51:51 claude-code tool_call [example] Agent: Competitive landscape ▸ 52 child events
|
|
161
248
|
```
|
|
162
249
|
|
|
163
250
|
Rows with an anomaly fire a red `◎` prefix on the type column.
|
|
@@ -406,6 +493,7 @@ clipboard (on explicit `y`) / disk (on explicit `e` to export).
|
|
|
406
493
|
| `~/.gemini/settings.json` + `trustedFolders.json` | Gemini permissions |
|
|
407
494
|
| `~/.openclaw/agents/*/sessions/*.jsonl` | OpenClaw sub-agent sessions |
|
|
408
495
|
| `~/.openclaw/logs/config-audit.jsonl` + `openclaw.json` | OpenClaw config audit + agent roster |
|
|
496
|
+
| `~/.hermes/state.db` (SQLite) | Hermes Agent sessions + messages |
|
|
409
497
|
| `~/.cursor/{mcp.json, cli-config.json, ide_state.json}` | Cursor config state |
|
|
410
498
|
| Any `.cursorrules` / `.cursor/rules/*.mdc` under WORKSPACE | Cursor project rules |
|
|
411
499
|
| `{CLAUDE,AGENTS,GEMINI,OPENCLAW}.md` + `.windsurfrules` etc. | Per-agent memory files for token attribution |
|
|
@@ -546,7 +634,7 @@ TypeScript monorepo. Three-layer mental model:
|
|
|
546
634
|
│ EventSink.emit / enrich
|
|
547
635
|
┌─────────────────────────┴───────────────────────────────────┐
|
|
548
636
|
│ Adapter layer (one per agent) │
|
|
549
|
-
│ claude-code · codex · gemini · cursor · openclaw
|
|
637
|
+
│ claude-code · codex · gemini · cursor · openclaw · hermes │
|
|
550
638
|
│ fs-watcher (generic) │
|
|
551
639
|
└─────────────────────────▲───────────────────────────────────┘
|
|
552
640
|
│ files read-only
|
|
@@ -595,7 +683,7 @@ Local-first is a hard invariant.
|
|
|
595
683
|
- **All files read-only** except the clipboard (on `y`) and `./agentwatch-export/` (on `e`).
|
|
596
684
|
- Every path agentwatch reads is documented in [SECURITY.md](./SECURITY.md).
|
|
597
685
|
|
|
598
|
-
Report vulnerabilities privately
|
|
686
|
+
Report vulnerabilities privately via a
|
|
599
687
|
[Security Advisory](https://github.com/mishanefedov/agentwatch/security/advisories/new).
|
|
600
688
|
|
|
601
689
|
---
|
package/bin/agentwatch.js
CHANGED
|
File without changes
|