OpenClaw Playbook: From Zero to Fully Automated AI Agent
Summary: OpenClaw is a local-first, open-source AI agent platform that runs on your own hardware. This playbook covers installation, configuration, and workflow automation from zero to fully operational — no cloud required.
OpenClaw: The Complete Playbook
From Zero to Fully Automated AI Agent — On Your Own Machine, On Your Own Terms
1. Introduction and Big Picture
What Is OpenClaw?
OpenClaw is a local-first, open-source AI agent platform that runs on your own machine — a laptop, a home server, or a VPS — and connects directly to the messaging apps you already use: WhatsApp, Telegram, Slack, Discord, Signal, iMessage, Microsoft Teams, and more.
It is not a chatbot you visit on a website. It is not a SaaS product that holds your data on someone else's servers. OpenClaw is a daemon — a long-running background process that lives on your hardware, uses your files, calls APIs on your behalf, runs commands, sends messages, and automates workflows. You install it once, configure it to your needs, and it works for you around the clock.
The core philosophy is simple: your assistant, your machine, your rules.
That means:
- Your data stays on your infrastructure unless you explicitly send it to an external LLM API.
- You choose which AI models power your agents — ChatGPT (OpenAI), Claude (Anthropic), Gemini (Google), local models, or any provider through OpenRouter and API aggregators.
- You decide which tools and skills your agents can access, from read-only file access all the way to full shell execution and browser automation.
- You can audit everything through logs, config files, and structured output.
Why OpenClaw Exists
Most AI assistants today follow the same pattern: you go to a website, type a prompt, read a response, copy-paste it somewhere useful, and repeat. They are reactive and siloed. They cannot act on your behalf, access your local files, trigger workflows, or coordinate across the systems you actually work in.
OpenClaw was built to close that gap. It turns an LLM from a passive text generator into an autonomous agent that can:
- Read and write files on your system
- Execute shell commands
- Browse the web
- Call external APIs
- Send messages through your chat apps
- Run on a schedule
- Respond to webhooks
- Coordinate multi-step workflows
All while keeping you in control of permissions, approvals, and data flow.
For founders, operators, engineers, and power users who run on multiple tools and channels, OpenClaw becomes an always-on operating layer that sits between your LLMs and the rest of your stack.
Flagship Use Cases
OpenClaw is not a single-purpose tool. The most common deployments fall into these categories:
Personal productivity and founder OS. A single generalist agent that handles your inbox triage, drafts replies, summarizes long documents, manages your calendar, tracks tasks, and delivers daily briefings — all through a Telegram or WhatsApp conversation on your phone.
Outbound and sales automation. Agents that ingest lead lists, enrich contacts with research, generate personalized outreach emails, manage sending sequences, and triage replies — with human approval gates for anything that goes out.
Research and intelligence. Agents that monitor news, build prospect dossiers, compile market briefings, and deliver structured summaries on a schedule or on demand.
DevOps and SRE copilot. Agents hooked into your logs, metrics, and alerting systems that can scan for anomalies, draft incident reports, suggest root causes, and run remediation scripts with your approval.
Content production. Agents that turn bullet points into blog posts, repurpose long-form content into social threads and email campaigns, and schedule publishing across channels.
Monitoring and alerting. Agents that watch health checks, metrics dashboards, and error logs, then send smart alerts and can trigger automated remediation with guardrails.
Smart home and personal concierge. Agents that coordinate home automation APIs, manage reminders, track habits, and serve as a general life assistant through your preferred chat app.
Who This Guide Is For
This playbook is written for anyone who wants to go from zero knowledge of OpenClaw to running production-grade AI agents on their own infrastructure.
- If you are non-technical and just want a smart assistant on your phone, start with sections 1 through 9.
- If you are an operator or founder who wants to automate workflows, sections 10 through 12 are your core material.
- If you are an engineer who wants to build custom tools, skills, and multi-agent systems, sections 13 through 18 take you there.
- If you are deploying OpenClaw for a team or organization, sections 19 through 20 provide the governance and architecture patterns.
2. Core Concepts and Mental Models
Before you install anything, you need to understand the architecture. OpenClaw is built around a small set of core primitives that combine into flexible, powerful agent systems.
The Gateway
The Gateway is the central process — the daemon that runs in the background on your machine. Think of it as a traffic controller. It receives events from multiple sources (incoming chat messages, scheduled cron jobs, webhooks, CLI commands), routes them to the right agent, and sends responses back through the appropriate channel.
When you "run OpenClaw," you are running the Gateway. It stays alive, listens for inputs, and dispatches work.
Agents
An agent is a reasoning loop. It receives an input (a message, a trigger event, a scheduled task), thinks about what to do using an LLM, decides which tools to call, executes those tool calls, observes the results, and continues the loop until the task is complete or it needs to wait for more input.
Each agent has its own configuration:
- Model: Which LLM powers its reasoning (GPT-4o, Claude, Gemini, a local model, etc.)
- Soul / persona: A system prompt that defines its role, tone, decision boundaries, and escalation rules
- Tools: Which structured functions it can call (file operations, shell, browser, APIs, messaging)
- Skills: Which playbooks and knowledge packs it has loaded
- Memory: What it remembers across sessions (preferences, context, project-specific knowledge)
- Workspace: The file system scope it operates in
An agent is not a one-shot prompt-response. It is a persistent process with state, memory, and the ability to take real actions in your system.
Tools
Tools are the agent's hands. Each tool is a structured function with defined inputs, outputs, and permissions. When the agent decides it needs to read a file, it calls the fs.read tool. When it needs to run a shell command, it calls exec. When it needs to send a Telegram message, it calls message.send.
Core built-in tools include:
- File tools:
fs.read,fs.write,fs.edit,fs.list— read, write, and modify files on your system - Exec: Run shell commands (with configurable permission levels)
- Web / HTTP: Make API calls to external services (REST, GraphQL)
- Browser: Automate browser sessions for sites that lack APIs
- Message: Send messages through connected chat channels
- Cron / scheduler: Create and manage scheduled tasks
- Gateway: Inter-agent communication and routing
- Apply patch: Apply structured file patches for precise code modifications
Each tool can be enabled or disabled per agent, per workspace, and per channel. High-risk tools like exec and browser can require explicit user approval before execution.
Skills
Skills are the agent's playbooks. While tools define what the agent can do, skills teach the agent how and when to do it.
A skill is a folder containing a SKILL.md file — a markdown document with YAML frontmatter (name, description, trigger conditions) and detailed instructions that guide the agent through a specific workflow. Skills can also include helper scripts, config templates, and reference data.
Skills are modular and composable. You can install community skills from registries like ClawHub, write your own, or customize existing ones.
Channels
Channels are the messaging integrations through which you and others interact with your agents. OpenClaw supports:
- WhatsApp (via pairing code)
- Telegram (via bot token)
- Discord (via bot application)
- Slack (via OAuth app)
- Signal (via linked device)
- iMessage (on macOS)
- Microsoft Teams (via app registration)
- Feishu / Lark
Triggers
Triggers define how workflows start:
- Message triggers: A user sends a message matching a pattern, keyword, or intent
- Cron triggers: Scheduled execution at specific times or intervals
- Webhook triggers: An external system sends an HTTP event to OpenClaw
- CLI triggers: You manually invoke a workflow from the command line
- Boot triggers: Workflows that run automatically when the Gateway starts
- Condition-based triggers: Logic that fires when certain state conditions are met
Memory
Memory gives agents persistence across sessions. OpenClaw uses a combination of:
- Session memory: Short-term context within a single conversation
- Long-term memory: Persistent preferences, learnings, and facts that survive across sessions
- Workspace memory: Project-specific knowledge, documents, and notes scoped to a particular workspace
Memory is local. It lives on your machine in structured files and lightweight databases.
Local-First Architecture
Here is what runs where:
- On your machine: The Gateway daemon, all agents, tools, skills, memory, logs, config files, workspace data, and file operations
- External API calls: When an agent uses a cloud-hosted LLM, the prompt and context window are sent to that provider's API. This is the only data that leaves your machine.
- Messaging APIs: Message data flows through the messaging platform's infrastructure, just as it would with any normal messaging app
If you want to keep everything fully local, you can run local LLMs (via Ollama, llama.cpp, or similar) and avoid cloud model APIs entirely.
3. Install: Zero to First Response
System Requirements
OpenClaw runs on anything that can sustain a Node.js process:
- CPU: Any modern processor. No GPU required unless you are running local LLMs.
- RAM: 1–2 GB minimum. 8–16+ GB if running local models.
- Disk: 500 MB for OpenClaw itself, plus space for workspace data and logs.
- OS: Linux (recommended for servers), macOS (great for local dev), or Windows via WSL2.
Recommended environments:
- Laptop: Perfect for trying things out, personal use, and development
- Home server / Raspberry Pi: Always-on personal agent at low cost
- VPS (Hetzner, DigitalOcean, AWS Lightsail): The production choice. A $5–10/month VPS handles most setups.
- Docker: Clean, reproducible deployment for any environment
Installation Methods
One-liner script (recommended):
curl -fsSL https://get.openclaw.io | bash
npm / Node.js install:
npm install -g openclaw
Docker:
docker pull openclaw/openclaw:latest
docker run -d --name openclaw \
-v ~/openclaw-data:/data \
-p 3000:3000 \
openclaw/openclaw:latest
First-Time Setup
After installation, run the onboard wizard:
openclaw onboard
This interactive flow walks you through:
1. Creating your workspace directory
2. Selecting and configuring your first AI model provider
3. Setting up your first messaging channel (Telegram is the easiest to start with)
4. Running a test message to verify everything works end to end
Verifying the Install
openclaw status # Check daemon status, connected channels, and model availability
openclaw channels list # List configured channels and their connection state
openclaw models list # Check available models
openclaw logs --tail 50 # View recent log activity
4. First-Time Configuration
Config File Anatomy
OpenClaw stores its configuration in config.yaml inside your workspace. The main sections:
- ai / models: LLM providers, API keys, default model
- channels / messaging: Connected platforms, credentials, channel-specific settings
- tools: Which tools are enabled globally and per agent, with permission levels
- skills: Which skills are loaded, where they live on disk, activation conditions
- permissions / security: Sandbox settings, tool approval policies, access controls
- memory: Memory backend configuration
- logging: Log levels, output destinations, retention policies
Configuring AI Model Providers
Supported providers:
- OpenAI: GPT-4o, GPT-4o-mini, o1, o3
- Anthropic / 0: Claude Sonnet, Haiku, Opus
- Google 0: Gemini Pro, Gemini Flash
- OpenRouter: Access to hundreds of models through one API key
- Local models: Via Ollama, llama.cpp, LM Studio, or any OpenAI-compatible local server
Model selection strategy — use a tiered approach:
Tier · Use Case · Recommended Models
Router / classifier · Intent classification, simple Q&A · GPT-4o-mini, Claude Haiku
General reasoning · Most agent tasks · GPT-4o, Claude Sonnet
Complex reasoning · Deep analysis, high-stakes decisions · o1, o3, Claude Opus
Bulk / batch · High-volume processing · Cheapest model that meets quality bar
Security-First Defaults
OpenClaw's default configuration is deliberately restrictive:
- File tools are read-only
- Shell execution is disabled
- Browser automation is disabled
- External API calls require explicit configuration
- Message sending requires channel authorization
The recommended progression:
1. Start read-only. Observe agent behavior in logs.
2. Enable write access to its workspace.
3. Enable curated API access for specific services.
4. Enable shell with approval (agent shows command, waits for your "yes").
5. Enable autonomous execution only for well-tested, low-risk workflows.
Managing Secrets
- Store secrets in environment variables loaded from a
.envfile excluded from git - Use a secrets manager (HashiCorp Vault, 1Password CLI, Doppler) for team deployments
- Restrict file permissions on your
.envand config files (chmod 600) - Rotate keys periodically
5. Channels and Messaging Apps
Supported Channels
Channel · Best For · Setup Method
Telegram · Personal use, getting started · Bot token via BotFather
WhatsApp · Personal + business communication · QR code / pairing code
Slack · Team agents, internal tools · OAuth app
Discord · Community-facing, developer teams · Bot application
Signal · Privacy-focused personal use · Linked device
iMessage · macOS users · System integration
Microsoft Teams · Enterprise environments · App registration
Feishu / Lark · ByteDance platform teams · App registration
Setting Up Your First Channel (Telegram)
1. Open Telegram, search for @BotFather, create a new bot, copy the token
2. Add the channel: openclaw channels add telegram
3. Follow the prompts to enter your bot token
4. Verify: openclaw channels list
5. Send a test message and check logs
Multi-Channel Routing
A single Gateway can serve multiple channels simultaneously:
- Default routing: All channels go to the same agent
- Channel-based routing: WhatsApp → personal agent, Slack #support → support agent
- User-based routing: Specific users routed to dedicated agents regardless of channel
Sessions are kept separate per user per channel — context from your WhatsApp conversation does not leak into your Slack conversations.
6. Agents, Souls, and Personalities
Designing the Soul / Persona
A well-designed soul covers:
Role definition: What the agent is and is not. "You are a senior growth operations assistant for a B2B SaaS company."
Tone and communication style: Concise or verbose, formal or casual, direct or diplomatic.
Hard boundaries: What the agent must never do. "Never run shell commands without showing them first. Never send emails without explicit approval."
Escalation rules: When to ask for human input. "If uncertain about a decision affecting money, customers, or public content, ask before acting."
Output format preferences: Default to markdown, use tables for comparisons, keep summaries under 200 words.
Example soul prompt:
You are Ops, a senior operations assistant for a B2B SaaS startup.
Role:
- Research prospects and companies using web tools.
- Draft personalized outreach emails.
- Summarize long documents and meeting notes.
- Manage task lists and follow-ups.
Communication:
- Be concise and direct. No filler.
- Use bullet points for lists, tables for comparisons.
- Default to action: suggest next steps, not just analysis.
Boundaries:
- Never send emails or messages without explicit approval.
- Never execute shell commands without showing them first.
- Never commit or push code without confirmation.
- If a task requires spending money or accessing financial systems, stop and ask.
Escalation:
- If uncertain about factual claims, say so and offer to research.
- If a request involves legal, financial, or public-facing content, flag it for review.
Generalist vs. Specialists
One generalist agent is the right starting point. It handles everything through a single persona and accumulates context about your work over time — the "Founder OS" pattern.
Multiple specialist agents make sense when:
- Different channels serve fundamentally different purposes
- You need to isolate permissions between agents
- You are building for a team with different departments
Common specialists: Inbox agent, Research agent, DevOps agent, Content agent, Outbound agent.
7. Tools and Skills
Tools Reference
Tool · What It Does · Risk Level
fs.read · Read files from workspace · Low
fs.write · Create or overwrite files · Medium
fs.edit · Edit specific sections of files · Medium
fs.list · List directory contents · Low
apply_patch · Apply structured patches to files · Medium
exec · Run shell commands · High
web.search · Search the web · Low
web.fetch · Fetch a URL's content · Low
browser · Automate browser sessions · High
http · Make HTTP API requests · Medium
message.send · Send messages through channels · Medium
cron · Schedule tasks · Medium
gateway · Inter-agent communication · Medium
Skills Structure
A skill folder:
skills/
research/
SKILL.md # Instructions with YAML frontmatter
templates/ # Output templates, schemas
scripts/ # Helper scripts if needed
A SKILL.md file:
---
name: research
description: "Conduct structured research on companies, people, or topics."
triggers:
- keyword: "research"
- keyword: "dossier"
- intent: "find information about"
tools:
- web.search
- web.fetch
- fs.write
---
# Research Skill
When the user asks you to research a topic, company, or person:
1. Start with a web search to identify key sources.
2. Fetch the most relevant pages and extract structured information.
3. Organize findings into a structured report with sections:
- Overview
- Key facts
- Recent news / developments
- Relevant links
- Suggested next actions
4. Save the report to the workspace as `research/[topic]-[date].md`.
5. Summarize the key findings in your chat response.
Discovering and Installing Skills
openclaw skills list # List available skills
openclaw skills search "outbound" # Search by category
openclaw skills install outbound-email # Install a skill
openclaw skills installed # Check installed skills
Enablement Strategy
Layer · When · Skills
Foundation · Day 1 · Summarize, memory, web search, file management
Productivity · Week 1 · Email drafting, research, content writing, task management
Automation · Week 2+ · Outbound sequences, DevOps monitoring, browser automation
Advanced · Month 2+ · Shell execution, CI/CD, multi-agent orchestration
8. Memory, Workspace, and Data
Workspace Structure
~/openclaw/
config.yaml # Main configuration
agents/ # Agent definitions
skills/ # Installed and custom skills
memory/ # Long-term memory files
workspace/ # Active working files
docs/ # Reference documents
projects/ # Project-specific workspaces
output/ # Generated content
logs/ # Daemon and workflow logs
.env # Secrets (excluded from git)
Everything is file-based and inspectable.
Memory Operations
openclaw memory clear --session # Clear session memory
openclaw memory clear --all # Nuclear option
openclaw memory export # Export memory data
Backup workspace:
cp -r ~/openclaw ~/openclaw-backup-$(date +%Y%m%d)
# Or use git for version control
cd ~/openclaw && git add -A && git commit -m "backup $(date)"
Teaching OpenClaw About Your Business
1. Drop documents into the workspace. Place PDFs, markdown files, text files, and spreadsheets in workspace/docs/.
2. Create SOPs as skill files. Convert standard operating procedures into skills.
3. Use pinned notes for preferences. Pin recurring instructions in the agent's config or memory.
4. Feed FAQs and product sheets. For support or sales agents, the FAQ document is their most valuable resource.
9. Using OpenClaw as a Chat Assistant
Entry Points
CLI / TUI:
openclaw chat
Messaging apps: Once a channel is configured, interact with your agent exactly as you would with any contact — no special app, no browser tab, no login.
Prompting Basics
- Be specific: "Draft a follow-up email to Sarah about the partnership proposal, keep it under 150 words, remind her about the March 30 deadline."
- State constraints: "Keep it under 150 words." "Use bullet points." "Write it in Swedish."
- Provide context: "I am preparing for a board meeting next week. Summarize the key metrics from the attached report."
- Give examples: "Write a cold email similar to this one [paste example], adapted for a SaaS audience."
Persistent Instructions
For instructions you want the agent to follow in every conversation:
- Pinned notes: Add to the agent's memory — "Always default to concise responses. Use metric units."
- System prompt additions: Add recurring preferences directly to the agent's soul.
- Quick commands: Define shortcuts like
/digestfor daily briefing,/research [topic]for research skill.
Everyday Use Patterns
- "Summarize this article [paste URL]."
- "Draft a reply to this email [paste]."
- "What is on my calendar today?"
- "Create a task to follow up with the investor by Friday."
- "What do we know about [company name]?"
- "Write a LinkedIn post about [topic], under 200 words, professional but not boring."
10. Automation and Workflow Design
The Automation Mindset
Best candidates for automation:
- Recurring: You do them daily, weekly, or on every occurrence of an event
- Structured: The inputs, outputs, and steps are well-defined
- High-volume: You do them dozens or hundreds of times
- Low-creativity: The task follows a pattern
- Friction-heavy: Moving data between systems, formatting, repetitive lookups
The 5-Stage Flow
Every OpenClaw workflow follows a debuggable pattern:
1. Trigger: Something starts the workflow
2. Collect: Gather the inputs needed
3. Decide: Use AI reasoning to determine what to do
4. Act: Execute the decision
5. Observe: Log the outcome, handle errors, notify or report
Example: Daily Founder Digest
Trigger: Cron, every day at 7:30 AM
Collect:
- Fetch unread emails from inbox
- Fetch today's calendar events
- Query task management system for overdue and due-today items
- Fetch top relevant news headlines
Decide:
- Classify emails by priority (urgent / action needed / FYI / archive)
- Identify calendar conflicts or prep-needed meetings
- Flag overdue tasks
- Select 3–5 most relevant news items
Act:
- Compose structured digest with sections for email summary, today's schedule, task status, and news
- Send to your preferred channel
Observe: Log digest contents, any errors, send status
Error Handling
- Retries with backoff: Retry 3 times with increasing delays (1s, 5s, 15s)
- Fallbacks: If primary model is unavailable, fall back to alternative model
- Alerts: If workflow fails after retries, send alert to your channel
- Idempotency: Design actions so they can be safely re-run
- Graceful degradation: If a non-critical step fails, log and continue
11. Recommended Starter Agents and Playbooks
Inbox and Communication Triage Agent
Problem: 30–60 minutes a day reading, prioritizing, and replying to messages.
Setup: Email API access (read, draft, label), classification skill, Telegram or WhatsApp for digests and draft approval.
Workflow:
1. Scan inbox for new messages periodically
2. Classify: urgent → action-needed → FYI → archive
3. For urgent/action-needed, draft reply and send to chat for review
4. You approve, edit, or reject. Approved drafts send automatically.
Guardrails: Never auto-send without approval. Flag messages mentioning money, contracts, or legal matters.
Research and Briefing Agent
Problem: Structured research takes hours when done manually.
Setup: Web search, web fetch, browser, file write. Triggered by message or CLI.
Workflow:
1. Receive research request
2. Execute structured research plan: search, fetch, find news, check data
3. Organize into dossier: overview, leadership, funding, recent developments, talking points
4. Save to workspace, deliver summary through chat
Guardrails: Cite all sources. Flag uncertain or conflicting information.
Outbound / Sales Agent
Problem: Personalizing outreach at scale is slow and inconsistent when done manually.
Setup: File read/write for lead lists, web search/fetch for enrichment, HTTP for CRM and ESP APIs.
Workflow:
1. Ingest a lead list (CSV or CRM pull)
2. Enrich each lead with company research, recent news, role context
3. Generate personalized email from enrichment data and template
4. Queue drafts for human batch approval
5. Send approved emails through ESP or SMTP
6. Monitor replies and classify (interested / not interested / objection / OOO)
Guardrails: All emails require batch approval. Enrichment data logged for auditability.
Content Production Agent
Problem: Turning ideas and raw material into polished, multi-format content takes disproportionate time.
Setup: File read/write, web search, HTTP for publishing APIs.
Workflow:
1. Receive content brief (topic, audience, format, key points)
2. Research topic for supporting data and current relevance
3. Draft primary piece (blog post, article, report)
4. Generate derivatives: Twitter/X thread, LinkedIn post, email newsletter, short-form summary, and optionally an audio script for ElevenLabs voice narration
5. Present all versions for review, then publish on approval
DevOps / SRE Copilot
Problem: Infrastructure generates logs and alerts faster than you can process them.
Setup: Exec (with approval for prod commands), HTTP for metrics APIs, file read/write.
Workflow:
1. Cron-triggered health checks query metrics and log endpoints
2. On warning or critical: send structured alert with context
3. On incident declaration: pull relevant logs, suggest root causes, draft incident report
4. For known issues: suggest (or execute with approval) remediation steps
5. Post-incident: generate post-mortem draft
Guardrails: Production commands always require approval. Remediation runs dry-run first.
Smart Home / Life Concierge
Setup: HTTP for home automation APIs (Home Assistant, IFTTT), calendar integration, task tools.
Examples:
- "Turn on the living room lights" → HTTP call to Home Assistant
- "Remind me to call the dentist tomorrow at 10 AM" → schedule reminder
- "What is on my calendar today?" → fetch and summarize
- "Track that I ran 5K today" → log to fitness tracking file
12. Best Practices for Prompt and Workflow Design
Writing Stable Agent Prompts
Good prompts are:
- Structured: Clear sections for role, capabilities, constraints, procedures, output formats
- Explicit about failure modes: What to do when tools fail, input is ambiguous, or task is out of scope
- Anchored in examples: 2–3 examples of good input-output pairs
- Tested against edge cases: Unusual inputs, ambiguous requests, adversarial questions
Multi-Step Flows vs. Mega-Prompts
Break complex work into sequential steps, each with its own clear prompt, tool set, and success criteria:
1. Research the company → structured dossier
2. Using dossier, draft personalized email → draft
3. Review draft (human or AI) → approve or request changes
4. Send approved email → log result
5. Schedule follow-up → set reminder
Each step can be tested independently and uses only the tools it needs.
Schemas and Templates
When you need structured output, provide a schema:
{
"company_name": "",
"founded": "",
"hq_location": "",
"funding_total": "",
"key_people": [{"name": "", "role": ""}],
"recent_news": [{"headline": "", "date": "", "url": ""}],
"summary": ""
}
Schemas make outputs parseable by downstream workflows and reduce hallucinated formatting.
Guardrails and Approval Flows
For any action that is irreversible or high-stakes, implement approval gates:
- Shell commands: Show the command, wait for approval, then execute
- Outbound messages: Show the draft, wait for approval, then send
- File deletions: Confirm before deleting
- Public posts: Show content, wait for approval, then publish
- Financial transactions: Never auto-execute — always require explicit human confirmation
13. Advanced Multi-Agent Patterns
Hub-and-Spoke Architecture
A single orchestrator receives all user requests, classifies intent, delegates to the appropriate specialist agent, and aggregates results.
Example flow:
1. User: "Research Acme Corp and draft an outreach email."
2. Orchestrator parses intent: research + email drafting
3. Delegates to research agent → structured dossier returned
4. Passes dossier to writer agent → draft returned
5. Orchestrator presents final output to user
Advantages: Each agent is focused. Permissions are scoped. Failures are isolated.
Swarm / Peer-to-Peer
Multiple agents communicate via internal messages without a central orchestrator.
Example: Content pipeline
- Content planner publishes "content tasks" as events
- Writer agent picks up tasks, drafts content, publishes "draft ready" events
- Editor agent picks up drafts, improves them, publishes "edit complete" events
- Publisher agent picks up edited content and publishes
Example: Outbound Pod
- Data agent: Ingests leads, deduplicates, validates emails, enriches
- Research agent: Creates research brief for each high-priority lead
- Writer agent: Drafts personalized email using research brief and template
- QA agent: Reviews for tone, accuracy, personalization quality, compliance
- Sender agent: Queues approved emails for scheduled dispatch
- Reply agent: Monitors inbox, classifies replies, routes interested leads
14. Integrations and External Systems
Common Integration Categories
- Email and calendar: Gmail, Outlook, CalDAV — read, draft, send, schedule
- CRM: HubSpot, Pipedrive, Salesforce — contacts, deals, activities, reports
- Project management: Jira, Linear, Asana, Notion, Trello — tasks, status, sprints
- Documents: Notion, Google Docs, Confluence — knowledge bases, pages, documentation
- Code hosting: GitHub, GitLab — issues, PRs, code, deployments
- Analytics: Google Analytics, Amplitude, Mixpanel — metrics, reports, anomaly detection
- Cloud infrastructure: AWS, GCP, Hetzner — resource status, deployments, logs
Using Generic API Tools
For any system with a REST or GraphQL API:
1. Configure the API endpoint and authentication headers
2. Define the operations the agent is allowed to call
3. Create a skill that teaches the agent the API's structure and response formats
Browser Automation
For systems without APIs (or with insufficient APIs):
- Form filling, navigation, scraping
- End-to-end web flows
Treat as a fallback — always prefer API integrations where available.
Webhooks: Reacting to External Events
Configure external systems to POST to your OpenClaw webhook endpoint. Workflow automation platforms like n8n can serve as the middleware layer, routing events from dozens of services into your agent:
- Stripe: Payment received → customer onboarding workflow
- GitHub: PR merged → deployment summary
- Your backend: User signed up → welcome sequence
- Monitoring: Alert fired → incident response workflow
15. Security, Privacy, and Governance
Threat Model
Threat · Description
Prompt injection · Malicious content in emails/pages tricks agent into unintended actions
Config errors · Overly permissive tool access, leaked API keys
Agent misbehavior · Agent misinterprets request and takes destructive action
Key compromise · API keys leaked through logs, config files, or agent outputs
Unauthorized access · Wrong person gains ability to send agent commands
Permissions Model
- Per-tool permissions: auto-approve / require confirmation / disabled. Start restrictive.
- Per-agent scoping: Each agent only has access to the tools it needs
- Per-workspace isolation: Agents cannot access other workspaces without explicit config
- Channel allowlists: Control which users and groups can interact with each agent
- Approval flows: High-risk actions require explicit human confirmation
Secrets Management
- Store API keys in
.envwith restricted permissions - Never commit secrets to version control
- Use secrets managers for team deployments (Vault, Doppler, 1Password)
- Rotate keys periodically
- Add to soul: "Never reveal, display, or share API keys, tokens, or passwords."
Logging and Audit Trails
OpenClaw logs all activity: incoming messages, tool calls, tool results, outbound actions, errors, decisions.
Best practices:
- Set log levels (info for production, debug for troubleshooting)
- Review logs regularly, especially for new agents with new permissions
- Set up log rotation and retention policies
- For compliance-sensitive environments, capture who triggered what, what data was accessed, what changes were made
16. Performance, Reliability, and Cost Control
Model Selection for Cost Efficiency
- Routing, classification, simple Q&A: GPT-4o-mini, Claude Haiku, Gemini Flash (10–50x cheaper per token than frontier models)
- General agent tasks: Claude Sonnet, GPT-4o
- Complex reasoning: Claude Opus, o1, o3 — reserve for tasks where quality difference justifies the cost
A single agent can use different models for different operations. For a full breakdown of these providers, see our guide to choosing the right LLM.
Infrastructure Choices
Setup · Best For · Uptime · Cost
Laptop · Development, trying out · When open · Free
Home server / Pi · Personal always-on use · ~95%+ · $50–150 one-time
VPS (Hetzner, DO) · Production, solo · 99.9% · $5–20/month
K8s cluster · Teams, high-volume · 99.99% · $50+/month
For most solo users and small teams, a $5–10/month VPS is the recommended production setup.
Cost Controls
- Rate limiting: Cap LLM API calls per hour/day
- Token budgets: Set max token limits per agent and per workflow
- Caching: Cache research findings and enrichment data to avoid re-processing
- Batching: Group similar operations for efficiency
- Usage logging: Track API spending per agent and per workflow to identify noisy pipelines
17. Debugging and Troubleshooting
Reading Logs
openclaw logs --tail # Follow live logs
openclaw logs --level error # Filter by level
openclaw logs --agent founder-os # Filter by agent
openclaw logs --since "2h" # Filter by time range
Common Installation Issues
Issue · Fix
Node.js version mismatch · Requires Node.js 18+. Check with node --version.
Port conflicts · Check with lsof -i :3000 for your configured port
Firewall blocking webhooks · Open incoming connections on the webhook port
Missing env variables · Recreate .env with all required API keys
Channel auth failures · Re-run channel setup flow — tokens expire
Diagnosing Agent Misbehavior
1. Check logs for the specific interaction
2. Identify failure type: wrong tool, hallucination, prompt misinterpretation, or tool failure
3. Update the soul or skill to address the root cause
4. Test: replay the same input and verify behavior is corrected
Workflow Validation
openclaw validate # Validate workflow configuration
openclaw triggers list # List active triggers and status
18. From Power User to Builder
Writing Custom Skills
mkdir skills/my-custom-skill
Create SKILL.md:
---
name: weekly-metrics
description: "Compile and deliver a weekly metrics report."
triggers:
- cron: "0 9 * * 1"
- keyword: "weekly metrics"
tools:
- http
- fs.write
- message.send
---
# Weekly Metrics Report
When triggered:
1. Fetch KPIs from analytics API
2. Fetch revenue data from billing API
3. Compare this week vs last week
4. Generate report: headline metric changes, top 3 wins, top 3 concerns, recommended actions
5. Save to workspace/reports/weekly-[date].md
6. Send summary to #metrics channel on Slack
Reload: openclaw skills reload
Version-Controlling Your Setup
cd ~/openclaw
git init
echo ".env" >> .gitignore
echo "logs/" >> .gitignore
git add -A
git commit -m "initial setup"
Track config, skills, agent definitions, and workflow configurations in git. Use branches for experiments.
19. Team and Organization Playbook
Multi-User Patterns
- Shared org agents: Single agent for the team via Slack/Teams. Good for support, knowledge base, process automation.
- Personal agents per user: Each team member has their own agent with personalized config.
- Hybrid: Shared agents for team functions + personal agents for individual work.
Workspaces and Namespaces
workspaces/
personal-damien/ # Personal agent workspace
sales/ # Sales team workspace
engineering/ # Engineering workspace
support/ # Customer support workspace
Team-Oriented Agent Examples
- IT helper: Answers common IT questions using IT documentation knowledge base
- HR FAQ bot: Answers questions about policies, benefits, time-off procedures
- Onboarding concierge: Guides new hires through their first week
- Internal knowledge bot: Connects to Notion, Confluence, code repos, answers "Where is the billing API docs?"
Governance for Organizations
- Change management: Git pull requests for config and skill changes
- Approval chains: Define who can approve what — new tool enablement, new agents, production workflow changes
- Ownership: Every agent and workflow has a named owner
- Documentation: Maintain a living document listing all active agents, their purposes, tools, channels, and owners
20. End-to-End Blueprints
Blueprint: Founder OS
Goal: Always-on assistant acting as the founder's operating system.
Architecture: One generalist agent with broad skills (inbox, research, content, task management), connected to WhatsApp and Slack.
Workflows:
- Morning digest (7:30 AM): Inbox summary, today's calendar, overdue tasks, key metrics, news
- Inbox triage (continuous): Classify, draft replies, queue for approval
- Meeting prep (30 min before): Pull context, prepare talking points, summarize attendee backgrounds
- Task management: "Add task: Follow up with Sarah by Friday."
- Research on demand: "Research [company]" → dossier delivered to chat
- Content assist: "Turn these bullet points into a LinkedIn post."
Blueprint: Outbound Engine
Goal: Multi-agent pipeline from raw lead data to personalized, quality-controlled outbound email.
Data flow: CSV upload → Data agent cleans → Research agent enriches → Writer agent drafts → QA agent reviews → Human batch-approves → Sender dispatches → Reply agent monitors
Metrics: Lead-to-send conversion rate, personalization quality score, reply rates, time from lead ingestion to first send.
Blueprint: DevOps Co-Pilot
Architecture:
- Monitor agent: Cron health checks, metrics polling, log scanning
- Alert agent: Evaluates data, generates smart alerts with context
- Incident agent: On declaration, pulls data, suggests RCA, drafts reports
- Deploy agent: Triggered by CI/CD events, generates deployment summaries
Integrations: Prometheus/Grafana for metrics, ELK/Loki for logs, PagerDuty for alerting, GitHub for deploys, Slack for communication.
Metrics: MTTD, MTTA, MTTR, false alert rate, post-mortem completion rate.
Blueprint: Knowledge Hub
Goal: Q&A system that makes company knowledge accessible through natural conversation.
Architecture: Q&A agents backed by indexed documents, routed by team or topic.
Key skills: Document indexing, semantic search, source citation, honest "I don't know" detection.
Metrics: Question answer rate, source accuracy, user satisfaction, knowledge base coverage gaps identified.
21. Command Cheat Sheet
# Installation
curl -fsSL https://get.openclaw.io | bash
openclaw onboard
# Daemon management
openclaw start # Start the Gateway
openclaw stop # Stop the Gateway
openclaw restart # Restart the Gateway
openclaw status # Check daemon, channels, agents
# Channels
openclaw channels add <platform> # Add a new channel
openclaw channels list # List all channels and status
openclaw channels remove <id> # Remove a channel
# Models
openclaw models list # List configured models
openclaw models add <provider> # Add a model provider
openclaw models test # Test model connectivity
# Skills
openclaw skills list # List available skills
openclaw skills installed # List installed skills
openclaw skills install <slug> # Install a skill
openclaw skills reload # Reload all skills
# Memory and workspace
openclaw memory clear --session # Clear session memory
openclaw memory clear --all # Clear all memory
openclaw memory export # Export memory data
# Workflows and triggers
openclaw triggers list # List active triggers
openclaw run <workflow> # Manually trigger a workflow
openclaw validate # Validate configuration
# Logs and debugging
openclaw logs --tail # Follow live logs
openclaw logs --level error # Filter by log level
openclaw logs --agent <name> # Filter by agent
openclaw logs --since "2h" # Filter by time
# Chat
openclaw chat # Open CLI chat session
22. Progress Checklist
Beginner (day 1–3):
- [ ] Install OpenClaw and complete onboarding
- [ ] Configure one AI model provider
- [ ] Connect one messaging channel (start with Telegram)
- [ ] Chat with your agent and verify it works
- [ ] Understand the workspace structure and config file
Intermediate (week 1–2):
- [ ] Install 3–5 skills relevant to your work
- [ ] Configure tool permissions progressively (read → write → API)
- [ ] Set up a cron-triggered workflow (daily digest, health check)
- [ ] Connect a second channel
- [ ] Write or customize your first skill
Advanced (week 3–4):
- [ ] Design a multi-step automated workflow with error handling
- [ ] Integrate OpenClaw with 2–3 external systems
- [ ] Set up approval flows for high-risk actions
- [ ] Create a custom tool for a system specific to your work
- [ ] Monitor and optimize LLM API costs
Expert (month 2+):
- [ ] Design and deploy a multi-agent architecture
- [ ] Implement team-wide agents with proper governance
- [ ] Build and share custom skills with the community
- [ ] Run production workflows 24/7 with monitoring and incident response
- [ ] Version-control your entire OpenClaw setup with dev/staging/production environments
OpenClaw's architecture gained enterprise-level validation in March 2026 when Meta acquired Moltbook — a social network for AI agents built on the OpenClaw framework. Meta now deploys OpenClaw-based agents internally at scale. For the full picture of how this plays out inside a 70,000-person company, see our analysis of Zuckerberg's CEO agent and Meta's agentic strategy.
This playbook is published on hokai.io — the AI tool directory that helps you find, compare, and stack the right tools for your workflow.
Frequently Asked Questions
What is OpenClaw?
OpenClaw is an open-source, local-first AI agent platform that lets you design, run, and automate multi-step AI workflows entirely on your own machine. It keeps your data private and requires no cloud subscription.
How do I get started with OpenClaw?
Install via npm by running npm install -g openclaw, or download the standalone binary from the GitHub releases page. Then run openclaw init to set up your first workspace.
What can OpenClaw automate?
OpenClaw automates document processing, data extraction, API orchestration, code review pipelines, scheduled summarization jobs, and any multi-step workflow that chains AI calls with tool use � all without leaving your local environment.
What does local-first mean for OpenClaw?
Local-first means your agent configs, data, and LLM API calls are processed on your own hardware. No workflow state is sent to a third-party server. You can run OpenClaw offline and retain full control over credentials and outputs.
What are the main use cases for OpenClaw?
Common use cases include automated research assistants, nightly report generators, codebase analysis bots, data enrichment pipelines, and personal productivity agents that run on a schedule � all self-hosted on your own machine.