
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 分