AGENT MONITOR v4.1.1
Agent Monitor v4.1.1 Production Hardening & Auto Git Exclusion

Treat AI Agent Actions as Untrusted Syscalls.

The deterministic, local-first runtime control plane for autonomous coding agents. Intercept shell execution, contain filesystem paths, redact leaked secrets, enforce human approval gates, and chain tamper-proof SHA-256 audit logs before code runs on your host machine.

$ npx @agent-monitor/cli check --command "git push origin main"
Test Interactive Simulator View 14-Stage Invariant Quickstart Setup
14 Stages
Universal Control Boundary
206 / 206
Adversarial Tests Passing
SQLite WAL
100% Local-First Engine
< 1ms
Interception Overhead
Architectural Reality

Prompt Engineering is Not a Security Boundary.

When an autonomous coding agent executes shell commands and writes to disk, relying on system prompts is mathematically unsafe against prompt injection, malicious repo files, or hallucinations.

Prompt-Layer "Safety" (Probabilistic)

System prompts asking the LLM: "Please do not delete user files, inspect .env, or push to git without asking".

  • Indirect Prompt Injections: Untrusted text inside downloaded packages or READMEs easily overrides instructions.
  • No True Containment: Path traversal escapes (../../etc/passwd) via symlinks, URL encoding, or relative paths.
  • Silent Credential Exfiltration: The model reads secrets from disk and transmits them in follow-up network calls.
  • Unchecked Loops: No authoritative circuit breaker if the model hallucinate-loops destructive actions.
Enforcement: Zero guarantees. Fails closed = 0%.

Agent Monitor Runtime Plane (Deterministic)

Every tool call, MCP stdio packet, and shell execution is intercepted outside the LLM context before it hits the operating system.

  • 14-Stage Control Boundary: Strict payload bounds, canonicalization, and RFC 8089 URI normalization.
  • Deterministic Policy AST: Mathematical additive specificity: DENY > ASK > ALLOW.
  • Deep Secret Redactor: Strips OpenAI, AWS, GitHub tokens, and private keys before returning output.
  • Authoritative Kill Switch: Instantly halts runaway processes via atomic SQLite WAL state.
Enforcement: Authoritative fail-closed runtime barrier.
Real-Time Playground

Policy Evaluation Simulator

Test how the deterministic engine inspects commands, evaluates risk scores, and resolves decisions.

agent-monitor check --dry-run
14-Stage Universal Boundary
Preset Scenarios:
Fail-Closed Guarantee

The 14-Stage Security Invariant

Every agent operation and MCP tool call traverses all 14 stages in strict chronological order. No tool can bypass any step.

STAGE 01 INGRESS

Payload & Argument Bounds

Enforces 10MB JSON-RPC message framing and 1MB argument caps to neutralize memory exhaustion & crash vectors.

STAGE 02 KILL SWITCH

Authoritative Circuit Breaker

Atomic pre-execution check against SQLite WAL. Instantly halts runaway agent sessions across CLI and Web UI.

STAGE 03 ISOLATION

Sticky Source Quarantine

Permanently quarantines malicious or altered MCP sources in SQLite. Blocks subsequent invocations immediately.

STAGE 04 RATE LIMIT

Sliding Window Protection

Restricts tool calls to 60 requests/minute per session to stop infinite recursive loops and rapid resource exhaustion.

STAGE 05 CANONICALIZE

Command Normalization

Standardizes shell commands, strips privilege wrappers (sudo, env, bash -c), and normalizes package manager aliases.

STAGE 06 CONTAINMENT

Workspace Path Guardrails

Unicode NFC normalization, multi-pass URL decoding (%252e%252e), symlink resolution, and cross-drive isolation.

STAGE 07 RISK ENGINE

Risk & Mutation Scoring

Calculates deterministic 0–100 CWE risk score. Detects tool schema mutations (rug-pulls) via SHA-256 fingerprints.

STAGE 08 POLICY AST

Deterministic Evaluation

Mathematical additive specificity resolution. Strictest decision always takes precedence: DENY > ASK > ALLOW.

STAGE 09 HUMAN GATE

Interactive Human Approval

Interactive confirmation prompt in terminal CLI or 1-click modal in the Web Operations Dashboard before execution.

STAGE 10 REVALIDATION

Post-Approval Re-Check

Prevents time-of-check to time-of-use (TOCTOU) exploits. Revalidates action context hash, expiration timeouts, and kill switch.

STAGE 11 EXECUTION

Bounded Process Execution

Execution in bounded child process with strict 30-second timeout, memory bounds, and idempotency guarantees.

STAGE 12 DATA PRIVACY

Deep Secret Redaction

Automatic deep redaction for OpenAI, AWS, GitHub tokens, and private keys. Detects multi-step file exfiltration patterns.

STAGE 13 CRYPTOGRAPHY

SHA-256 Audit Chaining

Every event is cryptographically hashed with its predecessor into SQLite WAL. Detects any offline tampering or log deletion.

STAGE 14 INCIDENT OPS

Incident Escalation

Automated security incident creation and live SSE broadcasting to operations dashboards and security teams.

Zero Trust Syscall Model Fail-closed default across all stages
Local-First Topology

Architecture & Execution Flow

Transparently sits between agent frameworks and the operating system with zero external cloud dependencies.

+-----------------------------------------------------------------------------------------+
|                                Autonomous AI Agent Runtime                              |
|               (Claude Desktop / Cursor / Windsurf / Custom LangChain / AutoGPT)         |
+-----------------------------------------------------------------------------------------+
                                             |
                     [stdio / JSON-RPC / CLI / Programmatic SDK]
                                             v
+-----------------------------------------------------------------------------------------+
|                           AGENT MONITOR RUNTIME CONTROL PLANE                           |
|                                                                                         |
|   1. Ingress Bounds   -->  2. SQLite Kill Switch  -->  3. Source Quarantine             |
|   4. Rate Limiting    -->  5. Canonicalization    -->  6. RFC 8089 Path Containment    |
|   7. CWE Risk Engine  -->  8. Specificity AST     -->  9. Human Approval Gate           |
|                                                                                         |
|                         [ POLICY DECISION RESOLUTION ]                                  |
|               +--------------------+--------------------+                               |
|               |                    |                    |                               |
|          [ DENY ]               [ ASK ]             [ ALLOW ]                           |
|     (Halt & Log Event)     (Wait for Human)    (Proceed to Exec)                        |
|                                    |                    |                               |
|                                    +---------+----------+                               |
|                                              |                                          |
|                                     10. TOCTOU Recheck                                  |
|                                     11. Controlled Execution (30s timeout)              |
|                                     12. Deep Secret Redaction                           |
|                                     13. SHA-256 Ledger Chaining                         |
|                                     14. Incident SSE Stream                             |
+-----------------------------------------------------------------------------------------+
                     |                                       |
                     v                                       v
+----------------------------------------+   +--------------------------------------------+
|            Host Environment            |   |             Local SQLite WAL               |
|      (OS Shell, Filesystem, Git)       |   |     (.agent-monitor/agent-monitor.db)      |
|    - Contained within workspace        |   |   - Cryptographic hash-chained events      |
|    - Stripped of leaked credentials    |   |   - Auto-excluded from Git commits         |
+----------------------------------------+   +--------------------------------------------+
        
Core Capabilities

Engineered for Autonomous Reliability

Transparent MCP Proxy

Drop-in stdio proxy for Claude Desktop, Cursor, and Windsurf. Wraps untrusted MCP servers and sanitizes tool calls in real time.

tools/call & resources/read

Authoritative Kill Switch

Atomic circuit breaker backed by SQLite WAL. If an agent hallucinates or loops destructive commands, stop it immediately from CLI or Web UI.

Pre & Post Recheck

Deep Secret Redaction

Automated scanning and redaction of OpenAI, AWS, GitHub tokens, JWTs, and private SSH keys before command outputs reach the LLM.

Zero Token Leaks

Zero-Config Git Exclusion

Automatically registers .agent-monitor/ into .git/info/exclude and .gitignore. Your internal databases are never published to GitHub.

Auto Git Protection

Cryptographic Audit Ledger

Genesis validation, exact sequence monotonicity, and SHA-256 recursive canonicalization guarantees audit trail tamper detection.

agent-monitor audit

Web Operations Dashboard

Lightweight embedded Next.js dashboard with live SSE streaming, visual file diffs, session history dropdown, and incident management.

agent-monitor server
Installation & Quickstart

Get Started in Seconds

Zero external daemons. Zero PostgreSQL or Redis required. Embedded SQLite WAL persistence out of the box.