Agent Hardening CLI Reference
Agent Governance is released with early access availability and is subject to limited support and potential API changes in future releases.
Every command in the nemo agent-hardener group. For the workflow these fit into,
see Run a War-Game.
Command Summary
Applying a mitigation is not a CLI operation. See Review and Apply Mitigations.
Setup and Diagnostics
doctor
Read-only. Checks the agent-hardener venv, the garak venv, the inference credential, the Docker daemon and the OpenShell gateway.
setup
Creates the agent-hardener and garak virtual environments and the inference credential, then checks prerequisites.
Manifests
init
Resolves a target once and saves it as a manifest. Pass either --agent or
--project-dir.
Model defaults can also be set here and are stored on the manifest:
--attack-model, --attack-base-url, --attack-key-secret, --analysis-model,
--analysis-base-url, --analysis-key-secret, --safety-model, --safety-base-url
and --safety-key-secret. They take the
same values as the matching options on run.
--binary is derived for you and rarely needed: derivation proposes the image’s
virtualenv plus /usr/local/bin/python* and /usr/bin/python*. Set it for a
non-Python agent (Node, Go, Java). The sandbox matches its policy against the
resolved executable, so globs that match no process grant nothing and the
agent’s outbound calls are refused mid-run.
--backend opens the sandbox-to-host route for the named ports. The Inference
Gateway backend is added automatically and its name, nemo-inference-gateway, is
reserved. Backends you declare are kept when you refresh the manifest.
--env values are stored in plaintext on the manifest, so keep credentials in
--secrets. A secret written as NAME=workspace/secret is read from the
platform Secrets store when the run starts. A plain NAME takes its value from
the operator environment or --env-file. For a deployed agent, the secrets its
running deployment uses are recorded automatically and read the same way.
The rendered agent-hardener.yaml is a readable rendering. Editing it does not
affect --manifest-id runs, which read the saved manifest — but run --config
reads this local file, so edits do take effect there.
refresh
Re-resolves the manifest against the agent as it is now. Egress, backends, secrets, models, defenders and the cached benign suite are preserved. A run logs a warning when the agent is newer than its manifest.
manifest show
manifest set
Changes stored defaults. The same knobs exist as per-launch flags on run, which
apply to one launch only.
Running
synth-benign
Generates the benign request suite and caches it on the manifest. Required before
the first run.
run
Runs the attack, defend and validate cycle. Pass either --manifest-id or
--config, not both. Prefer --manifest-id, because the cached benign suite is
looked up by manifest id; with --config you must pass --benign-suite yourself.
A failed run keeps its hitlog, so you can replay it with --replay-hitlog.
Override flags apply to one launch and never edit the saved manifest, so a run can deviate from the frozen baseline without breaking comparability.
Every model group you set explicitly is preflighted against its endpoint before the sandbox is built, so a bad name or key fails in seconds with the list of models those credentials can reach. Groups left at their built-in defaults are not probed.
Platform job commands
synth and war-game are generated platform-job submit commands. They use the
same job implementations as Studio, accept generated spec flags, and expose
their schemas through explain:
Use synth-benign and run for the normal local workflow. Use synth and
war-game when you want to submit those jobs through the platform job
executor.
Common generated submission options:
sanity-check
Freezes a chosen subset of a run’s defenses and replays the recorded attacks plus the benign suite against it. Applies nothing.
status
Python SDK
Agent hardening plugin resources are available on the platform client as client.agent_hardener:
inspect_project takes a project fileset request body rather than a manifest name.
Related Topics
- Run a War-Game: the workflow these commands fit into.
- Troubleshooting: setup, sandbox and victim failures.