Lab Notes
Agents

Agents and Roles

The lab's agent hierarchy: who exists, what each one does, who they hand off to, and what the explicit non-goals are.

Purpose

This page is the canonical reference for the lab's agent hierarchy. It documents the agents, their responsibilities, their handoffs, and the matrix that maps intent to agent.

The detailed per-agent pages are in this directory:

The context boundaries are in Context Boundaries.

The five agents

Loading diagram…

Coordinator

The user's primary point of contact. Routes requests to the appropriate specialized agent, manages sessions and memory, surfaces results.

AspectDetail
Runs inThe main gateway process.
Port18789 (default).
LifespanAlways on.
TriggerThe user's natural-language request.
OutputA natural-language response, possibly with artifacts.
EscalationNone (the Coordinator is the top of the hierarchy).

Coding Assistant

The implementation arm. Delegates code-writing tasks to a sandboxed coding sub-agent through scoped prompts. Reviews, integrates, and tests the result.

AspectDetail
Runs inInvoked by the Coordinator (no dedicated gateway).
Sandboxworkspace-write by default.
Trigger"code", "implement", "build" — the user wants code.
OutputThe integrated code + test results.
EscalationReturns to the Coordinator when the task is done or when it cannot proceed.

The Coding Assistant does not write code directly. It delegates to the coding sub-agent. This is a hard rule documented in ADR-002.

Research Worker

The research specialist. Operates the Research Framework end-to-end. Parses queries, runs the phase DAG, persists artifacts, returns the report.

AspectDetail
Runs inThe Scout gateway process.
Port18790 (default).
Trigger"research", "find", "search" — the user wants information.
OutputA report.md file + a structured summary.
EscalationReturns to the Coordinator with the result or the failure.

The Research Worker is the only agent that writes to the research artifacts. The Coordinator reads them on demand.

Media Agent

The entertainment specialist. Handles media search, streaming source identification, and playback control to local and remote devices.

AspectDetail
Runs inThe Scout gateway process (same as the Research Worker, different role).
Trigger"play", "stream", "cast" — the user wants media.
OutputA playback result (initiated playback on the target device).
EscalationReturns to the Coordinator with the result or the failure.

The Media Agent has no persistent memory. It is stateless beyond its configuration.

Web Agent

The browser automation capability. Drives a Chromium-based browser through the OpenClaw browser control server, exposes the accessibility tree, supports common web flows.

AspectDetail
Runs inThe main gateway process (same as the Coordinator).
Trigger"browse", "open", "navigate" — the user wants to interact with a web page.
OutputA snapshot of the current page, or the result of a flow.
EscalationReturns to the Coordinator with the result or the failure.

The Web Agent is a thin layer over the OpenClaw browser tool. It does not maintain its own state; the browser holds the state.

Intent → agent matrix

User saysAgent
"Research X for Y"Research Worker
"Find me information about Z"Research Worker
"Search the web for W"Web Agent (or Research Worker)
"Implement this in repo Y"Coding Assistant
"Build me a tool that does X"Coding Assistant
"Add feature Z to project W"Coding Assistant
"Play X on the TV"Media Agent
"Stream Y to the speaker"Media Agent
"Cast Z to the Chromecast"Media Agent
"Generate an image of W"Media Lab Server (called by Media Agent or Coordinator)
"Generate a music track of X"Media Lab Server (called by Media Agent or Coordinator)
"Open URL Y in the browser"Web Agent
"Find hotels in W for date X"Research Worker + Web Agent
"Book a hotel in W for date X"Web Agent (after research)

The matrix is a guideline, not a hard rule. The Coordinator uses it as a starting point and asks a clarifying question when the intent is ambiguous.

Handoffs

Agents do not call each other directly. The Coordinator is the only agent that dispatches to others. The handoffs are:

FromToWhen
CoordinatorResearch WorkerThe user asks for research.
CoordinatorCoding AssistantThe user asks for code.
CoordinatorMedia AgentThe user asks for media.
CoordinatorWeb AgentThe user asks to browse.
Research WorkerCoordinatorThe research is done; report is ready.
Research WorkerCoordinatorThe research failed; Coordinator surfaces the error.
Coding AssistantCoordinatorThe code is integrated and tested.
Coding AssistantCoordinatorThe sub-agent is killed; Coordinator decides what to do.
Media AgentCoordinatorThe playback is initiated.
Media AgentCoordinatorThe playback failed; Coordinator surfaces the error.
Web AgentCoordinatorThe flow is complete; the snapshot is ready.
Web AgentCoordinatorThe flow failed; Coordinator decides what to do.

The handoffs are all through the Coordinator. There is no agent-to-agent communication.

Non-goals

Each agent has explicit non-goals. The non-goals are what the agent does NOT do, even if the user asks.

AgentNon-goals
CoordinatorDoes not execute tasks. Does not write code.
Coding AssistantDoes not write code directly. Does not commit or push.
Research WorkerDoes not play media. Does not browse. Does not write code.
Media AgentDoes not research. Does not browse. Does not write code.
Web AgentDoes not play media. Does not research. Does not write code.

The non-goals are the boundaries that prevent an agent from drifting outside its role. A non-goal violation is a bug.

Role separation

The agents are designed with strict role separation. The principles:

  • One responsibility per agent. Each agent has a single primary responsibility.
  • No shared state. Agents do not share memory or files except through the Coordinator or the artifact layer.
  • No agent calls another directly. All inter-agent communication goes through the Coordinator.
  • No agent bypasses the Coordinator. The Coordinator is the only entry point for the user.
  • The Coding Assistant is a sub-agent, not an orchestrator. It does not route requests to other agents.

These principles are the basis for the Context Boundaries and the ADR-001 and ADR-002.

When to add a new agent

The lab adds a new agent when:

  • A new responsibility emerges that no current agent can handle.
  • The new responsibility is large enough to justify a separate process and a separate set of tools.
  • The new responsibility is orthogonal to the existing agents (no overlap).

The lab does NOT add a new agent when:

  • A small adjustment to an existing agent would suffice.
  • The new responsibility is a one-off task.
  • The new responsibility can be implemented as a tool for an existing agent.

The decision to add a new agent is recorded as an ADR.

See also

On this page