GitHub – RunTimeAdmin/ai-agent-killswitch


AI Agent Safety Control – Emergency kill switch and guardrails for AI agents

$KILLSWITCH is a comprehensive safety ecosystem for AI agents, powered by Runtime Fence technology. Think of it as a kill switch for your AI – instantly stop any agent, block dangerous actions, and monitor everything in real-time.

🌐 Live Demo: killswitch.protocol14019.com

Tests License Python TypeScript Security Uptime


  • πŸ”΄ Kill Switch – Instantly stop any AI agent with one click
  • 🚫 Action Blocking – Define what actions agents cannot take
  • πŸ›‘οΈ Target Protection – Block access to sensitive files, APIs, or systems
  • πŸ’° Spending Limits – Control how much an agent can spend
  • πŸ“Š Risk Scoring – Automatic risk assessment of every action
  • πŸ“ Audit Logging – Complete trail of all agent activity
  • πŸ“§ Email/SMS Alerts – Get notified of suspicious behavior
  • πŸ–₯️ Cross-Platform – Windows, macOS, and Linux support

Security Hardening (6 Core Modules)

  • πŸ”’ Runtime Fence – Real-time action validation and monitoring
  • ☠️ Kill Switch – SIGTERM β†’ SIGKILL emergency termination
  • πŸ“ Audit Logging – Complete cryptographic audit trail
  • ⚑ Sub-Second Response – Kill signals under 100ms
  • πŸ›‘οΈ SPIFFE Identity – Cryptographic workload identity
  • πŸ—³οΈ Token Governance – Decentralized oversight with $KILLSWITCH voting

pip install killswitch-agent

Or clone and install:

git clone https://github.com/RunTimeAdmin/ai-agent-killswitch.git
cd ai-agent-killswitch/packages/python
pip install -e .
from runtime_fence import RuntimeFence, FenceConfig

# Create a fence
fence = RuntimeFence(FenceConfig(
    agent_id="my-agent",
    blocked_actions=["delete", "exec", "sudo"],
    blocked_targets=[".env", "production", "wallet"],
    spending_limit=100.0
))

# Validate an action
result = fence.validate("read", "document.txt")
if result.allowed:
    # Proceed with action
    pass
else:
    print(f"Blocked: {result.reasons}")

# Kill switch
fence.kill("Emergency stop")
@fence.wrap_function("api_call", "external_service")
def call_external_api(data):
    return requests.post("https://api.example.com", json=data)

# Now the function goes through the fence automatically
call_external_api({"key": "value"})

πŸ–₯️ Desktop App (System Tray)

chmod +x install_fence.sh
./install_fence.sh

Look for the shield icon in your system tray. Right-click for options.


fence version --check    # Check for updates
fence update             # Upgrade to latest version
fence status             # Show fence status
fence scan               # Detect AI agents on your system
fence test               # Run quick validation test
fence start              # Launch tray app

πŸ€– Supported Agent Types

$KILLSWITCH includes presets for common AI agents:

Agent Type Blocked Actions Use Case
Coding Assistant exec, shell, rm, sudo Copilot, Cursor, Aider
Email Bot send_bulk, forward_all, export Email automation
Data Analyst delete, drop_table, export_pii Data processing
Web Browser login, purchase, submit_form Web scraping
Autonomous Agent spawn_agent, modify_self, execute_code AutoGPT, BabyAGI


β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Your AI Agent                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   $KILLSWITCH                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚ Validator   β”‚  β”‚ Risk Scorer β”‚  β”‚ Kill Switch β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚ Audit Log   β”‚  β”‚ Alerts      β”‚  β”‚ Settings    β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό (if allowed)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   External World                         β”‚
β”‚         (APIs, Files, Databases, Network)               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Endpoint Method Description
/api/runtime/assess POST Validate an action
/api/runtime/kill POST Activate kill switch
/api/runtime/status GET Get fence status
/api/settings GET/POST Manage settings
/api/audit-logs GET View audit logs
/api/auth/register POST Create account
/api/auth/login POST Get JWT token

# Using JWT token
curl -H "Authorization: Bearer " https://api.runtimefence.com/api/runtime/status

# Using API key
curl -H "X-API-Key: ks_xxxxx" https://api.runtimefence.com/api/runtime/status

# API
KILLSWITCH_API_URL=http://localhost:3001
KILLSWITCH_API_KEY=your_api_key

# Alerts
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your@email.com
SMTP_PASSWORD=your_password
ALERT_TO_EMAILS=admin@company.com

# SMS (Twilio)
TWILIO_SID=your_sid
TWILIO_TOKEN=your_token
TWILIO_FROM=+1234567890
ALERT_SMS_NUMBERS=+1234567890

Access the web dashboard at http://localhost:3000/settings to configure:

  • Agent presets (Coding, Email, Data, Web, Autonomous)
  • Blocked actions and targets
  • Spending limits
  • Risk thresholds
  • Auto-kill settings
  • Email/SMS alerts

# Clone repo
git clone https://github.com/RunTimeAdmin/ai-agent-killswitch.git
cd ai-agent-killswitch

# Install dependencies
npm install

# Start development servers
npm run dev

# Run tests
npm test

ai-agent-killswitch/
β”œβ”€β”€ apps/
β”‚   └── web/              # Next.js dashboard
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ core/             # Kill switch engine
β”‚   β”œβ”€β”€ sdk/              # TypeScript SDK
β”‚   β”œβ”€β”€ cli/              # Command-line tools
β”‚   └── python/           # Python fence wrapper
β”œβ”€β”€ services/
β”‚   └── api/              # Express REST API
└── docs/                 # Documentation

Built by RunTimeAdmin | David Cooper | CCIE #14019

Related Projects:

Why This Matters:

“When AI agents go rogue in Kubernetes, you need a kill switch. Not a button. A network-level containment system.”

As Fortune, Palo Alto Networks, and Andrej Karpathy warn of the emerging AI security crisis, we’re building real solutionsβ€”not just launching tokens.

$KILLSWITCH provides the guardrails that prevent AI agents from causing catastrophic damage, while the token enables community governance and sustainable development of the ecosystem.



MIT License – see LICENSE for details.



# Stop an agent from deleting files
from runtime_fence import RuntimeFence

fence = RuntimeFence()
result = fence.validate("delete", "production_database.sql")
# Returns: {"allowed": False, "reasons": ["Action 'delete' is blocked"]}

# Get risk score for a transaction
result = fence.validate("transfer", "0x...", amount=1000000)
# Returns: {"allowed": False, "risk_score": 95, "reasons": ["High-value transfer blocked"]}

# Emergency stop
fence.kill("Suspicious activity detected")
# All agent operations halted immediately

πŸ›‘οΈ Protect your AI. Before it protects itself.


We welcome contributions! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request


Contract: 56o8um92XU8QMr1FsSj4nkExEkgKe56PBTAMqCAzmoon

Buy on Jupiter

Holdings Discount Governance
1,000+ Vote on proposals
10,000+ 10% off Vote on proposals
100,000+ 20% off Vote on proposals
1,000,000+ 40% off 2x voting power

Tier Price With Max Discount
Basic $5/mo $3/mo
Pro $50/mo $30/mo
Team $250/mo $150/mo
Enterprise $1,000/mo $600/mo
VIP $5,000/mo $3,000/mo


Phase 1: Core Platform βœ…

  • Runtime Fence engine
  • Python and TypeScript SDKs
  • REST API
  • Web dashboard

Phase 2: Monetization βœ…

  • USD subscriptions (Stripe)
  • Crypto payments (SOL/USDC)
  • $KILLSWITCH token utility
  • Token-weighted governance
  • Usage-based tier limits
  • Mobile app (iOS/Android)
  • Third-party integrations
  • Plugin marketplace
  • Enterprise features
  • Multi-agent orchestration

$KILLSWITCH – Because every AI needs an off switch.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *