Set up Guard

Install

Add yourself as a developer in the dashboard (Settings → Developers → Add Developer) and run the install snippet it gives you.

The snippet checks for Python 3.10 or later and your API key first, installs agentgovern 2.7.0 or later, saves your settings for new terminals and installs the hook.

Python

Guard needs Python 3.10 or later. The macOS system Python is 3.9, which is too old: install a newer one from python.org or with Homebrew (brew install python@3.12).

The Python SDK is an MIT-licensed SDK on PyPI. https://pypi.org/project/agentgovern/

What Guard sends and stores

We delete your data on request, within 30 days. After that, copies can remain for a limited time: in our database backups for up to 30 days, and in our service and error logs for up to 90 days, after which they are deleted automatically.

Uninstall

Mac (or Linux), in Terminal:

"$HOME/.venvs/agentgovern/bin/agentgovern" hook uninstall
for AG_RC in "${ZDOTDIR:-$HOME}/.zshrc" "${ZDOTDIR:-$HOME}/.zprofile" "$HOME/.zshrc" "$HOME/.zprofile" "$HOME/.bashrc" "$HOME/.bash_profile"; do if [ -f "$AG_RC" ] && LC_ALL=C grep -a -q "# added by AgentGovern Guard$" "$AG_RC"; then ( umask 077; rm -f "$AG_RC.agentgovern.tmp" && { LC_ALL=C grep -a -v "# added by AgentGovern Guard$" "$AG_RC" >| "$AG_RC.agentgovern.tmp"; [ $? -le 1 ]; } && [ -f "$AG_RC.agentgovern.tmp" ] && cat "$AG_RC.agentgovern.tmp" >| "$AG_RC"; AG_S=$?; rm -f "$AG_RC.agentgovern.tmp"; exit $AG_S ) && echo "AgentGovern: removed its lines from $AG_RC"; fi; done
rm -rf "$HOME/.agentgovern/hook.py" "$HOME/.agentgovern/sessions" "$HOME/.agentgovern/outbox" "$HOME/.agentgovern/outbox-dead" "$HOME/.agentgovern/__pycache__" "$HOME/.venvs/agentgovern"; rmdir "$HOME/.agentgovern" 2>/dev/null; rmdir "$HOME/.venvs" 2>/dev/null
unset AGENTGOVERN_API_KEY AGENTGOVERN_ACTOR_USER_ID

Windows, in PowerShell:

& "$HOME\.venvs\agentgovern\Scripts\agentgovern.exe" hook uninstall
[Environment]::SetEnvironmentVariable('AGENTGOVERN_API_KEY', [NullString]::Value, 'User')
[Environment]::SetEnvironmentVariable('AGENTGOVERN_ACTOR_USER_ID', [NullString]::Value, 'User')
foreach ($agP in "$HOME\.agentgovern\hook.py", "$HOME\.agentgovern\sessions", "$HOME\.agentgovern\outbox", "$HOME\.agentgovern\outbox-dead", "$HOME\.agentgovern\__pycache__", "$HOME\.venvs\agentgovern") { if (Test-Path $agP) { Remove-Item -Recurse -Force $agP } }
if ((Test-Path "$HOME\.agentgovern") -and -not (Get-ChildItem -Force "$HOME\.agentgovern")) { Remove-Item -Force "$HOME\.agentgovern" }
if ((Test-Path "$HOME\.venvs") -and -not (Get-ChildItem -Force "$HOME\.venvs")) { Remove-Item -Force "$HOME\.venvs" }
Remove-Item Env:\AGENTGOVERN_API_KEY -ErrorAction SilentlyContinue
Remove-Item Env:\AGENTGOVERN_ACTOR_USER_ID -ErrorAction SilentlyContinue

To pause it, delete the two lines ending in # added by AgentGovern Guard from your shell profile (on Windows, run the two SetEnvironmentVariable lines above), then open a new terminal.