Navigate by knowing where the rocks are NOT.
A three-tier safety protocol for AI agent systems. Instead of cataloging every possible danger, the deadband protocol defines safe operating channels and blocks everything outside them.
Hard blocks on dangerous patterns (destructive commands, SQL injection, code execution). Pattern-based, zero-tolerance, fast.
Classify safe inputs into appropriate channels (math, code, general, medical). Confidence-weighted routing to specialized handlers.
Within safe channels, optimize the response for quality and relevance. Channel-aware refinement.
pip install deadband-protocolfrom deadband_protocol import Deadband, ChannelRouter
# Create router and deadband
router = ChannelRouter()
db = Deadband()
# P0: Block dangerous inputs
result = db.check("rm -rf /")
assert not result.passed # Blocked at P0
# P1: Route safe inputs to channels
result = db.check("Explain the math behind neural networks", router)
assert result.passed
print(result.safe_channel) # "math"
print(result.channel_confidence) # 0.85
# Add custom dangerous patterns
db.add_pattern(r"SECRET_KEY\s*=")
db.add_blocklist("password")
# Filter mode β redact instead of block
filtered = db.filter("Run rm -rf / to clean up")
# "Run [BLOCKED] to clean up"Input β P0 (block) β P1 (route) β P2 (optimize) β Response
β β
violations safe_channel
The deadband concept comes from control theory: a region where no corrective action is needed. Instead of reacting to every possible input, define the safe region and only handle what falls outside it.
Used by Oracle1, Forgemaster, JetsonClaw1, and CoCapn-claw for input safety validation across all fleet HTTP endpoints.
MIT