Skip to main content
The kill switch is an org-scoped emergency stop. Killing an agent, run, or mission stops it in two places until it is revived:
  • In the SDK: the pre-execution check refuses every further @guarded_action call for that target.
  • At ingest: the platform rejects any batch that references a killed target, so an agent that skips or bypasses the SDK check still cannot record actions.

Endpoints

All endpoints live under /api/v1/kill-switch and require either a session cookie (Clerk) or an API key (Authorization: Bearer ...).

Kill a target

Returns the full KillSwitchPublic record. Returns 409 Conflict if the target is already killed.

Revive a target

Returns 404 Not Found if there is no active kill switch for the target.

Check kill status (SDK)

The SDK calls this before each guarded action executes. Response:

List active kill switches

Returns all currently-active kill switches for the caller’s organization, ordered by killed_at descending.

SDK behaviour

Before each @guarded_action runs, the SDK checks the action’s agent, run and mission. When any of them is killed, it raises AgentKilledError (error code AGENT_KILLED, not recoverable) and the action body never runs. If the check itself cannot complete (platform unreachable, non-200 response, or httpx not installed):
  • Under strict fail_closed, the SDK raises KillSwitchUnavailableError, a subclass of AgentKilledError with reason code KILL_SWITCH_UNAVAILABLE.
  • Under the default fail_closed_writes and under fail_open, it logs a warning and treats the target as not killed. Ingest enforcement still applies.
See Enforcement modes.

Ingest enforcement

POST /api/v1/ingest/ checks every agent, run and mission the batch references, at the batch level and on each entry. If any of them has an active kill switch in the caller’s organization, the whole batch is rejected:
The rejection is recorded as a HARD_BLOCK intervention named kill_switch_reject, with the killed target_type, target_id, kill_switch_id, run_id and entry count in its context.

Console

The console exposes /kill-switch as a top-level route — see Console → Kill Switch.

See also