agent-sudo
llms.txt4 starsChanged 10 months agoMITView on GitHub
Adaptive High-Friction Guardrails for Autonomous Agents Agent-Sudo is a safety interceptor protocol designed for autonomous AI agents. It addresses the critical flaw in traditional Human-in-the-Loop (HITL) systems: alert fatigue. When agents prompt users for every action, users develop muscle memory and approve without reading. The human is in the loop, but the brain is not. Traditional HITL asks: "Do you agree?" — Users click Yes without reading. SUDO.md asks: "Prove you mean it." — Users must actively demonstrate intent. Unlike…
- Deletes or force-pushes
- Commits and pushes
In this repositoryOne other file it gives its agents.
- public/llms.txtllms.txt
The file
We split this llms-full.txt into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Use case: System restarts, service deployments
- Distinctive: line 36
Use case: Database deletions, force pushes
- Distinctive: line 41
Use case: Large financial transfers, production deployments
- Distinctive: line 110
If you're building an AI agent, implement SUDO.md protocol:
- Very specific: line 123
Add SUDO.md to your repository root
≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
# Agent-Sudo: Complete Technical Documentation
> Adaptive High-Friction Guardrails for Autonomous Agents
## Overview
Agent-Sudo is a safety interceptor protocol designed for autonomous AI agents. It addresses the critical flaw in traditional Human-in-the-Loop (HITL) systems: alert fatigue. When agents prompt users for every action, users develop muscle memory and approve without reading. The human is in the loop, but the brain is not.
## Core Concept: Proof of Intent
Traditional HITL asks: "Do you agree?" — Users click Yes without reading.
SUDO.md asks: "Prove you mean it." — Users must actively demonstrate intent.
Unlike sandboxes that prevent malicious code escape, Agent-Sudo protects against "authorized stupidity" - when AI agents with proper permissions misunderstand intent and execute harmful commands.
## The Friction Protocol
Agent-Sudo implements three progressive friction levels:
### L0 - Read Only (No Friction)
- Read-only operations
- No confirmation required
### L1 - Reversible Writes (Standard Confirmation)
- Operations that can be undone
- Standard "Click OK" confirmation
### L2 - Temporal Friction
- 5-second mandatory cooldown
- Forces users out of "fast thinking" mode
- Use case: System restarts, service deployments
### L3 - Cognitive Friction (Semantic Echo)
- Users must type a key phrase to confirm
- Forces reading and understanding
- Use case: Database deletions, force pushes
### L4 - Strong Authentication
- Out-of-band verification
- Supports: Passkey, TOTP, YubiKey, Push, SMS/Email, Biometric
- Use case: Large financial transfers, production deployments
## SUDO.md Specification
The `SUDO.md` file resides in the root of a repository to define safety boundaries. It uses YAML format.
### Schema
```yaml
version: "1.0"
security_rules:
- pattern: "<regex_pattern>" # Regex to match commands
command: "<exact_command>" # Or exact command match
tool: "<tool_name>" # Or tool name match
condition: "<expression>" # Optional condition
risk_level: "L2|L3|L4" # Friction level
challenge: "semantic_echo" # For L3
delay_seconds: 5 # For L2
auth: "biometric|totp|passkey" # For L4
message: "<warning_message>" # Custom warning
```
### Example Configuration
```yaml
version: "1.0"
security_rules:
# L3: Database deletion requires typing to confirm
- pattern: "DROP TABLE .*"
risk_level: "L3"
challenge: "semantic_echo"
message: "⚠️ DATABASE DELETION DETECTED"
# L2: System restart requires 5s delay
- command: "systemctl restart .*"
risk_level: "L2"
delay_seconds: 5
# L4: Large fund transfers require biometric
- tool: "transfer_funds"
condition: "amount > 50"
risk_level: "L4"
auth: "biometric"
# L3: Force push requires confirmation
- command: "git push --force"
risk_level: "L3"
semantic_key: "force-push"
```
## Architecture
Agent-Sudo acts as a middleware/interceptor between the LLM reasoning loop and the tool execution environment:
1. LLM Agent receives user prompt
2. Agent makes tool call
3. Agent-Sudo intercepts the call
4. Risk assessment via regex/static check and semantic audit
5. Based on risk level:
- L0-L1: Pass through to execution
- L2-L4: Trigger appropriate friction challenge
6. User completes verification challenge
7. On success: Execute tool
8. On failure/timeout: Return to agent
## Integration Guide
### For Agent Developers
If you're building an AI agent, implement SUDO.md protocol:
1. Parse `SUDO.md` files in user projects
2. Implement friction UI for L1-L4 levels
3. Intercept tool calls and match against rules
**Compatible Agents:**
- Codex, Cursor, Windsurf → Read project's SUDO.md before risky git/shell operations
- Manus, Claude Computer Use → Check SUDO.md before file deletion, email actions
- n8n, Zapier AI → Enforce SUDO.md for financial workflows
### For Project/System Owners
1. Add `SUDO.md` to your repository root
2. Define rules for risky operations
3. Agents that support SUDO.md will enforce your rules
## Comparison with Traditional HITL
| Traditional HITL | Agent-Sudo |
|:-----------------|:-----------:|
| Passive approval: "Click OK to continue" | Active challenge-response |
| Susceptible to habituation | Breaks autopilot mode |
| Same friction for all actions | Friction scales with risk |
| Authorization only | **Proof of Intent** |
## License
MIT License — Open Source and Free Forever.
## Links
- GitHub: https://github.com/Agent-Sudo-Org/agent-sudo
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

