@taewooopark/agent-blackbox 0.47.1 → 0.47.2
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 +89 -0
- package/package.json +19 -3
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Agent-Blackbox
|
|
2
|
+
|
|
3
|
+
**Open your coding agent's black box.**
|
|
4
|
+
|
|
5
|
+
A **local-first flight recorder and context-efficiency profiler** for **[Claude Code](https://www.claude.com/product/claude-code)** and **[OpenCode](https://opencode.ai)**. It turns every agent run into a **live, replayable map** of what the agent actually *did* — what it read, changed, ran, decided, delegated, blocked on, and verified — reconstructed from observed events, not from the agent's own summary. Then it **scores how economically the run used its context window** and tells you, concretely, how to make the next one cheaper and faster.
|
|
6
|
+
|
|
7
|
+
Everything runs on your machine. **No API key. Nothing leaves your computer.**
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<img src="https://raw.githubusercontent.com/TaewoooPark/Agent-Blackbox/main/docs/screenshots/session-map.jpeg" alt="Agent-Blackbox session map — a real multi-agent run rendered as a monochrome Mark Lombardi network of hollow rings and sweeping arcs, with a context-efficiency score on the right." width="100%">
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
> *"The transcript is what the agent said. The black box is what it did — and what it cost."*
|
|
14
|
+
|
|
15
|
+
## Quickstart
|
|
16
|
+
|
|
17
|
+
One command (needs Node 20+):
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Record Claude Code — nothing to install; the daemon tails the session
|
|
21
|
+
# transcripts it already writes (~/.claude/projects/)
|
|
22
|
+
npx @taewooopark/agent-blackbox up --host claude-code
|
|
23
|
+
|
|
24
|
+
# …or record OpenCode (installs the recorder into OpenCode's global plugin dir)
|
|
25
|
+
npx @taewooopark/agent-blackbox up
|
|
26
|
+
|
|
27
|
+
# …or record both hosts at once, into one dashboard
|
|
28
|
+
npx @taewooopark/agent-blackbox up --host all
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
It starts a local daemon and **opens the dashboard** at `http://127.0.0.1:5173/`. Now use your agent exactly the way you already do — the map fills in live:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
claude # Claude Code, in any folder — zero setup, just run it
|
|
35
|
+
opencode # …or OpenCode (terminal or the desktop app)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Stop recording any time with `npx @taewooopark/agent-blackbox uninstall`.
|
|
39
|
+
|
|
40
|
+
## Why
|
|
41
|
+
|
|
42
|
+
You can't just **ask** an agent what a task cost. A 2026 study of eight frontier models on agentic coding found they predict their own token usage with a correlation of just **0.39 — and systematically underestimate** the bill; the same task varies **up to 30×** in tokens, and agentic runs burn **~1000× more tokens** than ordinary coding. So don't ask — **measure.**
|
|
43
|
+
|
|
44
|
+
<sub>Bai et al., *How Do AI Agents Spend Your Money?*, [arXiv:2604.22750](https://arxiv.org/abs/2604.22750) (2026).</sub>
|
|
45
|
+
|
|
46
|
+
## What you get
|
|
47
|
+
|
|
48
|
+
| Feature | What it does |
|
|
49
|
+
|---|---|
|
|
50
|
+
| **Live session map** | the run forms in real time — reads, edits, commands, subagents, decisions — over a WebSocket, no refresh |
|
|
51
|
+
| **Replay** | scrub the timeline to any moment; the graph and files rewind to that exact point |
|
|
52
|
+
| **Subagent genealogy** | real delegations fork into their own lane, attributed to the subagent that did the work |
|
|
53
|
+
| **Context-efficiency score** | cache reuse, redundant re-reads, read-vs-edit amplification, oversized tool dumps, retry waste — with reclaimable tokens |
|
|
54
|
+
| **Concrete fixes** | rule-based by default, or tailored by a **free/local model with no API key** — and optionally written back to `AGENTS.md` so the next run avoids the waste |
|
|
55
|
+
| **Handoff export** | one-click Markdown summary (objective, files, decisions, blockers, next step) to resume elsewhere |
|
|
56
|
+
| **Local-first** | traces stay on your machine; prompts, secrets, and file contents are redacted by default |
|
|
57
|
+
|
|
58
|
+
<p align="center">
|
|
59
|
+
<img src="https://raw.githubusercontent.com/TaewoooPark/Agent-Blackbox/main/docs/screenshots/features.jpeg" alt="Four-panel overview: the live session map, the same console in dark mode, the context-efficiency co-pilot with metric meters, and the handoff export panel." width="100%">
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
## Hosts
|
|
63
|
+
|
|
64
|
+
- **Claude Code** — **no install at all.** The daemon tails the JSONL transcripts the CLI already writes, so any folder, any session is recorded the moment you run `claude`. Add `--optimize` to also install the opt-in in-run actuator hooks.
|
|
65
|
+
- **OpenCode** — records via a recorder dropped into OpenCode's **global** plugin directory (`~/.config/opencode/plugins/`), so any session is captured, the desktop app included. Scope to one project with `up --project <dir>`.
|
|
66
|
+
|
|
67
|
+
## Common flags
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
up --host claude-code|opencode|all # which agent(s) to record (default: opencode)
|
|
71
|
+
up --suggest free # tailored fixes from a rotating pool of free models
|
|
72
|
+
up --port 48000 --ui-port 4000 # custom daemon / dashboard ports
|
|
73
|
+
up --no-open # don't auto-open the browser
|
|
74
|
+
uninstall # remove the global recorder (+ any Claude Code hooks)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Documentation
|
|
78
|
+
|
|
79
|
+
Full docs, screenshots, architecture, and the optimization actuator:
|
|
80
|
+
**https://github.com/TaewoooPark/Agent-Blackbox**
|
|
81
|
+
|
|
82
|
+
[English](https://github.com/TaewoooPark/Agent-Blackbox/blob/main/README.md) ·
|
|
83
|
+
[한국어](https://github.com/TaewoooPark/Agent-Blackbox/blob/main/README.ko.md) ·
|
|
84
|
+
[中文](https://github.com/TaewoooPark/Agent-Blackbox/blob/main/README.zh.md) ·
|
|
85
|
+
[日本語](https://github.com/TaewoooPark/Agent-Blackbox/blob/main/README.ja.md)
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT © [Taewoo Park](https://taewoopark.com)
|
package/package.json
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taewooopark/agent-blackbox",
|
|
3
|
-
"version": "0.47.
|
|
4
|
-
"description": "Local-first flight recorder + context-efficiency profiler for coding agents
|
|
3
|
+
"version": "0.47.2",
|
|
4
|
+
"description": "Local-first flight recorder + context-efficiency profiler for coding agents — records Claude Code and OpenCode. Run with npx.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"claude-code",
|
|
7
|
+
"opencode",
|
|
8
|
+
"coding-agent",
|
|
9
|
+
"observability",
|
|
10
|
+
"flight-recorder",
|
|
11
|
+
"context-engineering",
|
|
12
|
+
"token-efficiency",
|
|
13
|
+
"local-first",
|
|
14
|
+
"ai-agents"
|
|
15
|
+
],
|
|
5
16
|
"type": "module",
|
|
6
17
|
"license": "MIT",
|
|
7
18
|
"repository": {
|
|
8
19
|
"type": "git",
|
|
9
20
|
"url": "git+https://github.com/TaewoooPark/Agent-Blackbox.git"
|
|
10
21
|
},
|
|
22
|
+
"homepage": "https://github.com/TaewoooPark/Agent-Blackbox#readme",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/TaewoooPark/Agent-Blackbox/issues"
|
|
25
|
+
},
|
|
11
26
|
"bin": {
|
|
12
27
|
"agent-blackbox": "dist/cli.js"
|
|
13
28
|
},
|
|
14
29
|
"files": [
|
|
15
|
-
"dist"
|
|
30
|
+
"dist",
|
|
31
|
+
"README.md"
|
|
16
32
|
],
|
|
17
33
|
"engines": {
|
|
18
34
|
"node": ">=20"
|