Each agent in a multi-agent setup can override the global sandbox and tool policy. This page covers per-agent configuration, precedence rules, and examples.Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sandboxing
Backends and modes — full sandbox reference.
Sandbox vs tool policy vs elevated
Debug “why is this blocked?”
Elevated mode
Elevated exec for trusted senders.
Configuration examples
Example 1: Personal + restricted family agent
Example 1: Personal + restricted family agent
mainagent: runs on host, full tool access.familyagent: runs in Docker (one container per agent), onlyreadtool.
Example 2: Work agent with shared sandbox
Example 2: Work agent with shared sandbox
Example 2b: Global coding profile + messaging-only agent
Example 2b: Global coding profile + messaging-only agent
- default agents get coding tools.
supportagent is messaging-only (+ Slack tool).
Example 3: Different sandbox modes per agent
Example 3: Different sandbox modes per agent
Configuration precedence
When both global (agents.defaults.*) and agent-specific (agents.list[].*) configs exist:
Sandbox config
Agent-specific settings override global:agents.list[].sandbox.{docker,browser,prune}.* overrides agents.defaults.sandbox.{docker,browser,prune}.* for that agent (ignored when sandbox scope resolves to "shared").Tool restrictions
The filtering order is:Provider tool profile
tools.byProvider[provider].profile or agents.list[].tools.byProvider[provider].profile.Precedence rules
Precedence rules
- Each level can further restrict tools, but cannot grant back denied tools from earlier levels.
- If
agents.list[].tools.sandbox.toolsis set, it replacestools.sandbox.toolsfor that agent. - If
agents.list[].tools.profileis set, it overridestools.profilefor that agent. - Provider tool keys accept either
provider(e.g.google-antigravity) orprovider/model(e.g.openai/gpt-5.4).
Empty allowlist behavior
Empty allowlist behavior
If any explicit allowlist in that chain leaves the run with no callable tools, OpenClaw stops before submitting the prompt to the model. This is intentional: an agent configured with a missing tool such as
agents.list[].tools.allow: ["query_db"] should fail loudly until the plugin that registers query_db is enabled, not continue as a text-only agent.group:* shorthands that expand to multiple tools. See Tool groups for the full list.
Per-agent elevated overrides (agents.list[].tools.elevated) can further restrict elevated exec for specific agents. See Elevated mode for details.
Migration from single agent
- Before (single agent)
- After (multi-agent)
Legacy
agent.* configs are migrated by openclaw doctor; prefer agents.defaults + agents.list going forward.Tool restriction examples
- Read-only agent
- Safe execution (no file modifications)
- Communication-only
Common pitfall: “non-main”
Testing
After configuring multi-agent sandbox and tools:Test tool restrictions
- Send a message requiring restricted tools.
- Verify the agent cannot use denied tools.
Troubleshooting
Agent not sandboxed despite `mode: 'all'`
Agent not sandboxed despite `mode: 'all'`
- Check if there’s a global
agents.defaults.sandbox.modethat overrides it. - Agent-specific config takes precedence, so set
agents.list[].sandbox.mode: "all".
Tools still available despite deny list
Tools still available despite deny list
- Check tool filtering order: global → agent → sandbox → subagent.
- Each level can only further restrict, not grant back.
- Verify with logs:
[tools] filtering tools for agent:${agentId}.
Container not isolated per agent
Container not isolated per agent
- Set
scope: "agent"in agent-specific sandbox config. - Default is
"session"which creates one container per session.
Related
- Elevated mode
- Multi-agent routing
- Sandbox configuration
- Sandbox vs tool policy vs elevated — debugging “why is this blocked?”
- Sandboxing — full sandbox reference (modes, scopes, backends, images)
- Session management