Skip to the content.

The runtime-side contract. Defines what API the agent runtime must expose so Kill-Switch Modes M0 through M5 can be activated programmatically, and what verification probes confirm each mode is in effect.


Kill-Switch API Contract

Overview

The framework’s Kill-Switch Modes specification defines six containment modes (M0 through M5) with a 10-minute Time-to-Activate (TTA) target for Modes M1 through M4. The TTA target is unachievable without a runtime-side contract that defines what activation means and how to verify it. Every adopter today invents this contract themselves; this specification provides the canonical version so adopters can converge on a single interface.

This document is not a reference implementation. It is the interface contract that any compliant agent runtime (LangGraph, AutoGen, Anthropic Claude Agent SDK with sub-agents, AWS Bedrock Agents, internal frameworks, vendor copilots that expose customer-controllable hooks) MUST or SHOULD expose for the framework’s containment discipline to be operationally enforceable.

Conformance language

This specification uses RFC 2119 conformance language:

A runtime is conformant when it implements all MUST requirements and documents any deviations from SHOULD requirements with the rationale.

API Surface

A conformant agent runtime MUST expose four API surfaces. The transport (REST, gRPC, event bus, internal function call) is implementation-specific. The semantics are not.

1. Activate

Purpose: activate a specific Kill-Switch Mode for a specific agent.

Required inputs:

Field Type Required Description
mode enum yes One of M0, M1, M2, M3, M4, M5, or a documented variant (M3-RAG, M3-Delegation Cap, M3-Workflow, M3-Vendor, M3-Output, M3-Drift, M4-corpus-scoped, agent-suspended-for-user).
agent_id string yes Identifier matching the AI-BOM agent.name field.
actor string yes Who or what triggered the activation. Human email, automation pipeline name, or detection rule ID.
reason string yes Free-text justification. Becomes part of the decision log and the credential-event log if the activation triggers credential operations.
ticket_id string yes Reference to the incident ticket or change-management record.
scope object conditional Required for M3 variants: which tools, corpora, agents, or users are affected.

Note on variant naming. The enum values use kebab-case wire form (e.g., agent-suspended-for-user, M4-corpus-scoped) for code-safety and JSON serialization. The corresponding canonical prose labels are “Agent suspended for user” and “M4 (corpus-scoped)”, used in human-readable surfaces like kill-switches/overview.md and MATRIX.md. Conformant implementations should accept the wire form on the API surface and surface the prose label in any human-readable output (logs, UI, decision packets).

Required outputs:

Field Type Description
activation_id string Unique identifier for this activation event. Used by status and deactivate calls.
requested_at timestamp When the request entered the runtime.
acknowledged_at timestamp When the runtime accepted the request.
effective_at timestamp When the runtime confirms the mode is in effect (verified by probe).

Behavior:

2. Status

Purpose: query the current Kill-Switch Mode for one or more agents.

Required inputs:

Field Type Required Description
agent_id string conditional One of agent_id or agent_ids MUST be provided.
agent_ids array conditional List of agent identifiers for bulk query.

Required outputs (per agent):

Field Type Description
agent_id string The agent identifier.
current_mode enum The mode currently in effect, as confirmed by the most recent probe.
activated_at timestamp When the current mode took effect.
last_probed_at timestamp When the runtime last confirmed the mode by probe.
probe_result enum pass, fail, or degraded.

Behavior:

3. Deactivate

Purpose: step down from a higher containment mode to a lower one, typically as part of M5 Controlled Re-Enable.

Required inputs: same field set as Activate, with mode representing the target mode (the lower mode the agent is stepping down to).

Required outputs: same field set as Activate.

Behavior:

4. Probe

Purpose: verify the agent is actually in the claimed mode. Probes are how the runtime answers the question “is the mode in effect?” with evidence rather than configuration state.

Required inputs:

Field Type Required Description
agent_id string yes The agent identifier.
expected_mode enum yes The mode the caller expects to find in effect.
probe_type enum yes automatic (runtime-internal probe) or external (caller provides probe payload).

Required outputs:

Field Type Description
result enum pass, fail, or degraded.
evidence object Per-mode evidence; see Per-Mode Contracts below.
probed_at timestamp When the probe was executed.

Behavior:

Per-Mode Contracts

Each mode below specifies what the runtime MUST guarantee when the mode is active, and what evidence the probe MUST return.

M0 Observe

Mode in effect when:

Probe evidence:

Pass criteria: all three evidence items present.

M1 Read-Only

Mode in effect when:

Probe evidence:

Pass criteria: write denied AND read succeeds AND no in-flight write completed post-activation.

M2 Approvals Required

Mode in effect when:

Probe evidence:

Pass criteria: tool call queued AND queue observable AND separation enforced.

M3 Tool Tiering

Mode in effect when:

Probe evidence:

Pass criteria: affected tools denied AND unaffected tools succeed AND scope matches activation.

M3 Variants

The framework documents variants of M3 in kill-switches/overview.md Mode Variants section. Conformant runtimes SHOULD support the variants their deployment context requires:

M4 Full Disable

Mode in effect when:

Probe evidence:

Pass criteria: all tools denied AND zero in-flight sessions AND snapshot discipline preserved.

M5 Controlled Re-Enable

Mode in effect when:

Probe evidence:

Pass criteria: current stage matches activation AND prior stages validated.

Time-to-Activate (TTA) measurement

The framework’s TTA target is 10 minutes for M1 through M4 (per kill-switches/overview.md). TTA is drill-measured per framework/01 Measurement Scope; live-incident timing is tracked separately under PB13 Metric 2.

Authoritative measurement: TTA is measured from Activate.requested_at to Activate.effective_at as reported by the runtime, where effective_at is set only when the verification probe returns pass.

Conformance:

Common failure modes:

Failure modes and reporting

When a runtime cannot fully activate a requested mode, it MUST return a structured failure response. The response MUST include:

Field Description
error Stable error code (e.g., partial-activation, tool-wrapper-unavailable, session-termination-failed).
succeeded_components List of mode components that activated successfully.
failed_components List of mode components that failed, with per-component error detail.
fallback_mode The mode currently in effect (which may be lower than requested).

The runtime MUST NOT report success when the requested mode is only partially activated. The Incident Commander needs to know the actual state, not the wished state.

Reference Implementations (informative)

The following are illustrative integration patterns. They are not normative and conformance does not require them.

Conformance test suite

A runtime claiming conformance with this contract MUST pass the following test sequence quarterly per Playbook 14 (Testing for Agent Failure Modes):

  1. Cold-start activation: activate M1 against an agent that has never been activated. Measure TTA from request to probe-confirmed effective.
  2. In-flight termination: activate M1 while the agent has a write tool call in flight. Confirm the call is terminated, not completed.
  3. State persistence: activate M1, restart the runtime, query Status. Confirm M1 is still in effect.
  4. Probe accuracy: activate M1, externally invoke a write tool, confirm the probe shows the denial.
  5. Mode progression: activate M1, then M2, then M3 with a specific scope, then M4. Confirm Status reflects each transition with correct probe evidence.
  6. Failure reporting: simulate a tool wrapper unavailability during M3 activation. Confirm the runtime returns partial-activation with the actual state.
  7. Bulk Status: query Status for 50 agents simultaneously. Confirm sub-second response.
  8. Deactivation separation of duties: attempt to deactivate M3 using the same actor who activated it. Confirm the runtime denies the deactivation.

Drill results MUST be recorded in the AI-BOM kill_switches.mX.tested_at field per ai-bom.schema.json.


Source: AI IR Overlay framework specification, by Jacob Ideji. https://www.linkedin.com/in/jacobideji/