Skip to content

Guardrails

Guardrails are deterministic checks that run inside the agent’s container around every tool call. They catch destructive commands, credential leaks and runaway loops before they cause damage. They are defence in depth against accidents; the security boundary is the agent’s isolated container (Security & compliance).

Guardrails are enforced on Pi and Claude Code. Codex enforces read-only mode through its sandbox; Gemini CLI turns are bounded by the execution timeout. See Runtimes.

Every agent inherits a platform baseline. Per-agent settings can tighten it but never loosen it. If a check fails unexpectedly, the tool call is blocked (fail-closed).

Shell commands are matched against a deny-list, including:

PatternExample
Recursive deletion of root or homerm -rf /, rm -rf ~
World-writable permissionschmod -R 777 /var
Piping remote content into a shellcurl … | bash
Force pushgit push -f origin main
Formatting or writing raw disksmkfs.ext4 …, dd of=/dev/sda
Killing init, fork bombs, shutdown/rebootkill -9 1, shutdown -h now
Interactive root shells or editing platform hookssudo -i, sudo su, visudo

The agent sees a clear denial with the reason.

Edits are blocked to .env files, .mcp.json, encrypted credential backups, SSH and cloud credentials (~/.ssh, ~/.aws, ~/.gcp), runtime login and settings files, the read-only configuration and the platform’s own hook scripts.

Command output is scanned for leaked secrets — Anthropic, OpenAI, GitHub, AWS, Slack and Google key formats. Matches are logged by pattern name only, never the value.

Each run is capped at 50 turns by default (configurable 1–500, separately for chat and tasks), which prevents runaway loops from burning model spend.

Open Settings → Guardrails → Guardrail rules → Manage rules to set Max turns (chat) and Max turns (task), then restart the agent. Through the API you can also add:

FieldTypeDescription
max_turns_chat1–500Turn limit for chat
max_turns_task1–500Turn limit for tasks
execution_timeout_sec60–7200Time limit per run
extra_bash_denyup to 50 patternsAdditional blocked command patterns
extra_path_denyup to 50 pathsAdditional protected paths
disallowed_toolsup to 50 toolsTools the agent may not use
Terminal window
curl -X PUT https://acme.exohuman.cc/api/agents/market-scout/guardrails \
-H "Authorization: Bearer $EXOHUMAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"max_turns_task": 20, "extra_bash_deny": ["prod-db.internal"], "disallowed_tools": ["WebFetch"]}'

Send {} to revert to the baseline. Restart the agent to apply changes. The UI preserves API-only fields when saving.