Skip to main content
The kill switch is an org-scoped emergency stop. Killing an agent, run, or mission causes the SDK’s pre-execution check to refuse all further @guarded_action calls for that target until it is revived.
FieldDescription
target_typeagent, run, or mission
target_idThe ID of the target (agent_id, run_id, etc.)
reasonOptional, ≤2000 chars; surfaced in interventions and the console
is_activeTrue until the target is revived
killed_by / killed_atUser who killed the target and when
revived_by / revived_atSet when the target is revived
organization_idKill switches are scoped per organization

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

POST /api/v1/kill-switch/kill
Content-Type: application/json

{
  "target_type": "agent",
  "target_id": "rogue-bot",
  "reason": "Drained $3k in 4 minutes"
}
Returns the full KillSwitchPublic record. Returns 409 Conflict if the target is already killed.

Revive a target

POST /api/v1/kill-switch/revive
Content-Type: application/json

{
  "target_type": "agent",
  "target_id": "rogue-bot"
}
Returns 404 Not Found if there is no active kill switch for the target.

Check kill status (SDK)

GET /api/v1/kill-switch/check?target_type=agent&target_id=rogue-bot
The SDK calls this before each guarded action executes. Response:
{
  "is_killed": true,
  "target_type": "agent",
  "target_id": "rogue-bot",
  "reason": "Drained $3k in 4 minutes",
  "killed_at": "2026-04-18T17:00:00Z"
}

List active kill switches

GET /api/v1/kill-switch/active?skip=0&limit=100
Returns all currently-active kill switches for the caller’s organization, ordered by killed_at descending.
{
  "data": [
    {
      "id": "9f3c…",
      "target_type": "agent",
      "target_id": "rogue-bot",
      "reason": "Drained $3k in 4 minutes",
      "is_active": true,
      "killed_by": "usr_abc",
      "killed_at": "2026-04-18T17:00:00Z",
      "revived_by": null,
      "revived_at": null,
      "organization_id": "org_123"
    }
  ],
  "count": 1
}

SDK behaviour

When the SDK’s pre-action check returns is_killed: true, the next @guarded_action raises PolicyViolationError with a kill-switch reason — the action body never runs. All blocked attempts are recorded as HARD_BLOCK interventions referencing the killing user.

Console

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

See also