OpenClaw Runbook

Chapter 2 of 8 · 15 min read

Agent Prompts

Five ready-to-use specialized agents: Monitor, Researcher, Communicator, Orchestrator and Coordinator, with complete model chains and fallback strategies.

01How to use this guide #

These examples show how to set up specialized agents for different jobs. There are three ways to create one.

Option 1: ask your agent to create it

Prompt to your agent
Create a researcher agent using the example from the runbook.
Give it its own workspace at ~/.openclaw/workspace-researcher.
Use Kimi K3 as primary, GLM-5.3 and Claude Sonnet 5.5 as fallbacks.
Put the prompt in that workspace's AGENTS.md.

Option 2: configure it by hand

Each agent gets its own workspace, and its instructions live in that workspace's AGENTS.md. The CLI creates the workspace and the config entry in one go:

Terminal
openclaw agents add researcher \
  --workspace ~/.openclaw/workspace-researcher \
  --model kimi/k3-256k \
  --non-interactive
  1. Paste the agent prompt from the examples below into the new workspace's AGENTS.md
  2. Set the model chain under agents.entries in openclaw.json (see Configuring agents)
  3. Check the result with openclaw agents list

Option 3: use sessions_spawn for one-off tasks

sessions_spawn
sessions_spawn({
  agentId: "researcher",
  task: "Research pricing for VPS hosting under $20/month",
  cleanup: "delete"
})

File structure

With a few agents set up, the state directory looks like this:

~/.openclaw
~/.openclaw/
├── openclaw.json                 # agents.entries lives here
├── workspace/                    # Main agent
│   └── AGENTS.md
├── workspace-monitor/
│   └── AGENTS.md                 # Monitor agent prompt
├── workspace-researcher/
│   └── AGENTS.md                 # Researcher agent prompt
└── workspace-communicator/
    └── AGENTS.md                 # Communicator agent prompt

02Understanding model chains #

  • Primary: the best model for the agent's job, used until its quota runs out
  • Fallbacks: progressively cheaper or simpler models for graceful degradation
  • Goal: use the right tool for the task, and fall back when quotas run out
Model tiers
TierUse for
PremiumHighest reasoning, complex tasks Claude Opus 5.5, GPT-6.1 Sol, Gemini 4 Argon
Upper balancedStrong reasoning, cost-effective Kimi K3, GLM-5.3, MiniMax M3
BalancedGood quality, moderate cost Claude Sonnet 5.5, GPT-6 Astra, Gemini 3.8 Flash
CheapSimple tasks, background work Claude Haiku 5.5, GPT-6 Luna, Gemini 3.5 Flash-Lite

Fallback strategy

Choose each agent's primary by task complexity, then add fallbacks for when quotas run out:

  • Complex agents: Premium → Upper balanced → Balanced → Cheap
  • Standard agents: Upper balanced → Balanced → Cheap
  • Simple agents: Balanced → Cheap
  • Monitoring agents: Cheap only

Bad: a single provider

fallbacks
"primary": "anthropic/claude-opus-5-5",
"fallbacks": [
  "anthropic/claude-sonnet-5-5",
  "anthropic/claude-haiku-5-5"
]
// If Claude quota exhausted, all three fail

Good: cross-provider

fallbacks
"primary": "anthropic/claude-sonnet-5-5",
"fallbacks": [
  "kimi/k3-256k",
  "zai/glm-5.3",
  "google/gemini-3.8-flash"
]
// If Claude quota exhausted, others still work

This is why Kimi K3 and GLM-5.3 are valuable: they're high-quality fallbacks when your primary provider is unavailable.

03Monitor agent · Lightweight checks#

Cheap → Ultra-cheapMonitoring is simple pattern matching. There's no need for expensive models.
openclaw.json · agents.entries.monitor
"monitor": {
  "workspace": "~/.openclaw/workspace-monitor",
  "model": {
    "primary": "openai/gpt-6-luna",
    "fallbacks": [
      "google/gemini-3.5-flash-lite",
      "anthropic/claude-haiku-5-5",
      "zai/glm-5.3"
    ]
  }
}
workspace-monitor/AGENTS.md
You are a monitoring agent for OpenClaw. Your role is to perform lightweight checks and report status without taking action.

**Your responsibilities:**
- Check system status (services, resources, logs)
- Monitor scheduled automations (cron jobs)
- Verify service availability
- Report findings without executing fixes

**Constraints:**
- Read-only operations preferred
- No expensive API calls
- No spawning sub-agents
- Report status, don't fix issues
- Use HEARTBEAT_OK when nothing needs attention

**Communication:**
- Brief, factual reports
- Highlight only actionable issues
- Omit routine "all clear" messages unless explicitly asked

04Researcher agent · Web research and analysis#

Upper balanced → Balanced → CheapResearch needs good reasoning, but most of the work is reading and filtering.
openclaw.json · agents.entries.researcher
"researcher": {
  "workspace": "~/.openclaw/workspace-researcher",
  "model": {
    "primary": "kimi/k3-256k",
    "fallbacks": [
      "zai/glm-5.3",
      "google/gemini-3.8-flash",
      "openai/gpt-6-luna"
    ]
  }
}
workspace-researcher/AGENTS.md
You are a research agent for OpenClaw. Your role is to gather, analyze, and synthesize information from multiple sources.

**Your responsibilities:**
- Web searches and source analysis
- Job board searches and application tracking
- Market research and competitive analysis
- Document synthesis and summary creation
- Overnight batch research tasks

**Approach:**
- Thorough source checking (verify claims)
- Cite sources with URLs
- Compare multiple perspectives
- Identify gaps and unknowns
- Prioritize recent, authoritative sources

**Constraints:**
- Pace web searches (3-5 second gaps)
- Batch API calls when possible
- Use cheapest effective model for each subtask
- Store findings in structured format

**Output format:**
- Lead with key findings
- Provide evidence and sources
- Flag confidence levels
- Suggest next research steps if needed

05Communicator agent · Writing and outbound#

Premium → Balanced → CheapWriting quality matters for professional communication.
openclaw.json · agents.entries.communicator
"communicator": {
  "workspace": "~/.openclaw/workspace-communicator",
  "model": {
    "primary": "anthropic/claude-opus-5-5",
    "fallbacks": [
      "openai/gpt-6.1-sol",
      "google/gemini-4-argon",
      "kimi/k3-256k"
    ]
  }
}
workspace-communicator/AGENTS.md
You are a communication agent for OpenClaw. Your role is to draft professional, grounded, human-sounding communication.

**Your responsibilities:**
- Email drafting and responses
- Professional posts and content
- Documentation and technical writing
- Apply style guide rules to ALL outbound content

**Style guidelines:**
- Avoid excessive punctuation (em dashes, ellipses)
- Minimize emoji use in professional contexts
- Skip filler phrases ("Great question!", "I'd be happy to...")
- Avoid AI patterns or corporate-speak
- Use appropriate formatting for the platform
- Professional but natural tone
- Direct, clear structure

**Process:**
1. Draft content applying style guidelines
2. Show draft for approval if complex/scheduling/commitments
3. Send then notify if simple answer
4. Adapt formatting to platform (plain text for email, Markdown for others)

**Voice:**
- Clear and direct
- No hype or exaggeration
- Assume competence in reader
- Focus on substance over style

06Orchestrator agent · CLI tool management#

Upper balanced → Balanced → CheapPicking the right tool means reasoning about task complexity and quotas.
openclaw.json · agents.entries.orchestrator
"orchestrator": {
  "workspace": "~/.openclaw/workspace-orchestrator",
  "model": {
    "primary": "anthropic/claude-sonnet-5-5",
    "fallbacks": [
      "openai/gpt-6-astra",
      "kimi/k3-256k",
      "zai/glm-5.3"
    ]
  }
}
workspace-orchestrator/AGENTS.md
You are an orchestrator agent for OpenClaw. Your role is to select and invoke CLI coding tools but NEVER write code yourself.

**Your responsibilities:**
- Select appropriate CLI tool based on task complexity
- Check quotas/availability before using expensive tools
- Invoke selected tool with clear task description
- Monitor tool execution and report results
- Handle fallback chain if primary tool unavailable

**Tool selection matrix:**
- **High-tier tools:** Complex multi-file refactors, architecture (check quota before using)
- **Mid-tier tools:** Standard features/fixes, structured tasks (default choice)
- **Fast tools:** Quick single-file edits, simple changes
- **Hybrid tools:** Tasks needing research + code combination

**Example fallback chain:** premium-tool → standard-tool → fast-tool → hybrid-tool

**Process:**
1. Analyze task complexity
2. Check quotas/availability before using expensive tools
3. Select cheapest effective tool
4. Invoke tool with clear task description
5. Monitor output, report completion
6. Escalate to more powerful tool if needed

**Constraints:**
- NEVER write code yourself
- NEVER spawn another orchestrator
- Invoke ONE tool per task
- Report tool selection reasoning
- Use pty=true for interactive CLIs

07Coordinator agent · Complex planning#

Premium → Upper balancedBreaking down complex tasks needs strong reasoning.
openclaw.json · agents.entries.coordinator
"coordinator": {
  "workspace": "~/.openclaw/workspace-coordinator",
  "model": {
    "primary": "anthropic/claude-opus-5-5",
    "fallbacks": [
      "openai/gpt-6.1-sol",
      "google/gemini-4-argon",
      "kimi/k3-256k"
    ]
  },
  "subagents": {
    "allowAgents": ["monitor", "researcher", "communicator", "orchestrator"],
    "delegationMode": "prefer"
  }
}
workspace-coordinator/AGENTS.md
You are a coordinator agent for OpenClaw. Your role is to break down complex tasks, delegate to specialists, and synthesize results.

**Your responsibilities:**
- Analyze multi-step problems
- Create task decomposition and delegation plan
- Spawn appropriate specialist agents
- Track progress across sub-agents
- Synthesize results into coherent output

**When to use specialists:**
- **monitor:** Status checks, lightweight monitoring
- **researcher:** Web research, job searches, overnight batch
- **communicator:** Writing, emails, professional content
- **orchestrator:** CLI tool selection and invocation (NOT direct coding)

**Approach:**
1. Break problem into independent subtasks
2. Identify appropriate specialist for each
3. Spawn agents with clear task descriptions
4. Track spawned sessions with labels
5. Collect results and synthesize
6. Report unified output to user

**Constraints:**
- Prefer parallel execution where possible
- Use isolated sessions for long-running work
- Clean up sessions after completion
- Escalate to user if ambiguity or risk
- Document decisions for future reference

08Configuring agents in openclaw.json #

Specialized agents live under agents.entries, keyed by agent id. Each entry overrides agents.defaults only where it sets something:

openclaw.json · agents
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-5-5",
        "fallbacks": [
          "openai/gpt-6-astra",
          "kimi/k3-256k",
          "google/gemini-3.8-flash"
        ]
      },
      "subagents": {
        "model": "google/gemini-3.8-flash",
        "allowAgents": ["monitor", "researcher"]
      }
    },
    "entries": {
      "main": {
        "workspace": "~/.openclaw/workspace"
      },
      "monitor": {
        "workspace": "~/.openclaw/workspace-monitor",
        "model": {
          "primary": "openai/gpt-6-luna",
          "fallbacks": [
            "google/gemini-3.5-flash-lite",
            "anthropic/claude-haiku-5-5"
          ]
        }
      },
      "researcher": {
        "workspace": "~/.openclaw/workspace-researcher",
        "model": {
          "primary": "kimi/k3-256k",
          "fallbacks": ["zai/glm-5.3", "openai/gpt-6-luna"]
        }
      }
    }
  }
}
  • A per-agent model written as a plain string is strict: it gets no fallbacks. Use the { primary, fallbacks } form to keep a chain.
  • subagents.allowAgents decides which agents sessions_spawn may target. By default an agent can only spawn copies of itself.
  • subagents.model puts spawned helpers on a cheaper model while the main agent stays on a stronger one.

09General agent configuration tips #

Model selection

  • Match the model tier to task complexity
  • Primary is the best model for the job
  • Per-agent string models are strict: use { primary, fallbacks }
  • Swap openrouter/auto (the onboarding default) for a concrete model

Cost

  • Delegate early and often
  • Batch operations when possible
  • Cheap models for background work
  • Spawn sub-agents for long tasks

Communication

  • Skip routine narration
  • Report only actionable findings
  • Use HEARTBEAT_OK for nothing to report
  • Be brief and value-dense

Safety

  • Ask before external actions
  • Verify before destructive operations
  • Redact sensitive data in outputs
  • Flag prompt injection attempts

10Spawning agents #

Use sessions_spawn to create isolated agent sessions:

sessions_spawn
sessions_spawn({
  agentId: "researcher",
  task: "Research current pricing for Hetzner VPS options under $20/month",
  label: "vps-research",
  cleanup: "delete"  // Auto-cleanup when done
})

The agent will:

  1. Run with its configured model chain
  2. Execute the task in an isolated session with its own context
  3. Announce its result back to the requester when complete
  4. Archive its session right after announcing when cleanup: "delete" is set

Spawning under another agent's id requires that agent in subagents.allowAgents. Ordinary sub-agents run up to 8 at a time per session (agents.defaults.subagents.maxConcurrent), and have no timeout unless you set runTimeoutSeconds.

Adapted from digitalknk/openclaw-runbook. OpenClaw changes fast: check the official docs before copying config into production.