Your coding agent can rm -rf ~/.ssh.
agentjail blocks it before it runs.
Policy guardrails for coding agents. Offline. Open Source.
- OS-native sandbox · Landlock + Seatbelt
- Network visibility · reads the LLM transcript
- No VM · no kernel module
- Rego on OPA · CNCF Graduated
- Policy decisions in ~8ms median
- Guards files, shell, MCP & cloud/DB creds
curl -fsSL https://agentjail.io/install.sh | sh Watch it block a live agent.
A dangerous action, blocked live in under 10 ms, on your machine. How it works →
Do I need this?
If any of these hit close to home, yes.
Don't trust your production data to a markdown fileCLAUDE.md, agents.md, .cursorrules. Use deterministic guardrails.
Every dev on your team can install any MCP server.
No approval. No inventory. No kill switch.
Granular MCP tool-level policies + full server inventory
mcp_policy mcp inventory Your devs run --dangerously-skip-permissions.
Because clicking Allow 200 times a day isn't a security strategy.
14 dangerous patterns blocked. Safe calls pass through.
command_policy An agent force-pushed to main and ran npm publish.
In one session. You found out from PagerDuty.
Force-push, publish, piped installs, code egress.
command_policy The auditor asks how you control AI agent access.
You don't have an answer yet.
Policy-as-code. Default-deny. Auditable decision log.
rego policies One tool call. Three steps.
Stopped cold.
The agent picks a destructive command from its tool call.
The local OPA daemon evaluates the call against your rules, in ~8ms median.
deny is returned before the shell ever runs.
One install. 14 dangerous patterns blocked. ~8ms median.
Install agentjailWhy not just use...
Protected out of the box.
- file_policy - .ssh, .aws, .gnupg, .env*, *.pem, id_rsa
- mcp_policy - unknown servers, *stripe*, *payment*, *billing*
- command_policy - 14 patterns: rm -rf, curl|bash, sudo, force-push, env|curl...
- no_shell_init_write - block writes to .zshrc, .bashrc
- no_app_binary_write - block writes to app binaries
- no_launchctl - block osascript, launchctl, crontab
- no_history_read - block reads of shell history, browser cookies
- no_shell_eval - block eval, bash -c $VAR, base64 pipelines
What's shipped. What's next.
Currently at v1.1.0. Read the full changelog →
Intercepts every tool call before it runs, evaluates Rego policies in <5ms
Default-deny network egress: the agent reaches only allowlisted hosts, every other connection is blocked - enforced by the transparent tunnel, even if a hook is bypassed
Agents cannot disable their own hooks, daemon, or policy files
Live dashboard, full-screen session replay, and automatic daemon updates
Granular tool-level gating within MCP servers, full surface inventory from configs, npm, pip, and Docker
Policy cascading from global to per-project overrides, PID-based active session detection, Cobra CLI
The same OS sandbox that already contains the internet's most hostile code: Seatbelt, which runs untrusted web JavaScript in Chrome and Safari, and Landlock, the mainline-kernel LSM Microsoft uses in Azure and Google ships in ChromeOS. Files and exec denied by default - no bespoke VM to trust
Read exactly what your agent sends its model: the LLM request/response is captured (on macOS with no system extension), and the opt-in tunnel MITMs and enforces per-host policy on all traffic, HTTP/2 and gRPC included
Native menu bar app for one-click install, policy management, and live session monitoring
Track token usage per agent, session, and project. Set session limits so a runaway agent doesn't eat your entire daily quota
System-wide kernel enforcement for any process, not just hooked agents. The strongest isolation tier