
AgentWatch
io.github.nicofains1由 GitHub 帳號 nicofains1 發布v0.3.1更新於 Oct 25, 2026
Multi-agent observability: cascade failure detection, heartbeats, and forensic replay
概覽
AgentWatch 是本地 MCP 伺服器,讓助理檢視多代理機群:心跳、跨代理追蹤、串聯故障根因、告警與重播。
- 可以做什麼
- 讀取機群健康狀態與儀表板,包括文字儀表板、各代理健康狀態、近期失敗與作用中告警,並可解決告警、為代理回報心跳。建立追蹤 ID 並記錄跨代理關聯的追蹤事件,再讀取某筆追蹤的事件。從失敗事件往回追溯根因,並重播一筆追蹤內的所有串聯鏈。所有資料保存在本機 SQLite 檔案中。
- 適用情境
- 適用於執行多代理系統(CrewAI、AutoGen、LangGraph、PocketFlow 或自訂框架),並希望助理判斷哪個代理引發故障串聯、查看機群健康,或在事故後檢視追蹤的情況。
- 執行需求
- 透過 npx 以本機 stdio 程序執行,需要 Node.js 18 以上版本。npm 套件 @nicofains1/agentwatch 使用 better-sqlite3 原生繫結。環境變數 AGENTWATCH_DB 指定 SQLite 資料庫路徑,預設為目前目錄下的 agentwatch.db。未宣告驗證。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AgentWatch,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
來源:README.md,提交 d063d0d
工具
0版本歷史
1- v0.3.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分