Administrator runbook for an AI agent
A runbook an administrator can hand to an AI agent to write a standalone DefenseClaw config, check it, run ensure on a named host and verify the result.
This runbook lets an AI agent working for an administrator write the standalone config, check it, run ensure and verify the result, on an admin workstation or a test host the administrator names.
Hand this page to your agent
Paste this into your agent:
Read https://cisco-ai-defense.github.io/defenseclaw/docs/enterprise/agent-runbook/llms.md and follow it. I am the administrator of this computer. Ask me before running ensure.Hard rules
- Never run this on a user's managed computer, or on any computer the administrator did not name. Per-user commands print
This computer is managed(exit2) orThis device is managed(exit3) on a managed computer; that is the product telling you to stop (Managed command availability). - Observe first. Write
guardrail.mode: observe. Switching toactionor changing a fail mode needs the administrator's yes to that exact change. - Never print a key or token. The Cisco AI Defense key never goes in the config, a script body or a command line; use
enterprise secret set --from-stdin. - The config file must be owned by root (Windows: SYSTEM or Administrators) and writable by nobody else, or the wrapper refuses it.
Steps
Write the config
Start from the Linux example; the macOS and Windows paths are on Enterprise.
config_version: 9
deployment_mode: managed_enterprise
data_dir: /var/lib/defenseclaw # must be exactly this path
policy_dir: /etc/defenseclaw/policies
enterprise:
profile: standalone
gateway:
api_bind: 127.0.0.1
api_port: 18970
guardrail:
enabled: true
mode: observe
connectors:
codex: {}
claudecode: {}Expected: a root-owned file, mode not writable by group or others, at most 1 MiB. If it differs: fix the owner and mode. Do not proceed.
Check the candidate file
Check it before anything is installed. $PAYLOAD is the folder of the unpacked release archive.
"$PAYLOAD/defenseclaw-gateway" config validate ./config.yamlOn a host that already has the package, run the installed gateway instead: /opt/defenseclaw/bin/defenseclaw-gateway on Linux, /opt/cisco/defenseclaw/bin/defenseclaw-gateway on macOS. It is not on the PATH.
Expected: no error, and the previous config stays in force either way. If it prints an error: report the setting it names and the profile; do not guess a value (config_invalid in Enterprise troubleshooting).
Ask the administrator
Show the administrator the config and the artifact name and SHA-256 you will use. Ask: "Run ensure on this host?" Continue only on yes.
Run ensure
Use the kit wrapper (Linux example, pinned by SHA-256).
sudo ./defenseclaw-enterprise.sh --source <artifact> --sha256 "$PIN" --config-file /etc/mdm/defenseclaw/config.yamlExpected: one result document and exit code 0. When the host already matches it reports "noop": true. If it differs: read the exit code and errors[].code.
| Exit (Windows / Linux, macOS) | Meaning | You do |
|---|---|---|
0 / 0 | Success or nothing to do | Continue |
1603 / 1 | Failed and rolled back | Report errors[].code |
1618 / 75 | Busy | Retry later, once |
1639 / 2 | Invalid arguments | Fix the assignment |
Verify
sudo /opt/defenseclaw/bin/defenseclaw-gateway enterprise linux verify --jsonmacOS: sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos verify --json. Windows (elevated): & 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' enterprise windows verify --profile standalone --json.
Expected: coverage_complete is true; on Linux and macOS policy.applied is true. security_complete is true, or false with only the warning hook_process_fail_open when Codex, Claude Code, Copilot, Devin, Hermes, Kiro or Antigravity is enabled: report that warning as the known hook-process limit, not as a failed install.
If it differs: report the fields and the error codes. See Enterprise troubleshooting. Do not edit installed files by hand.
Report
Reply with:
- Host, OS and the artifact version and SHA-256 you used.
- The config you wrote (no keys) and its mode.
- The
ensureexit code and result. verifyfieldscoverage_complete,security_completeandpolicy.effective_digest.- What needs the administrator's decision.