hermes -z <prompt> — scripted one-shot
For programmatic callers (shell scripts, CI, cron, parent processes piping in a prompt), hermes -z is the purest one-shot entry point: single prompt in, final response text out, nothing else on stdout or stderr. No banner, no spinner, no tool previews, no Session: line — just the agent's final reply as plain text.
Per-run overrides (no mutation to ~/.hermes/config.yaml):
Same agent, same tools, same skills — just strips every interactive / cosmetic layer. If you need tool output in the transcript too, use hermes chat --oneshot -q instead; -z is explicitly for "I only want the final answer".
Exit codes: 0 the turn completed; 2 it failed or stopped partway (partial, iteration budget, completed: false) — even when an explanation was printed; 130 it was interrupted; 1 a completed turn produced no text at all; 2 also for usage errors (bad flags) before the run starts. These codes intentionally differ from chat -q/-Q above (which exit 1 for failed/partial/budget and 0 for a completed turn with no text): -z reserves 1 for "answered nothing". Judge the run by the exit code (or the --usage-file flags), not by whether stdout is non-empty.
From the official Hermes Agent CLI reference.