AgentGuard Iridescent 3D Glass Shield
LOCAL-FIRST RUNTIME SECURITY & MCP HUB

Runtime security &
governance for
autonomous agents.

A lightweight local daemon that observes and governs every prompt, tool argument, secret, and loop across OpenCode, Claude Code, Codex CLI, and MCP clients. With 5-tier deterministic-to-neural inspection, Threat-RAG + ColBERT MaxSim, and GraphRAG 3-hop attack lineage.

$curl -fsSL https://raw.githubusercontent.com/Sajib023/AgentGuard/main/install.sh | bash
EXPLORE GITHUB
5 Tiers
Defense in Depth
< 2ms
Regex Evaluation
100%
Local & Private
3-Hop
GraphRAG Lineage
ARCHITECTURE

Zero-trust governance
for the agentic era.

5-Tier Sequential Firewall Pipeline

Every inbound prompt and tool argument runs sequentially through 21 regex rules, structural and homoglyph heuristics, in-place secret redaction (AWS, GitHub, OpenAI), Threat-RAG + ColBERT MaxSim reranker, and local Llama Guard 3.

T1: 21 Regex RulesT2: Base64 UnpackerT3: Secret RedactorT3.5: Threat-RAG & GraphRAGT4: Llama Guard 3

GraphRAG Attack Lineage

Detects 3-hop credential exfiltration paths across multi-turn sessions (AML.T0048) before data hits external sockets.

Circuit Breaker & Loop Guard

Enforces hard token, cost, and error ceilings. Intercepts infinite A-B tool cycles and sliding-window entropy collapse with automated SIGTERM termination.

MCP Governance Hub

3 built MCP servers (firewall, breaker, lineage) + 3 external connectors with strict least-privilege role boundaries over stdio, SSE, and JSON-RPC 2.0.

FOUR DEFENSE PILLARS

Defense in depth.
Local by design.

Every layer executes on your machine. Deterministic rules, contextual semantic chunking, and local open-weight safety models operate without external API dependencies.

TIER 1 - 5 FIREWALL
TIER 1 - 5 FIREWALL

Deterministic regex to local Llama Guard 3

Evaluates every inbound prompt, tool argument, and untrusted output across 21 high-confidence regex rules, structural heuristics, recursive Base64 decoding, in-place secret redaction, and local MLCommons hazard classification (S1-S15).

21
regex rules
< 2ms
deterministic latency
100%
local execution
THREAT-RAG & GRAPHRAG
THREAT-RAG & GRAPHRAG

Contextual retrieval & 3-hop attack lineage

Cuts policies at semantic valleys (< 0.38 cosine), injects Anthropic-style contextual prefixes, and reranks with ColBERT Late-Interaction MaxSim. Correlates multi-turn tool traces to catch credential exfiltration chains (MITRE AML.T0048).

55%
ColBERT weight
3-Hop
attack graph traversal
SQLite
dual dense+token index
CIRCUIT BREAKER
CIRCUIT BREAKER

Behavioral loop detection & budget shields

Enforces hard ceilings on tokens, iterations, USD cost, and consecutive tool errors. Actively detects infinite A-B-A-B tool oscillation, repeat argument cycling, and sliding-window entropy collapse with automatic SIGTERM termination.

6
tracked budgets
0
runaway loop drain
SIGTERM
process kill switch
MODEL CONTEXT PROTOCOL (MCP)
MODEL CONTEXT PROTOCOL (MCP)

Standardized MCP host & permission gateway

Exposes 3 built-in MCP servers (firewall, breaker, lineage) over stdio, SSE, and Streamable HTTP JSON-RPC 2.0. Enforces strict least-privilege boundaries across external connectors (read-only Postgres, scoped GitHub, allowlisted Fetch).

6
MCP servers
10
governed tools
3
transports (stdio/SSE/RPC)
INSPECTION PIPELINE

From prompt to verified verdict
in four stages.

01

Intercept

Hooks observe user prompts, pre-tool arguments, and tool outputs before execution occurs in OpenCode, Claude Code, or Codex CLI.

02

Sanitize

Secrets (AWS, GitHub, PEM keys) are redacted in place. Base64 is recursively unpacked and re-scanned for obfuscated payloads.

03

Correlate

Contextual RAG evaluates ColBERT MaxSim against MITRE ATLAS while the Knowledge Graph evaluates 3-hop exfiltration lineage.

04

Enforce

The policy voter selects the decisive action: allow, sanitize in-place, hold for operator approval, or immediately block.

AMOLED DEVELOPER DASHBOARD

Live telemetry,
lineage & approvals.

Shipped as a built-in React app served directly by the core service at http://127.0.0.1:8907/ with zero cloud dependencies.

AGENTGUARD AMOLED DASHBOARD — http://127.0.0.1:8907ENFORCE MODE
Active Sessions
4 live
Hooks auto-wired
Firewall Interceptions
142 checks
12 sanitized · 3 blocked
Circuit Breaker
$0.42 / $5.00
8% token budget used
Context Pack Exporter
⬇ .MD⬇ .JSON
LIVE WS TELEMETRY STREAM (/v1/ws)CONNECTED · 0ms LATENCY
2026-10-24 21:48:02.149Claude CodePreToolUse(bash)
GraphRAG 3-Hop Exfiltration (AML.T0048)BLOCK
2026-10-24 21:47:58.912OpenCodeprompt.sanitize
Redacted GitHub PAT token [REDACTED:github_pat]SANITIZE
2026-10-24 21:47:45.301Codex CLIPreToolUse(edit)
Deterministic regex pass · Llama Guard cleanALLOW
2026-10-24 21:47:20.088OpenCodecircuit.eval
Repeated tool args pattern detected (A-B loop 3x)WARN
Developer Experience

Built for developers.
Loved by teams.

bash — hardware pre-flight
# Install AgentGuard with strict hardware checks
$ curl -fsSL https://raw.githubusercontent.com/Sajib023/AgentGuard/main/install.sh | bash
[1/5] Hardware Check: CPU 8 cores (AVX2/AVX-512), 16GB RAM, 45GB Free ... PASS
[2/5] Runtime: Ollama verified + pulling llama-guard3:1b
[3/5] Core: Python 3.11+ editable venv configured (~/.agentguard)
[4/5] Auto-Boot: systemd service registered for user
✓ AgentGuard daemon live at http://127.0.0.1:8907
MITRE ATLAS AML.T0048
OWASP LLM01:2025
ColBERT Late-Interaction
Secret Scanner & Redactor
Llama Guard 3 (Ollama)
GraphRAG Lineage
Circuit Breaker
Cloudflare Quick Tunnel
MITRE ATLAS AML.T0048
OWASP LLM01:2025
ColBERT Late-Interaction
Secret Scanner & Redactor
Llama Guard 3 (Ollama)
GraphRAG Lineage
Circuit Breaker
Cloudflare Quick Tunnel
MITRE ATLAS AML.T0048
OWASP LLM01:2025
ColBERT Late-Interaction
Secret Scanner & Redactor
Llama Guard 3 (Ollama)
GraphRAG Lineage
Circuit Breaker
Cloudflare Quick Tunnel
OpenCode Plugin
Claude Code Hooks
Codex CLI Integration
LangGraph Callback Handler
stdio MCP Transport
Streamable HTTP JSON-RPC
Postgres MCP Connector
GitHub MCP Connector
OpenCode Plugin
Claude Code Hooks
Codex CLI Integration
LangGraph Callback Handler
stdio MCP Transport
Streamable HTTP JSON-RPC
Postgres MCP Connector
GitHub MCP Connector
OpenCode Plugin
Claude Code Hooks
Codex CLI Integration
LangGraph Callback Handler
stdio MCP Transport
Streamable HTTP JSON-RPC
Postgres MCP Connector
GitHub MCP Connector
REAL-TIME FIREWALL

Every action evaluated
in real time.

Live stream of verdicts, in-place secret redactions, ColBERT threat similarity scores, and circuit breaker trip events across all active agent sessions.

3,847Interceptions Logged Locally
AGENTSECURITY VERDICT & EVENTSUBSYSTEMSTATUS
claude-code
#7E21 · 0.8ms
Redacted AWS Secret Key from bash arguments
Tier 3
sanitize
opencode-worker
#A409 · 2.1ms
Blocked AML.T0048 multi-turn exfiltration chain
Tier 3.5
block
codex-cli
#F812 · 1.9ms
ColBERT MaxSim 0.91 match on MITRE AML.T0051
Threat-RAG
block
langgraph-agent
#3C98 · 5.4ms
Passed MLCommons S1-S15 hazard evaluation
LlamaGuard
allow
cursor-hook
#D110 · 0.5ms
Loop breaker tripped: consecutive tool calls > 5
Breaker
pause
custom-mcp
#882A · 1.2ms
Operator approved rm -rf build/ tool execution
Gateway
approve
DEPLOYMENT MODES

Flexible local posture.

LIGHTWEIGHT MODE
~80 MBRAM

Zero LLM dependencies required

  • 21 Tier-1 deterministic regex rules
  • Base64 & homoglyph heuristics
  • In-place secret redaction
  • SQLite contextual RAG + GraphRAG
  • Circuit breaker & loop shield
  • AMOLED developer dashboard
FULL AI MODE (RECOMMENDED)
LocalOllama

Hardware-verified neural safety

  • Everything in Lightweight Mode
  • Local Llama Guard 3 (1B quantized)
  • Anthropic-style Contextual RAG
  • ColBERT Late-Interaction MaxSim
  • Cloudflare Quick Tunnel + Auth Code
  • OpenCode, Claude & Codex hooks
TEAM & CLUSTER
CustomInfra

For teams & enterprise audits

  • PostgreSQL pgvector similarity mirror
  • Named Cloudflare Tunnel ingress
  • Multi-agent session budget persistence
  • OWASP & MITRE compliance report exporter
  • Centralized SIGTERM kill switch
  • Custom security policy corpora

Guard your AI agents
with zero cloud leakage.

Install with a single hardware-verified command. Works out of the box with OpenCode, Claude Code, OpenAI Codex CLI, and any Model Context Protocol host.

VIEW DOCUMENTATION