Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
kill
Emergency Kill Switch
curl --request POST \
  --url https://api.truthlocks.com/v1/agents/{agentId}/kill \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "reason": "<string>",
  "cascade": false
}
'
{
  "agent": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "agent_type": "orchestrator",
    "display_name": "<string>",
    "description": "<string>",
    "status": "active",
    "scopes": [
      "<string>"
    ],
    "metadata": {},
    "trust_score": 0.5,
    "public_key": "<string>",
    "session_count": 123,
    "keys": [
      {
        "kid": "<string>",
        "algorithm": "<string>",
        "public_key": "<string>",
        "status": "active"
      }
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "terminated_sessions": 123
}
Activates the emergency kill switch for an agent. This is a destructive, irreversible operation that immediately:
  1. Revokes the agent — sets the agent status to revoked, preventing all future API calls
  2. Terminates all active sessions — forcibly ends every session associated with the agent
  3. Voids pending receipts — marks all unfinalized receipts as voided to prevent downstream reliance on incomplete data
The kill switch is designed for critical security incidents where an agent must be immediately neutralized — such as confirmed credential compromise, detected malicious behavior, or regulatory emergency shutdown orders.
Irreversible Operation. Agent revocation via kill switch cannot be undone. A new agent must be registered to resume operations. All voided receipts are permanently marked and cannot be restored.

Audit Trail

The kill switch activation generates a killswitch.activated event with full details, a transparency-log receipt anchoring the revocation, and notifications to all configured webhook endpoints and SIEM integrations.

Authentication

X-API-Key
string
required
API key with agents:kill scope. This is a privileged scope typically restricted to security team keys. Alternatively, pass a Bearer JWT token with the security-admin role.
X-Tenant-ID
string
required
Tenant identifier for multi-tenant isolation.

Path Parameters

id
string
required
Agent identifier to kill (e.g. maip-agent:01HXYZ9A1B2C3D4E5F).

Request

reason
string
required
Mandatory explanation for the kill switch activation. Recorded in the audit trail and included in all notifications.
operator_id
string
Identifier of the human operator or automated system that initiated the kill. If omitted, the API key identity is used.

Response

agent_id
string
The revoked agent identifier.
agent_status
string
Agent status after kill switch: revoked.
sessions_terminated
integer
Number of active sessions that were forcibly terminated.
receipts_voided
integer
Number of pending receipts that were voided.
reason
string
The reason provided for the kill switch activation.
operator_id
string
The operator who initiated the kill.
receipt_id
string
Transparency-log receipt anchoring the kill switch event.
killed_at
string
ISO 8601 timestamp of the kill switch activation.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Path Parameters

agentId
string<uuid>
required

Agent identifier

Body

application/json
reason
string
required

Reason for emergency kill

cascade
boolean
default:false

If true, also kill all agents this agent delegated to

Response

Agent killed

agent
object
terminated_sessions
integer

Number of sessions terminated