AI & Agents

OpenClaw Examples: Practical Configurations, Skills, and Automation Patterns

OpenClaw's ClawHub registry hosts over 44,000 skills, but finding complete, production-ready configurations still means piecing together fragments from scattered sources. This guide organizes working examples from the official OpenClaw documentation into five categories: skill creation, agent routing, cron automation, memory setup, and persistent file storage with Fast.io. Every config block is sourced from docs.openclaw.ai and ready to adapt.

Fast.io Editorial Team 13 min read
AI agent workspace with shared files and configuration management

How OpenClaw Configurations Are Structured

OpenClaw's ClawHub registry crossed 44,000 published skills by April 2026, roughly 25 times the count from three months earlier. That growth rate explains why "find me a working config" is now harder than "find me a skill." The ecosystem has more options than most developers will ever need, and the sheer volume makes it difficult to identify which configurations actually solve real problems.

The official documentation at docs.openclaw.ai provides reference configurations, but reference and production are different things. A reference config shows what keys are valid. A production config shows what keys you need, what values work together, and what to leave out. This guide bridges that gap by pulling verified examples from the official docs and organizing them by the problem they solve.

OpenClaw's configuration system has four distinct layers, each handling a different concern:

  • Skills are Markdown instruction files (SKILL.md) that teach agents how to use specific tools. They install from ClawHub, Git repos, or local directories.
  • Agent configuration in a central JSON5 file controls model routing, workspace paths, channel access, and per-agent skill visibility.
  • Cron and webhooks handle scheduled and event-driven automation, from daily briefings to Gmail monitoring.
  • Memory files provide persistence between sessions using plain Markdown stored in the agent workspace.

Each layer can function independently, but they compose. A production setup typically configures all four. The sections below walk through each layer with examples you can copy and modify.

How to Create and Install OpenClaw Skills

Every OpenClaw skill is a Markdown file named SKILL.md with YAML frontmatter and natural-language instructions. The frontmatter tells OpenClaw when and how to load the skill. The body teaches the agent what the skill does and how to use it.

The minimal format requires only two frontmatter fields:

---
name: skill-name
description: Brief explanation of what the skill does
---

Instructions for the agent go here in plain markdown.

Optional frontmatter fields control how the skill behaves at runtime. Setting user-invocable: true (the default) exposes the skill as a slash command the user can trigger directly. Setting disable-model-invocation: true hides the skill from the agent's normal prompt, so it runs only on explicit invocation. The command-dispatch: "tool" field with command-tool routes slash-command calls directly to a specific tool without LLM involvement.

Skills can declare environment requirements through a metadata block in the SKILL.md frontmatter. These gates check for required system binaries, environment variables, and compatible operating systems before loading the skill. If any requirement is missing, OpenClaw silently excludes the skill from the active set. This prevents runtime errors from skills that depend on tools like ffmpeg or specific API keys that aren't available on every machine.

Loading Precedence

OpenClaw checks six locations for skills, in priority order:

  1. Workspace skills at <workspace>/skills
  2. Project agent skills at <workspace>/.agents/skills
  3. Personal agent skills at ~/.agents/skills
  4. Managed local skills at ~/.openclaw/skills
  5. Bundled skills shipped with the installation
  6. Extra directories configured via skills.load.extraDirs

When duplicate names exist across sources, the highest-priority location wins. This lets you override a bundled skill by placing a same-named SKILL.md in your workspace directory.

Installing from ClawHub

Community skills install with a single command:

openclaw skills install <slug>

For skills hosted in Git repositories:

openclaw skills install git:owner/repo@ref

Before enabling any third-party skill, verify its trust envelope:

openclaw skills verify <slug>

This checks the skill's security scan status on ClawHub, including VirusTotal results and static analysis. The official OpenClaw documentation recommends treating third-party skills as untrusted code and reading them before enabling.

Token Cost of Skills

Each loaded skill adds to the system prompt. The injected XML block follows a predictable formula: roughly 195 characters of base overhead plus about 97 characters per skill (before field content). Twenty skills with short names and descriptions add roughly 480 tokens to every prompt. Keep skill lists focused to control cost.

AI-powered workspace indexing and smart audit capabilities

Agent Configuration Patterns You Can Copy

Agent configuration uses a central JSON5 file. The agents key controls model selection, workspace paths, skill visibility, and per-agent identity.

Model Routing with Fallbacks

Production setups benefit from fallback chains that keep the agent running when a provider goes down:

{
  agents: {
    defaults: {
      model: {
        primary: "anthropic/claude-sonnet-4-6",
        fallbacks: ["minimax/MiniMax-M2.7"]
      }
    }
  }
}

Model references use provider/model-id format. When the primary model hits rate limits or errors, OpenClaw routes to the next fallback automatically. Skills work identically regardless of which model handles the request, because skill instructions are injected at the prompt level, not the model level.

For fully offline operation, point OpenClaw at a local inference server:

{
  agents: {
    defaults: {
      model: { primary: "lmstudio/my-local-model" }
    },
  },
  models: {
    providers: {
      lmstudio: {
        baseUrl: "http://127.0.0.1:1234/v1",
        apiKey: "lmstudio",
        api: "openai-responses"
      }
    }
  }
}

This routes all inference through LM Studio with zero cloud API dependency.

Multi-Platform Messaging

A single OpenClaw instance can serve WhatsApp, Telegram, Discord, and Slack at the same time:

{
  channels: {
    whatsapp: { allowFrom: ["+15555550123"] },
    telegram: {
      enabled: true,
      botToken: "YOUR_TOKEN",
      allowFrom: ["123456789"]
    },
    discord: {
      enabled: true,
      token: "YOUR_TOKEN",
      dm: { allowFrom: ["123456789012345678"] }
    }
  }
}

Each channel has its own access controls. For group chats, require mentions before the agent responds by adding groups: { "*": { requireMention: true } } inside the channel block.

Skill Allowlists Per Agent

When running multiple agents with different responsibilities, restrict skill access per agent:

{
  agents: {
    defaults: {
      skills: ["github", "weather"]
    },
    list: [
      { id: "writer" },
      { id: "docs", skills: ["docs-search"] },
      { id: "locked-down", skills: [] }
    ]
  }
}

The writer agent inherits the default skill set. The docs agent replaces defaults entirely with only docs-search. The locked-down agent has no skills. A non-empty skills list on a specific agent always replaces defaults. There's no merging.

Agent Identity and Workspace Isolation

Each agent can have its own name, personality, and separate workspace:

{
  agents: {
    list: [
      {
        id: "home",
        default: true,
        workspace: "~/.openclaw/workspace-home",
        identity: {
          name: "HomeBot",
          theme: "helpful assistant",
          emoji: "🏠"
        }
      },
      {
        id: "work",
        workspace: "~/.openclaw/workspace-work",
        identity: {
          name: "WorkBot",
          theme: "professional assistant"
        }
      }
    ]
  }
}

Separate workspaces mean separate memory files, separate skill directories, and separate session stores. You can route different messaging accounts to different agents using channel bindings, so personal WhatsApp messages reach home while business messages reach work.

Fastio features

Give your OpenClaw agents persistent file storage

50GB free workspace with Intelligence Mode indexing, MCP server access, and ownership transfer. No credit card, no expiration.

How to Automate Workflows with Cron and Webhooks

OpenClaw's cron system supports three schedule types: one-shot timers (at), fixed intervals (every), and standard cron expressions (cron). All schedules persist in SQLite, so jobs survive gateway restarts without losing state.

One-Shot Reminders

Use --at with an ISO timestamp or relative duration for tasks that run once:

openclaw cron create "2026-07-01T09:00:00Z" \
  --name "Q3 planning" \
  --session main \
  --system-event "Reminder: Q3 planning starts today" \
  --delete-after-run

The --delete-after-run flag cleans up after execution. Without it, the job stays in the database as a completed record.

Recurring Daily Jobs

Standard cron expressions with timezone support handle daily, weekly, or custom recurring schedules:

openclaw cron create "0 7 * * *" \
  "Summarize overnight updates." \
  --name "Morning brief" \
  --tz "America/Los_Angeles" \
  --session isolated \
  --announce \
  --channel slack \
  --to "channel:C1234567890"

The --session isolated flag gives each run a fresh transcript. This prevents context from previous runs from influencing the current one. For tasks that benefit from historical awareness, use --session main or a persistent named session with session:workflow-name.

automation hooks-Driven Automation OpenClaw exposes HTTP endpoints for event-driven workflows. The /hooks/agent endpoint runs an isolated agent turn:

{
  "message": "Summarize today's deploys as JSON.",
  "name": "Deploy digest",
  "model": "openai/gpt-5.4"
}

Authenticate requests with a Bearer token in the Authorization header or the x-openclaw-token header. You can also specify optional fields like thinking, timeoutSeconds, and agentId to control execution.

The /hooks/wake endpoint enqueues a system event into the main session:

{
  "text": "New email received",
  "mode": "now"
}

This is useful for building reactive pipelines where external services notify the agent of events.

Gmail Integration OpenClaw can monitor Gmail inboxes and react to incoming messages. The setup wizard handles the configuration:

openclaw webhooks gmail setup --account your@gmail.com

This configures Google Cloud PubSub, sets up the push endpoint via Tailscale Funnel, and starts monitoring. You can override the model used for email processing to control costs:

{
  hooks: {
    gmail: {
      model: "openrouter/meta-llama/llama-3.3-70b-instruct:free",
      thinking: "off"
    }
  }
}

Using a free model tier for email triage keeps costs near zero while still producing useful summaries and routing decisions.

Deterministic Command Cron

When you need shell scripts on a schedule without LLM involvement, command cron executes directly:

openclaw cron create "*/15 * * * *" \
  --name "Queue depth probe" \
  --command "scripts/check-queue.sh" \
  --command-cwd "/srv/app" \
  --announce

Exit code 0 records success. Non-zero triggers retry logic with exponential backoff, starting at 60 seconds and increasing to 5 minutes across three attempts.

Managing and Debugging Jobs

View all scheduled jobs and their status:

openclaw cron list
openclaw cron runs --id <jobId> --limit 10

Run a job immediately for testing:

openclaw cron run <jobId> --wait

The --wait flag blocks until the job completes and returns the output, which is useful for debugging new automation before committing to a schedule.

Persistent Memory and File Storage

OpenClaw's memory system runs on plain Markdown files in the agent workspace. There's no hidden database. Everything the agent remembers lives in files you can read, edit, and version-control.

Memory File Structure

Three file types organize information by durability:

MEMORY.md stores durable facts, preferences, and decisions that load at every session start. Keep this file curated and compact. Raw transcripts and exhaustive archives belong elsewhere.

memory/YYYY-MM-DD.md files hold daily working notes. Today's and yesterday's files auto-load into the session context. Older notes stay searchable through the memory_search tool but don't clutter the prompt.

DREAMS.md (optional) captures summaries from background consolidation passes. When enabled, OpenClaw periodically reviews daily notes and promotes recurring patterns into long-term memory for human review.

Configuring Semantic Search

By default, memory search uses keyword matching. Adding an embedding provider enables hybrid search that combines vector similarity with keywords:

{
  agents: {
    defaults: {
      memorySearch: {
        provider: "gemini"
      }
    }
  }
}

Supported providers include Gemini, Voyage, Mistral, Ollama, and any OpenAI-compatible endpoint. For fully local setups, Ollama handles embeddings without cloud API calls.

Automatic Memory Flush

Before context compaction, OpenClaw can save unwritten context to memory files so important information isn't lost when long conversations get summarized:

{
  agents: {
    defaults: {
      compaction: {
        memoryFlush: {
          enabled: true,
          model: "ollama/qwen3:8b"
        }
      }
    }
  }
}

This is particularly useful for agents that handle multi-step workflows over long conversations. Without memory flush, details from early in a conversation can disappear during compaction.

The File Persistence Gap

Memory handles what the agent knows. But agents also produce files: reports, processed data, generated assets, and deliverables meant for other people. OpenClaw's workspace stores these locally, which works fine for single-machine setups. The gap appears when agents need to share files with humans, collaborate across machines, or hand off work to clients.

Local filesystems handle storage but lack the search, collaboration, and access-control layers that agent-driven workflows need. Basic cloud storage like S3 or Google Drive provides remote access but doesn't index files for semantic queries or support structured handoff patterns.

Fast.io fills this gap with persistent, shareable workspaces designed for agent workflows. Files uploaded to a Fast.io workspace are automatically indexed for semantic search through Intelligence Mode, so agents and humans can query documents by meaning rather than filename. Agents connect through the Fast.io MCP server using Streamable HTTP at /mcp, gaining access to 19 tools for file management, workspace organization, and AI-powered queries.

The ownership transfer pattern fits OpenClaw workflows particularly well. An agent builds a workspace, organizes deliverables, creates branded shares, and transfers ownership to a human. The agent retains admin access for future updates, but the human controls the workspace from that point forward. This turns the agent's local output into something a client can access and manage independently.

Fast.io's free agent tier includes 50GB storage, 5,000 monthly credits, and 5 workspaces with no credit card or expiration. For OpenClaw setups already running locally, connecting to a Fast.io workspace adds an external persistence layer in minutes. For setup details, see Fast.io for agents and the MCP documentation.

Organized workspaces with file management and team collaboration

Frequently Asked Questions

What can you do with OpenClaw?

OpenClaw connects messaging apps like WhatsApp, Telegram, Discord, and Slack to AI coding agents running on your own machine or server. You can use it to automate email triage, schedule recurring reports, run browser tasks, manage files, and build multi-step workflows. Skills from the ClawHub registry extend its capabilities to cover specific tools and APIs.

How do I configure OpenClaw for automation?

OpenClaw's automation layer uses cron jobs and webhooks. Cron jobs schedule recurring tasks with standard cron expressions, one-shot timers, or fixed intervals. Configure them through the CLI with `openclaw cron create` and a schedule pattern. Webhooks let external services trigger agent runs by posting to the `/hooks/agent` or `/hooks/wake` endpoints with a Bearer token for authentication.

What are the best OpenClaw skill examples?

The most practical skills handle specific workflow bottlenecks. File management skills organize project directories and batch-process assets. Communication skills connect to Gmail, Slack, or custom email APIs. Browser automation skills handle web scraping and form submission. The Fast.io MCP server skill provides persistent cloud storage with semantic search. Browse ClawHub at clawhub.ai to find skills matching your workflow.

How do I set up OpenClaw for email automation?

Install the Gmail skill through the OpenClaw CLI and configure OAuth 2.0 credentials from Google Cloud Console. For inbox monitoring, run `openclaw webhooks gmail setup --account your@gmail.com` to configure PubSub-based push notifications. You can set a dedicated model for email processing to control costs, and route results to Slack or Telegram channels using the `--announce` flag with a channel target.

Can OpenClaw work with local models instead of cloud APIs?

Yes. OpenClaw supports any OpenAI-compatible inference endpoint. Configure a local provider like LM Studio or Ollama in the `models.providers` section of openclaw.json, then set it as the primary model in your agent configuration. Skills work identically regardless of which model processes the request, since skill instructions inject at the prompt level. Fallback chains let you mix local and cloud models for cost optimization.

How does OpenClaw handle memory between sessions?

OpenClaw stores memory as plain Markdown files in the agent workspace. MEMORY.md holds long-term facts and loads at every session start. Daily files under the memory/ directory capture working notes and stay searchable through the memory_search tool. Configuring an embedding provider (Gemini, Voyage, Mistral, or Ollama) enables hybrid semantic search across all memory files.

Related Resources

Fastio features

Give your OpenClaw agents persistent file storage

50GB free workspace with Intelligence Mode indexing, MCP server access, and ownership transfer. No credit card, no expiration.