YOLO 模式
YOLO 模式会禁用 ZeroClaw 提供的所有安全限制。没有审批提示、没有工作区边界、没有 shell 策略、没有命令允许/拒绝列表、没有 OTP、没有沙箱。代理可以立即运行任何 shell 命令、访问任何文件、请求任何 URL,无需询问。
此模式适用于开发机、家庭实验室以及临时虚拟机。 请勿在共享基础设施上运行 YOLO 模式。请勿在环境变量中包含生产凭据的机器上运行 YOLO 模式。如果你不了解拥有
rm -rf权限的自主代理能做什么,请勿运行 YOLO 模式。
当 YOLO 是最佳选择时
- 一个开发环境,你在其中快速迭代,而审批提示会拖慢你的进度
- 用于代理实验的一次性容器/虚拟机
- 一个家庭实验室的单板计算机(SBC),让你拥有机器上的每一个字节
- 在合并之前审查代理操作的 CI/CD 流水线
当 YOLO 不是最佳选择时
- 你的笔记本电脑中包含了你的电子邮件、浏览器配置文件以及用于生产环境的 SSH 密钥
- 共享服务器
- 一台有活跃客户的 VPS
- 在任何地方,如果代理可能通过某个渠道被不受信任的用户访问——例如,一个具有公共 Telegram 机器人的 YOLO 代理就是一个可通过 Telegram 访问的根 shell。
启用它
Name the YOLO posture explicitly on a dedicated risk profile (yolo is a good intent-naming choice) and point your agent at it:
[agents.devbox]
model_provider = "anthropic.home"
risk_profile = "yolo" # references the YOLO profile below
runtime_profile = "loose" # high iteration cap; independent of risk_profile
[risk_profiles.yolo]
level = "full"
workspace_only = false
require_approval_for_medium_risk = false
block_high_risk_commands = false
allowed_commands = []
forbidden_paths = []
sandbox_enabled = false
sandbox_backend = "none"
[runtime_profiles.loose]
max_tool_iterations = 100
max_actions_per_hour = 1000
[security.otp]
enabled = false
[security.estop]
enabled = false
[gateway]
require_pairing = false
If multiple agents share the host, give the YOLO-bound one its own profile (the yolo block) and keep your other agents on a stricter profile (e.g. hardened) — [risk_profiles.<alias>] is per-profile, so a YOLO agent and a hardened agent can coexist in the same config.
[agents.devbox]
risk_profile = "yolo" # this one runs wide-open
[agents.publicbot]
risk_profile = "hardened" # this one stays gated
channels = ["telegram.home"]
[risk_profiles.hardened]
level = "supervised"
workspace_only = true
require_approval_for_medium_risk = true
block_high_risk_commands = true
你失去的
| 守卫 | 正常行为 | YOLO 行为 |
|---|---|---|
| 自主性 | 中等风险操作需要操作员批准 | 代理在无干预的情况下运行所有任务 |
| 工作区边界 | Agent 只能访问 ~/.zeroclaw/workspace/ | Agent 可以访问其用户可访问的任何路径 |
| Shell 策略 | 未知命令被阻止 | 任何命令都会执行 |
| 禁止的路径 | /etc、/sys、/boot、~/.ssh 等被阻止 | 没有限制的路径 |
| 沙盒 | Docker / Firejail / Landlock / Seatbelt 隔离工具执行 | 工具以 ZeroClaw 进程用户身份运行 |
| OTP 门控 | 门控操作需要代码 | 无门 |
| 紧急停止 | zeroclaw estop 会停止正在运行的操作 | 除了 SIGTERM 之外,没有其他的终止语义 |
| 网关配对 | 客户端必须先配对 | 任何到达端口的人都将拥有该代理 |
你保留的内容
YOLO 模式不会使智能体失去理智:
- 工具收据 仍然会被写入。你可以使用
tail -f查看收据日志,了解具体执行了哪些操作。 - 审计日志 在启用时(
[security.audit] enabled = true)仍然有效。强烈建议在 YOLO 中启用。 - 对话记忆 仍然有效——仍然保留着发生过的记录。
你并没有关闭日志,你关闭的是审批关卡和路径强制。
还原
Delete the YOLO settings from the risk profile, or flip [risk_profiles.<alias>] level = "supervised" back and restart the service. Nothing persists across config changes — each startup loads the current config fresh.