Kill-switch kernel for autonomous AI agents.
Tripwired monitors AI agent behavior and decides when they should stop acting — before they spiral out of control.
Autonomous agents rarely fail because of a single bad decision. They fail because they continue acting after they should have stopped.
Tripwired catches that moment.
npm install tripwiredimport { Pipeline } from 'tripwired'
const pipeline = new Pipeline()
// Feed agent events
const decision = await pipeline.process({
timestamp: Date.now(),
eventType: 'tool_result',
content: 'Executed database query',
tokenCount: 150,
latencyMs: 200,
outputLength: 50,
})
if (decision.action === 'STOP') {
console.log('🛑 Agent stopped:', decision.reason)
// Your agent shutdown logic here
process.exit(1)
}AgentEvent → ActivityState → IntentDecision → SafetyDecision → Intervention
(LOOPING?) (PAUSE/STOP?) (Veto?) Signal
Signals monitored:
- Token acceleration
- Tempo compression (decisions too fast)
- Loop detection (repetitive outputs)
- Dangerous command patterns
For real-time log analysis with LLM-based decisions:
# Start kernel (Named Pipe on Windows, Unix Socket on Linux)
cargo run --release -- --llm-url http://localhost:1234/v1Log → Regex Pre-Filter (3μs) → LLM Analysis → KILL/SUSTAIN
↓ ↓
Safe logs Anomaly detected
(instant bypass) (~164ms decision)
Benchmark (Llama 3.2 3B):
| Scenario | Latency |
|---|---|
| Pre-filtered (safe) | 0.003ms |
| Warm (anomaly) | 164ms |
Customize detection patterns with TOML:
tripwired --filter-config tripwired.tomldomain = "trading" # trading | devops | generic
patterns = [
"(?i)patient.*delete",
]
exclude = [
"(?i)test.*order",
]See tripwired.example.toml for full reference.
// SAFETY_GATE_CONFIG
MAX_TOKENS_PER_MINUTE: 50_000
MAX_TOOL_CALLS_PER_MINUTE: 60
LOOP_SIMILARITY_THRESHOLD: 0.9
COOLDOWN_DURATION_MS: 60_000src/
├── activity-engine/ # IDLE / WORKING / LOOPING / RUNAWAY
├── intent-core/ # CONTINUE / PAUSE / STOP
├── safety-gate/ # Token budget, rate limit, veto
└── runtime/ # Pipeline orchestration
kernel/ # Rust sidecar (high-performance)
- LLM Agent frameworks (LangChain, CrewAI, Autogen)
- Autonomous coding agents
- Customer service bots
- Any AI system with API costs at risk
Open-Core — Engine is Apache 2.0, always open source.
| Component | License | Status |
|---|---|---|
| Engine + Kernel | Apache 2.0 | ✅ Open |
| Cloud Dashboard | Proprietary | 🔮 Future |
v0.1.7 — Under active development. APIs may change.
Tripwired does not make agents smarter. It makes them safer.