Vigil

by alexlaguardia

Not rated
GitHub

About

Cognitive infrastructure for AI agents — awareness daemon, frame-based tool filtering, signal protocol, session handoff, and event triggers.

Details

Author
alexlaguardia
Categories
Developer Tools

Setup

Install Vigil in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/alexlaguardia/Vigil

Follow the installation instructions in the repository README, then restart your MCP client.

Observability and awareness infrastructure for AI agents.

- MCPWatch— the silent-failure watchdog for MCP servers. One-line instrumentation for any Python MCP server (FastMCP and low-levelmcp.server.lowlevel.Server). Gateways and dashboards already give you latency and error charts. The thing nobody catches is the call thatlookssuccessful but returns nothing: empty, null, or blank content with no error raised. MCPWatch flags those as a distinctsilentstatus, on top of per-tool latency (p50/p95/p99), error rates, andisErrorresponses. Used in production across 95+ MCP tools.
- Awareness platform— daemon-compiled context, signal protocol, session handoff, frame-based tool filtering, MCP server. The nervous system layer most agent frameworks skip.

Most agent memory tools are filing cabinets. Vigil is a stethoscope and a nervous system.

MCP servers fail silently.A tool returns empty content, the SDK swallows the exception, the agent treats it as "no results found" and you find out three days later from a customer ticket. Latency and error monitoring is now table stakes (gateways, OpenTelemetry, and FastMCP itself emit it). But none of them flag the empty-but-not-errored response — the failure mode your agent quietly hallucinates around. That gap is what MCPWatch exists to close.

Agents forget everything between sessions.They load all tools regardless of context (wasting 50K+ tokens). They can't coordinate across sessions or hand off work to each other. Every conversation starts cold.

MCPWatch — the MCP silent-failure watchdog— One line wraps any Python MCP server (FastMCP or low-levelmcp.server.lowlevel.Server). Its headline job: detect silent failures — calls that return empty, null, or blank content with no error raised — and record them as a distinctsilentstatus that shows up in health, per-tool stats, and alerts. It also tracks tool-call latency (p50/p95/p99), per-tool error rates,isErrorresponses, and call volume over time. REST API, CLI, and alert hooks. MIT, no config required.

Awareness Daemon— A background process compiles system state every 90 seconds. Agents boot with pre-compiled context in <1 second. No startup latency, no "remind me what we were doing."

Frame-Based Tool Filtering— Tag tools with context frames. An agent in "backend" mode sees 14 tools, not 95. Saves 50-90% of tool-definition tokens per session.

Signal Protocol— Lightweight event bus with content budgets. Agents emit signals (max 300-800 chars by type), the daemon synthesizes them into awareness. Agents coordinate without direct communication.

Session Handoff— Agents end sessions with structured summaries (files touched, decisions, next steps). The next agent boots with full context of what happened and what to do next.

Signal Compaction— Old signals get summarized, not deleted. Tiered retention (raw → daily → weekly → monthly) keeps context fresh without losing history.

MCP Server— Expose Vigil as an MCP tool server. Any Claude Code, Claude Desktop, Cursor, or Windsurf agent connects and gets persistent awareness instantly.

- Your MCP Servers Are Flying Blind (Here's How to Fix It)— MCPWatch deep dive on Dev.to

# Core library (daemon, signals, handoff, compaction) pip install vigil-agent # With MCP server support pip install vigil-agent[mcp]
pip install vigil-agent vigil init vigil signal my-agent "Hello from Vigil!" vigil status
Current Awareness ───────────────── Agents: my-agent (1 signal) Latest: "Hello from Vigil!" (just now) Frame: default Status: active — 1 unacknowledged signal

That's it — your agent has awareness. Read on for the full quickstart with daemon, handoff, and MCP server.

# Initialize vigil init # Emit a signal vigil signal my-agent "Deployed new API endpoint" # Start the daemon (compiles awareness every 90s) vigil daemon start # Check awareness vigil status # See what agents boot with vigil boot --json # End a session with a structured handoff vigil handoff my-agent "Shipped auth module" --files "auth.py, tests.py" --next-steps "Write docs" # Resume from where the last agent left off vigil resume next-agent # Start as an MCP server (Claude Code / Claude Desktop) vigil serve # Run signal compaction manually vigil compact --dry-run

Vigil runs as an MCP server so any AI agent can connect and get persistent awareness.

# stdio (Claude Code, Claude Desktop) vigil serve # SSE (remote clients) vigil serve --transport sse --port 8300

Claude Desktop config(claude_desktop_config.json):

{ "mcpServers": { "vigil": { "command": "vigil", "args": ["serve"] } } }
from vigil.registry import tool, get_tools, tool_count # Tag tools with frames @tool(name="deploy", description="Deploy to production", frames=["backend", "devops"]) async def deploy(args): return {"content": [{"type": "text", "text": f"Deployed {args['service']}"}]} @tool(name="render", description="Render component", frames=["frontend"]) async def render(args): ... @tool(name="health", description="Health check", frames=["core"]) # Always visible async def health(args): ... # Filter by context tool_count() # 3 (all tools) tool_count("backend") # 2 (deploy + health) tool_count("frontend") # 2 (render + health)
from vigil import SignalCompactor compactor = SignalCompactor(db) # Run compaction (tiered: raw → daily → weekly → monthly) stats = compactor.compact() # {'daily_summaries': 5, 'weekly_digests': 2, 'monthly_snapshots': 1, 'signals_compacted': 47} # Browse compacted history history = compactor.get_history(days=30, agent="backend-agent")
Agents emit signals → SQLite → Daemon compiles → Hot context → Agents boot instantly ↓ Frame detection Awareness synthesis Signal compaction Focus queue

- Zero infrastructure— SQLite storage, no Redis/Postgres/Docker required
- Framework-agnostic— Works with any MCP-compatible client, or standalone
- Lightweight— Pure Python, no heavy dependencies (mcp is optional)

Ready-to-use configs for popular AI tools. See theexamples/directory for full setup guides.

# Bash source completions/vigil.bash # Zsh cp completions/vigil.zsh ~/.zsh/completions/_vigil

Monitor any MCP server with one line of code. Tracks tool calls, latency, errors, and emits alerts automatically.

from mcp.server.fastmcp import FastMCP from vigil.mcpwatch import instrument mcp = FastMCP("my-server") @mcp.tool() async def search(query: str) -> str: return "results" # One line — all tools are now monitored watch = instrument(mcp)

- Silent failures— calls that return empty, null, or blank content with no error raised. Recorded as a distinctsilentstatus, surfaced in health and stats, and alerted on. This is the headline feature.
- Every tool call: name, duration, success / error / silent
- Latency spikes (configurable threshold, default 5s)
- Error patterns with full tracebacks (including low-levelisErrorresponses)
- Server silence (no calls at all for N minutes)

# 1. Local Vigil — store in same DB as your signals watch = instrument(mcp, db_path="vigil.db") # 2. Vigil Cloud — send to your hosted instance watch = instrument(mcp, api_key="vgl_...") # 3. Memory-only — just in-process stats watch = instrument(mcp)
health = watch.health() # {'server': 'my-server', 'status': 'degraded', 'total_calls': 1247, # 'total_errors': 25, 'error_rate': 0.02, # 'total_silent': 140, 'silent_rate': 0.112, # <- the failures nobody else flags # 'tools': {'search': {'avg_ms': 42, 'p95_ms': 180, 'silent_count': 140}}} watch.recent_silent() # the actual empty/null calls, per tool

A tool that returns"",None, or[]with no exception is the classic MCP blind spot — the SDK reports success, your agent improvises around the void. MCPWatch turns that into a first-class signal.

vigil mcp-health # All monitored servers vigil mcp-health -s my-server # Specific server

Vigil is the nervous system. Others are the filing cabinet. Use them together — Vigil handles awareness and coordination, Mem0/Letta handles deep memory.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Create crafted UI components inspired by the best 21st.dev design engineers.

Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent

ALAPI MCP Tools,Call hundreds of API interfaces via MCP

AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform

MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.

APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

Build and deploy full-stack Next.js apps with 98 tools for React, AWS, and MongoDB

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.