Installation¶
Requirements¶
- Linux for the sandbox. The jail uses Landlock, seccomp, and user namespaces, which
are Linux-only. macOS runs unsandboxed: the default
isolation = "auto"resolves tonone, commands run as ordinary subprocesses behind a startup warning, and an explicitstrictorhardenedisolation is refused. On Windows use WSL; the CLI does not run natively there. - Unprivileged user namespaces for
strictisolation. They are on by default on Ubuntu, Debian, and most cloud images. On Ubuntu 24.04+, wherekernel.apparmor_restrict_unprivileged_userns = 1blocks them, either set that sysctl to 0 or install the bundled AppArmor profile withagent6 system apparmor install(removed again withagent6 system apparmor remove). Without user namespaces agent6 falls back tohardenedisolation, which is still real confinement. - Python 3.12 or newer, and an API key for at least one provider.
- A Rust toolchain only when building from source; the PyPI wheels bundle a prebuilt
agent6-jail.
The security model describes what each isolation level enforces.
From PyPI¶
Both put the agent6 entry point in ~/.local/bin. If that is not on your PATH, run
uv tool update-shell or pipx ensurepath and restart the shell.
From source¶
AGENT6_JAIL_BIN=/path/to/agent6-jail overrides the bundled jail binary.
Shell completion¶
One command installs tab-completion (it detects the shell you are running,
even one started from another shell, or pass bash/zsh/fish/xonsh
explicitly; rerunning is safe and refreshes it):
Bash/zsh get a marker-guarded source line in their rc file pointing at a
script under the agent6 config dir; fish and xonsh get a file in their
auto-loaded native locations (fish/completions, xonsh/rc.d), no rc edit.
agent6 completions --print bash emits the script instead, for eval or a
dotfiles repo. (For bash/zsh/fish the underlying
argcomplete
register-python-argcomplete also works when it is on your PATH; the xonsh
completer is agent6's own, driving the same argcomplete protocol.)
Check the install¶
agent6 check sandbox runs the jail through a set of probes and reports which isolation level a
run will use on your kernel.