iTranslated by AI
I Built an OSS to Monitor AI Agents
Changes Since Last Time
In the previous article (I Created a "Witness" for AI Agents), I wrote about the design philosophy of agentwit.
Why it was designed as a Witness, not a Guard.
To put it in a single phrase:
Blocking is easy. But if you can't prove "what happened" afterward, half of security is incomplete.
And now, agentwit has reached v0.3.0.
Before explaining the specifics of the changes, let me first write about why things turned out this way.
The "Another Problem" I Noticed
While building v0.1.0 and v0.2.0, a certain problem became apparent.
MCP server developers are struggling.
I built a tool for auditing. Logs can be captured. But there was no GUI to check whether the MCP server itself was working as intended.
Anthropic's official tool is CLI-only. Postman assumes REST and doesn't understand the MCP protocol.
Existing options:
CLI (mcp-inspector) → text-only, hard to debug
Postman → doesn't know MCP's JSON-RPC
Browser devtools → can't see streams
This meant that many developers get stuck at the stage before auditing.
v0.3.0: "Inspector" Joins the "Witness"
In v0.3.0, I implemented a desktop app called MCP Inspector.
agentwit v0.1.0~v0.2.0
→ Records "what happened" (Witness)
agentwit v0.3.0
→ Shows "what is happening" in real-time (Inspector)
→ Records "what happened" (Witness) ← still present
The two complement each other.
Debug with Inspector during development. The Witness records after production deployment. Everything is contained within the same tool.
What Makes the Inspector Different from Existing Tools
The MCP Inspector is a three-pane desktop application (built with Tauri + React).
Left panel Server info + Tool list (with READ/WRITE/EXEC tags)
Center panel Parameter input + JSON response (syntax highlighted)
Right panel Three tabs: History / Metrics / Compare
It's not just a GUI wrapper. There are three features not found in existing tools.
1. Cost Tracking
It records token consumption and USD cost estimates for each tool call.
enrich-cves: $0.0000 (NVD API only, no AI)
generate-exploit: $0.0028 (Claude API used)
full-chain-exploit: $0.0045 (multiple AI calls)
When running an MCP server in production, you can see at a glance which tools are consuming the most cost.
2. Session Comparison (Compare tab)
It compares two execution sessions using the LCS algorithm and displays a diff.
Use cases:
- When the same prompt is sent to GPT-4o and Claude, does the tool call pattern change?
- Has the response content changed before and after a version upgrade?
- Does a schema change impact existing calls?
This is a GUI-based, intuitive version of the agentwit diff (CLI command) described in the previous article.
3. Integration with agentwit Audit Log
When the "agentwit audit" button in the GUI header is turned on, all executions via the Inspector are recorded to ~/.agentwit/audit.jsonl.
Debugging operations during development are also captured in the same audit log as production.
Another Change: Support for the Standard MCP Protocol
Before the change:
Custom REST API (POST /generate-exploit)
→ Only connectable from the agentwit Inspector
After the change:
Standard MCP (added /mcp endpoint)
→ Connectable from Claude Desktop, Cursor, and any MCP client
By conforming to the standard, the world outside the tool has expanded.
Answer to "Why Build This Now?"
The reason I started building agentwit was written in the previous article.
The era is approaching when AI agents will operate as "corporate infrastructure." At that point, we need people who can answer what these agents did yesterday.
While building v0.3.0, I feel the scope of this question has broadened.
Not only "what is happening in production" but also "what was tested during development" should be recorded.
Bug reports, security audits, cost analysis—all of these start with logs.
What to Build Next
Let me honestly list the current shortcomings.
Functional aspects:
- Automatic tracking of MCP specification changes (monthly detection and automated testing)
- Inability to generate HTML reports directly from the GUI
- Insufficient real-environment testing of stdio transport
- Not yet tested on Windows
Quality aspects:
- Zero GUI tests (Rust code, React components)
- No auto-reconnect when the connection is lost
- Incomplete timeout handling
Priorities:
The most urgent is documentation. The GUI features are not described in the README. If the tool is publicly available but no one knows how to use it, it's meaningless.
Next is automatic tracking of MCP specification changes. The MCP specification is continuously updated. Before the tool itself becomes outdated, I need to build a mechanism to keep up.
Summary
agentwit has evolved from the "Witness proxy" of v0.1.0 to a "development debugger + production audit tool" in v0.3.0.
Its design philosophy remains unchanged: don't stop, don't modify, record.
But the "scenes to record" have expanded to include the development phase.
pip install agentwit
GitHub: https://github.com/tokotokokame/agentwit
Feedback, Stars, and PRs are welcome.
Discussion