Skip to main content
Pick one install path and go. All paths give you the agent-guardian CLI and the Python SDK; the base install already ships the full attack swarm, all six report writers (json, sarif, junit, md, gitlab, pdf via ReportLab), the seed-probe corpus, the loopback dashboard, and the Ed25519 / HMAC signing primitives. Optional extras (WeasyPrint PDFs, OpenTelemetry, AWS Bedrock, Vertex AI, WebSocket / gRPC / browser transports, bundled demo agents) are opt-in below.

Pick an install path

Python 3.11, 3.12, 3.13 are supported (Python 3.14 is not yet supported — pyproject.toml pins requires-python = ">=3.11,<3.14"). The wheel is pure Python; no compilation step is required for the base install.
If your default python3 is 3.14+ (true on a current macOS box), the plain pip install agent-guardian will fail with No matching distribution found. Install Python 3.13 first with pyenv and pin it for this directory:
The pinned-3.11 Docker image and the agentguardian-scan GitHub Action (default 3.12) consumer paths are insulated from this — only ad-hoc pip install against the system Python is affected.

Install

Optional extras

The [full] extra pulls WeasyPrint, which links against cairo, pango, harfbuzz, gdk-pixbuf, and libjpeg native libraries. On Debian/Ubuntu: apt-get install libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz0b libjpeg62-turbo libcairo2 fonts-dejavu-core. On macOS: brew install pango cairo libffi. If you only need PDF output without the HTML→PDF fidelity, the base install already ships ReportLab.

Expected output

Verify the install with agent-guardian doctor:
You can also confirm the version directly:
agent-guardian --version prints a version string and agent-guardian doctor reports CLI: ok. You are ready to scan.

How to interpret the extras

Every extra is opt-in by design: the base install stays lean so a stock pip install runs in under a second and the CLI boots without paying for ML wheels you may never use. The table below maps each extra to the packages it pulls and the feature it unlocks, sourced from pyproject.toml.
ReportLab is already bundled in the base install, so --output pdf works out of the box without any extra. [full] upgrades the renderer to WeasyPrint for higher-fidelity HTML→PDF output. See QA-010 for the rationale.

Environment variables

AgentGuardian reads its provider keys, dashboard wiring, and signing secrets from the environment. A project-local .env file in the current working directory is loaded automatically at CLI startup (handled in src/agent_guardian/cli.py::_try_load_dotenv).
Bedrock uses the AWS credential chain, not a namespaced API key. Set AWS_PROFILE or AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_REGION per the standard botocore conventions; agent-guardian doctor will report bedrock: aws extra OK, region=... once both the [aws] extra and the credentials are in place.

Troubleshooting

Older builds (pre-1.0) shipped no PDF engine in the base install. As of v1.0.0 ReportLab is bundled by default, so --output pdf works out of the box. If you’re on an older build, install one of the engines:
Background: QA-010.
AgentGuardian validates the model id at scan preflight and fails fast in ~3 seconds instead of burning the full LLM budget on a typo. The error message lists the closest candidate from the live AI Studio / Vertex catalog. Pick a valid id (for example gemini:gemini-2.5-flash) or list available models against your key. To skip the probe in CI:
Background: QA-001.
The scan preflight probes the target URL with a tight timeout to avoid wasting LLM budget on an unreachable endpoint. If your endpoint is slow or behind a VPN, override the probe timeout (env var AGENT_GUARDIAN_MODEL_PROBE_TIMEOUT) or pass --no-preflight on scan. Background: QA-002.
WeasyPrint links against native libraries that aren’t bundled in the Python wheel. Install them with your system package manager (see the warning above), or use the Docker image — it already includes the cairo / pango / harfbuzz / libjpeg / dejavu fonts stack. doctor will report weasyprint installed but native libs missing (...) when this is the case.
Scans auto-spawn a loopback dashboard server and emit a clickable URL. If you see a connection refused error, the auto-serve was suppressed for one of eight reasons (non-TTY stdout, $CI=true, --no-serve, --no-tui, --debug-format json, --no-publish, $AGENT_GUARDIAN_DISABLE_AUTO_SERVE=1, or a custom $AGENT_GUARDIAN_DASHBOARD_URL). Run agent-guardian serve manually in another terminal to view the scan. Background: QA-009.
Add the user-base scripts directory to your PATH:
Or use pipx install agent-guardian, which puts the binary in ~/.local/bin and isolates the venv.

Next step

Run your first scan:
  • Quickstart — three minutes from pip install to your first AIVSS score.
  • Try the demo agent — point the scanner at a hosted, deliberately-vulnerable banking assistant.
  • Contributing — set up the full dev environment with uv sync --all-extras.