Enforcement Modes
Kill mode, alert mode with human approval, and fault-tolerant graceful degradation.
The enforcement controller has two modes: kill (deterministic, immediate termination) and alert (pause + human approval). The self-hosted, open-source SteerPlane API runs kill mode only — that's what's fully functional today, out of the box, for free.
Kill mode (self-hosted, free)
On any violation, execution terminates immediately and atomically with a structured diagnostic exception that is logged and persisted. This is the default, and the only enforcement path implemented in the open-source, self-hosted API.
@guard(agent_name="batch_job", max_cost_usd=20)
def run():
agent.run()Use kill mode for unattended jobs where any breach should stop the run outright — this is what the free, self-hosted SteerPlane API enforces for every limit type.
Alert mode (hosted / enterprise)
The SDK also accepts enforcement="alert", alert_threshold, and alert_timeout_sec — these
parameters exist client-side, but the pause → notify → human-approve → resume workflow they
describe requires the hosted/enterprise control plane, which isn't part of the open-source
self-hosted stack.
@guard(
agent_name="support_bot",
max_cost_usd=10,
enforcement="alert", # requires a hosted/enterprise backend
alert_threshold=0.8,
alert_timeout_sec=1800,
)
def run():
agent.run()Pointed at a backend that implements it: approve resumes execution with extended limits; deny or timeout terminates as a safety net. Pointed at the free self-hosted API (which does not implement this workflow): the run fails closed and terminates immediately — see graceful degradation below.
Loops and policy violations always hard-terminate, regardless of enforcement mode or backend — this is a non-overridable safety invariant, not something either mode can pause.
Graceful degradation
SteerPlane is fault-tolerant by design.
- If the control plane (API server) becomes unreachable, the SDK keeps enforcing locally — loop detection, cost, step, and policy rules stay active regardless.
- If
enforcement="alert"is set but the connected API doesn't implement the approval workflow (true of the free self-hosted API), the SDK fails closed: the run terminates safely with a clear "could not create an approval request" error, rather than continuing unprotected or hanging indefinitely.
The result: no agent ever runs without at least one active enforcement path.