
AgentWatch
io.github.nicofains1Published by GitHub account nicofains1v0.3.1Updated Oct 25, 2026
Multi-agent observability: cascade failure detection, heartbeats, and forensic replay
Overview
AgentWatch is a local MCP server that lets an assistant inspect multi-agent fleets: heartbeats, cross-agent traces, cascade root causes, alerts and replays.
- What you can do
- Read fleet health and dashboards, including a text dashboard view and per-agent health statuses and recent failures and active alerts, plus resolve alerts and record heartbeats for agents. Create trace IDs and record trace events linking actions across agents, then read a trace's events. Walk backward from a failure to its root cause and replay all cascade chains within a trace. All data is kept in a local SQLite file.
- When to use it
- Useful when you run multi-agent systems (CrewAI, AutoGen, LangGraph, PocketFlow or custom) and want an assistant to diagnose which agent started a failure cascade, check fleet health, or review a trace after an incident.
- Requirements
- Runs as a local stdio process via npx, so Node.js 18 or newer is needed. The npm package @nicofains1/agentwatch uses better-sqlite3 native bindings. The AGENTWATCH_DB environment variable sets the SQLite database path; it defaults to agentwatch.db in the current directory. No authentication is declared.
Installation
In SourceWeft
- Open AgentWatch in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
agentwatch
Your agent swarm crashed at 2am. You have logs from 10 agents and no idea which one started the cascade. AgentWatch tells you.
It tracks heartbeats, links actions across agents, walks backward from any failure to the root cause, and replays the full sequence. Works with any agent framework (CrewAI, AutoGen, LangGraph, PocketFlow, custom). Stores everything in a local SQLite file.
Early stage. Issues and feedback welcome: https://github.com/nicofains1/agentwatch/issues
See it in action
No install needed:
This seeds a 5-agent fleet, triggers a cascade failure, and shows you the full trace:
Install
Requires Node 18+. Uses better-sqlite3 (native bindings, no external database needed).
Quick start
What it does
Heartbeats - Each agent calls aw.report(name, status) on a schedule. AgentWatch tracks health over time and marks agents as stale or offline based on configurable thresholds.
Cross-agent tracing - Actions are linked by trace ID and optional parent event ID. When agent-c fails because agent-b sent bad data that came from agent-a, the full chain is queryable.
Cascade detection - correlate(failureEventId) walks backward from any failure to the root cause, returning the full chain with timing and output at each step.
Alert de-duplication - The same alert type from the same agent within a time window collapses into one entry with an incrementing count. Severity auto-escalates: info (1x) -> warning (3x) -> critical (10x).
Forensic replay - replay(traceId) returns all cascade chains within a trace. Useful for post-mortem analysis when a single trace touched multiple agents.
OpenTelemetry export - Export traces as OTEL spans (GenAI semantic conventions). Works with Jaeger, Grafana, or any OTEL-compatible backend. Requires optional peer deps.
CLI
Set AGENTWATCH_DB to point to your database file. Default: agentwatch.db in the current directory.
MCP server
AgentWatch runs as an MCP server. Add it to your Claude Code or Cursor config:
Claude Code (~/.claude/claude_desktop_config.json or .claude/settings.json):
Cursor (.cursor/mcp.json):
This exposes 13 tools: agentwatch_dashboard, agentwatch_report_heartbeat, agentwatch_trace, agentwatch_cascade, agentwatch_replay, agentwatch_get_alerts, agentwatch_get_failures, agentwatch_get_trace, agentwatch_fleet_health, agentwatch_create_trace_id, agentwatch_alert, agentwatch_resolve_alert, agentwatch_dashboard_text.
API reference
Constructor
Heartbeats
Tracing
Cascade detection
Alerts
Dashboard
OpenTelemetry export
Requires optional peer deps @opentelemetry/api and @opentelemetry/sdk-trace-base.
Storage
SQLite via better-sqlite3. The database file is created automatically on first use. WAL mode is on for concurrent reads.
Tables: heartbeats, trace_events, alerts.
License
MIT
Source: README.md at commit d063d0d
Tools
0Version history
1- v0.3.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts