Deterministic pre-action authorization for AI agents. Guardrails run before supported tool execution, so prompt injection cannot bypass host-emitted policy checks.
CTF Evidence
From the live APort Vault adversarial testbed:
| Metric | Result |
|---|
| Total authorization decisions observed | 4,437 |
| Total attack sessions observed | 1,151 |
| Level 5 ("Vault") restrictive attempts | 879 |
| Level 5 ("Vault") successful breaches | 0 |
| Level 5 restrictive success rate | 0% |
| Permissive baseline success rate (for comparison) | 74.6% |
Start Here
Protect a GitHub repository in 60 seconds
npx @aporthq/aport-agent-guardrails github
This writes a reviewable .github/workflows/aport-guard.yml that uses the
public APort Repository Guard
Action. Default mode: auto uses GitHub OIDC, creates or reuses a
repository-scoped hosted OAP passport, and starts with report-only evidence.
Enable hosted enforcement plus branch protection when you are ready for the
guard to block merges or protected-branch pushes.
Blocking setup for protected branches:
npx @aporthq/aport-agent-guardrails github --mode hosted --branches main,staging
Install runtime guardrails in 60 seconds
npx @aporthq/aport-agent-guardrails
- In a git repository with no detected runtime framework, pressing Enter starts GitHub Repository Guard setup.
- For runtime hooks, choose a released target:
cursor, claude-code, openclaw, langchain, crewai, deerflow; a released beta command-hook target: codex, gemini, goose; or a setup-only target: n8n
- GitHub repository guard:
npx @aporthq/aport-agent-guardrails github
- Claude Code direct:
npx @aporthq/aport-agent-guardrails claude or claude-code for Anthropic's claude CLI
- Curl install URL for runtime hooks:
curl -fsSL https://aport.io/install.sh | bash -s -- claude-code
- Existing hosted passport:
npx @aporthq/aport-agent-guardrails <framework> <agent_id>
- Change enforcement without recreating a passport:
npx @aporthq/aport-agent-guardrails mode claude-code --enforcement=warn
- Reset a framework to a clean APort state:
npx @aporthq/aport-agent-guardrails reset claude-code --yes
When prompted for passport setup, the choices are:
Create hosted APort passport now — recommended; creates a hosted passport and narrow setup key.
Use existing hosted passport ID — paste an existing agent_id.
Create local passport file — offline/local JSON passport.
For a new hosted setup, choose option 1. The installer creates a passport, creates a narrow setup key, writes the framework hook/config, and starts sending decisions to APort. Re-running the same npx @aporthq/aport-agent-guardrails <framework> command reuses the framework's existing hosted config or local aport/passport.json, refreshes the installed runtime/hooks, and does not create a new passport unless you reset first or explicitly choose a different passport. Hosted reuse prints the dashboard link (https://aport.io/passports?details=<agent_id>); when it reuses a saved config, it also prints the mode-file path. For non-interactive installs:
npx --yes @aporthq/aport-agent-guardrails claude-code \
--quick-hosted \
--email [email protected] \
--non-interactive
Equivalent environment-variable form:
APORT_OWNER_EMAIL="[email protected]" \
APORT_QUICK_HOSTED=1 \
npx --yes @aporthq/aport-agent-guardrails claude-code --non-interactive