Context Boundaries
What each agent can see, what it can write, and what it can never touch. The contracts that prevent one agent from corrupting another.
Purpose
This page documents the context boundaries between the agents. The boundaries are the contracts that prevent one agent from corrupting another and that make the system auditable.
The agents are:
- Coordinator — the main control agent.
- Coding Assistant — the implementation arm.
- Research Worker — the research specialist.
- Media Agent — the entertainment specialist.
- Web Agent — the browser automation capability.
Each agent has its own context. The boundaries are enforced by the framework's process model and by the filesystem permissions.
Process model
Each agent runs in its own process. The processes are isolated at the OS level. Communication between agents happens through:
- HTTP (for the Research Worker and the Media Agent, which expose gateways).
- Function calls (for the Coding Assistant, which is invoked by the Coordinator).
- The browser tool (for the Web Agent, which is a thin layer over the browser).
The processes are supervised by launchd (macOS) or
systemd (Linux). A crash in one process does not affect
the others.
Filesystem boundaries
Each agent has its own working directory and its own memory. The filesystem layout:
| Path | Owner | Other agents |
|---|---|---|
{workspace-root}/ | Coordinator | Read-only |
{workspace-root}/{project}/ | Project's agent | Read-only |
{workspace-root}/memory/ | Coordinator | Never |
{workspace-root}/skills/ | Coordinator (activates) | Read by all |
{workspace-root}/sessions/<id>/ | Session's agents | Never |
{research-root}/runs/<mission_id}/ | Research Worker | Read by Coordinator |
~/.openclaw-scout/ | Scout (Research Worker) | Read by Coordinator |
~/.openclaw/media/outbound/ | Media Lab Server | Read by Media Agent |
The boundaries are enforced by:
- Process isolation. Each agent runs as a different user identity where the OS allows.
- Filesystem permissions. Each directory has permissions that prevent unintended writes.
- Tool sandboxing. The Coding Assistant's tools run in a sandbox that prevents writes outside the workspace.
The Coordinator can read any of these locations. The other agents can read what they need to do their work and write only to their own locations.
Memory boundaries
The memory layer is documented in detail in Memory and Context. The summary:
MEMORY.mdis loaded in the main session only. The specialized agents do not load it.- Daily logs are per-agent.
- The Research Worker has its own workspace memory
(
{research-root}/) for mission artifacts. - The Media Agent has no persistent memory.
The Coordinator is the only agent that can edit
MEMORY.md. The other agents cannot.
Tool boundaries
Each agent has a list of tools it is allowed to invoke. The list is configured per agent in the framework's configuration.
| Agent | Tools (examples) |
|---|---|
| Coordinator | All tools (it is the dispatcher). |
| Coding Assistant | codex, git, npm, pytest, file manipulation tools (within the sandbox). |
| Research Worker | research-cli, run-research, tavily, duckduckgo, google-search, youtube-transcript, yt-dlp, perplexity. |
| Media Agent | chromecast, vlc, media-playback, media-lab-server, torrent-finder, subtitle-finder, dubbed-finder, media-info. |
| Web Agent | browser (the OpenClaw browser tool). |
The Coding Assistant's tools are sandboxed. The other agents' tools run in their own process and have the permissions of that process.
Communication boundaries
The agents communicate through:
- Request/response. The Coordinator sends a request to an agent; the agent sends a response back.
- File system. The Research Worker writes artifacts to disk; the Coordinator reads them on demand.
- Gateway HTTP. The Research Worker and the Media Agent expose HTTP gateways. The Coordinator calls them through HTTP.
The agents do not communicate through:
- Shared memory. There is no shared memory region.
- Environment variables. The agents do not read each other's environment variables.
- Direct function calls. The Coordinator calls agents through their public interfaces (HTTP, CLI).
The boundaries are designed so that an agent can be replaced without affecting the others. The Coordinator does not know how an agent implements its work; it knows the contract.
What each agent can never touch
| Agent | Cannot touch |
|---|---|
| Coordinator | The user's system (no shell access by default). |
| Coding Assistant | Anything outside the project's workspace (sandboxed). |
| Research Worker | The Coordinator's memory. The Coding Assistant's sandbox. |
| Media Agent | The Research Worker's artifacts. The Coding Assistant's sandbox. |
| Web Agent | Anything outside the browser. The user's filesystem. |
These constraints are enforced by:
- The process model (no shared resources).
- The tool sandboxing (Coding Assistant).
- The filesystem permissions.
- The framework's configuration (which tools are exposed to which agent).
What each agent must do
| Agent | Must |
|---|---|
| Coordinator | Log every request and response. Ask clarifying questions. |
| Coding Assistant | Never write code directly. Always go through the sub-agent. |
| Research Worker | Checkpoint after every step. Validate artifacts against schemas. |
| Media Agent | Confirm the target device before sending a playback command. |
| Web Agent | Use the accessibility tree, not screenshots, for actions. |
The "must" rules are part of the contract. Violations are bugs.
Boundary enforcement
The boundaries are enforced by:
- Process isolation. The agents run in different processes.
- Filesystem permissions. Each agent's working directory has permissions that prevent unintended writes.
- Tool sandboxing. The Coding Assistant's tools are sandboxed.
- Configuration. The framework's configuration declares which tools each agent can use.
- Audit. The audit layer (see Audit Model) records every cross-agent request.
A boundary violation is a bug. The Coordinator surfaces the violation to the user and asks how to proceed.