hol-guard
Open-source antivirus and runtime protection for AI agents, tools, MCP servers, plugins, skills, and package installs.
What it is and what it does
HOL Guard is a runtime security layer that sits between AI agents and their local tools, evaluating actions in real time before they execute. It detects and blocks risky patterns: secrets leaking in file access or command output, prompt injection attempts, unsafe shell or Git commands, malicious package installs, and MCP server misconfigurations. The package works entirely locally without requiring a cloud account, though it can optionally sync to Guard Cloud for team policies and shared approval workflows.
The tool integrates with supported AI agents (Codex, Claude Code, GitHub Copilot CLI, Cursor, Gemini CLI, and others) through native hooks or reversible overlays, depending on what each agent exposes. When it encounters an ambiguous action, it routes it to a local approval center or native prompt rather than blocking blindly. All decisions are recorded as security receipts for later review. Setup is guided: `hol-guard init` discovers compatible agents on your machine, explains each change before applying it, and walks you through your first protected action.
Use it for:
- Prevent AI agents from accidentally exfiltrating secrets or credentials during code generation or tool use
- Block malicious or suspicious package installs before they run, protecting your supply chain from compromised dependencies
- Review and approve risky shell commands, Git operations, or file access before an agent executes them
- Detect and stop prompt injection attempts that try to trick agents into exposing sensitive data or bypassing security controls
- Maintain an audit trail of all agent actions and security decisions for compliance or forensic review
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
HOL Guard is a local-first antivirus and runtime protection layer for AI agents that evaluates agent actions, tool calls, package installs, and MCP servers for secrets exposure, prompt injection, unsafe commands, and malicious packages before they execute.
Yes. HOL Guard addresses a real gap in AI agent security: most tools see only one part of the attack surface (code scanners, sandboxes, or MCP gateways alone), but agents interact with shells, files, packages, and credentials all at once. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and installs with low friction. It works locally by default and scales to team workflows optionally. Install it if you run AI agents on your machine and want runtime visibility and control over their actions.
Install
hol-guard on PyPI
pip
pip install hol-guarduv
uv add hol-guardpoetry
poetry add hol-guardInstalling hol-guard
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance as of 2026-08-14 with recent release. Requires Python 3.10 or later. Ten runtime dependencies including cryptography, keyring, and litellm suggest mature integration with AI tooling and credential handling.
License in practice
Apache-2.0 permissive license allows commercial and private use without restriction. You can integrate this into proprietary workflows or modify it for your needs.
Quickstart
pipx install hol-guard
hol-guard init
from hol_guard import Guard
# Guard integrates via hooks into supported agents; init discovers and configures them
Requires Python 3.10 or later. Designed for pipx installation to isolate the tool environment; direct pip install is supported but pipx is recommended for CLI use.
Verify before relying
- Exact scope of 'supported' agent integrations and whether all listed agents (Codex, Claude Code, Cursor, Gemini CLI, etc.) have equal enforcement depth
- Whether local-only mode (without Guard Cloud) provides full protection or if some threat detection requires cloud sync
- Performance overhead of runtime evaluation on typical AI agent workloads
- Whether approval workflows work with headless/non-interactive environments
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — cisco-ai-skill-scanner, cryptography, keyring, litellm, mcp, packaging, pyyaml, requests, rich, tomli |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 252,014/month — #8,561 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hol_guard-2.2.87-py3-none-any.whl
Keywords: ai agent security, ai agents, ai antivirus, claude, cli, codex, cursor, gemini, mcp security, opencode, plugin security, prompt injection, runtime security, secrets detection, supply chain security
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
plugin-scannerLints, verifies, and gates plugins, skills, MCP…
permissive · top 15,000 on PyPI
llm-guardLLM Guard provides input and output scanning…
unclear · top 15,000 on PyPI
omnigentOmnigent is an open-source orchestration layer…
permissive · top 15,000 on PyPI
pydantic-ai-shieldsPydantic AI Shields provides guardrail…
permissive · top 15,000 on PyPI
ouroboros-aiOuroboros is an Agent OS that turns vague AI…
permissive · top 15,000 on PyPI
baml-pybaml-py is the Python runtime for executing…
unclear · top 15,000 on PyPI
echo-agentEcho Agent is a self-hosted, long-running AI…
permissive · top 15,000 on PyPI
apm-cliAPM is a dependency manager and configuration…
permissive · top 15,000 on PyPI
agentrust-traceCreates and verifies cryptographically signed…
permissive · top 15,000 on PyPI
deepagentsDeep Agents is an opinionated agent harness…
permissive · top 5,000 on PyPI