This repository demonstrates a true runtime kill switch for autonomous execution.
A running worker process:
- Registers once
- Validates repeatedly
- Halts immediately when its external permission is revoked
No redeploys.
No signals.
No cooperation from the runtime.
This demo shows how MachineID enforces external, non-cooperative control over execution.
The running process:
- Does not decide when it stops
- Does not receive warnings
- Does not degrade gracefully
If validation fails, execution halts.
- Python 3.10+
- A free MachineID org key (supports 3 devices). One click here https://machineid.io
pip install -r requirements.txtexport MACHINEID_ORG_KEY=org_your_key_here
export MACHINEID_DEVICE_ID=kill-switch-demo-01python runaway_agent.py
This process will continue running as long as validation succeeds.
In a second terminal:
python kill_switch_worker.py
Then type:
revoke
The agent in Terminal 1 will halt on the next validation boundary.
Important:
- The running process exits immediately.
- It does NOT restart automatically.
To allow future execution again:
restore
After restoring, you must manually restart the agent in Terminal 1.
To check current permission state:
status
You can also revoke from the dashboard while Terminal 1 is running:
- Open https://machineid.io/dashboard
- Locate the running device
- Click Revoke
On the next validation boundary, the agent halts immediately.
allowed = false
This allows operators to stop execution:
- From another machine
- From a mobile device
- During an incident or escalation
- Without SSH access
- Without redeploying
- Without restarting the process
Authority lives outside the runtime.
Most systems rely on cooperative control:
- “Please stop”
- “Check this flag”
- “We’ll shut it down on the next deploy”
These approaches fail under:
- Runaway loops
- Leaked credentials
- Stale intent
- Unattended execution
- Incident response pressure
This demo shows enforced control, not advisory signals.
Execution does not negotiate.
All behavior reduces to one rule:
Register. Validate. Work.
If validation fails, work does not continue.
runaway_agent.py— Long-running agent with validation boundarieskill_switch_worker.py— Interactive operator console (revoke / restore / status)requirements.txt— Minimal dependenciesREADME.md— This document
- Dashboard → https://machineid.io/dashboard
- Docs → https://machineid.io/docs
MIT License
Built by MachineID.io