多智能体沙箱与工具配置
概述 多智能体设置中的每个智能体现在可以拥有自己的: 沙箱配置(agents.list[].sandbox 覆盖 agents.defaults.sandbox) 工具限制(tools.allow / tools.deny,以及 agents.list[].tools) 这允许你运行具有不同安全配置文件的多个智能体: 具有完全访问权限的个人助手 具有受限工具的家庭/工作智能体 在沙箱中运行的面向公众的智能体 setupCommand 属于 sandbox.docker 下(全局或按智能体),在容器创建时运行一次。 认证是按智能体的:每个智能体从其自己的 agentDir 认证存储读取: ~/.openclaw/agents/<agentId>/agent/auth-profiles.json 凭证不会在智能体之间共享。切勿在智能体之间重用 agentDir。 如果你想共享凭证,请将 auth-profiles.json 复制到其他智能体的 agentDir 中。 有关沙箱隔离在运行时的行为,请参见沙箱隔离。 有关调试"为什么这被阻止了?",请参见沙箱 vs 工具策略 vs 提权 和 openclaw sandbox explain。 配置示例 示例 1:个人 + 受限家庭智能体 { "agents": { "list": [ { "id": "main", "default": true, "name": "Personal Assistant", "workspace": "~/.openclaw/workspace", "sandbox": { "mode": "off" } }, { "id": "family", "name": "Family Bot", "workspace": "~/.openclaw/workspace-family", "sandbox": { "mode": "all", "scope": "agent" }, "tools": { "allow": ["read"], "deny": ["exec", "write", "edit", "apply_patch", "process", "browser"] } } ] }, "bindings": [ { "agentId": "family", "match": { "provider": "whatsapp", "accountId": "*", "peer": { "kind": "group", "id": "[email protected]" } } } ] } 结果: ...