Multi-agent observability: cascade failure detection, heartbeats, and forensic replay
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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
No install needed:
This seeds a 5-agent fleet, triggers a cascade failure, and shows you the full trace:
Requires Node 18+. Uses better-sqlite3 (native bindings, no external database needed).
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.
Set AGENTWATCH_DB to point to your database file. Default: agentwatch.db in the current directory.
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.
Requires optional peer deps @opentelemetry/api and @opentelemetry/sdk-trace-base.
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.
MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/agentwatch)<a href="https://allmcps.com/mcp/agentwatch"><img src="https://allmcps.com/api/badge/agentwatch?style=directory" alt="AgentWatch on AllMCPs" /></a>