Intermediate

How OpenClaw Works

OpenClaw is a runtime that wraps an LLM with real computer access, exposes it through messaging channels, and manages persistent tasks via a local task ledger. Understanding the four layers helps you know what it can and can't do, and how to configure it.

Architecture Layers

You
WhatsApp / Telegram / Discord / Slack / iMessage
Channel Layer
Messaging adapter
Command parser
Task Brain
SQLite task ledger
Cron scheduler
Subagent manager
LLM Core
Claude / GPT / Gemini / Local model
AgentSkills
Shell
File system
Browser (Playwright)
Email / Calendar
50+ integrations

OpenClaw layer architecture β€” messages flow down, actions flow up

How a Command Flows

You send a message
via WhatsApp, Telegram, etc.
β†’
Channel adapter receives it
normalises to internal format
β†’
Task Brain checks context
existing tasks, memory, cron state
β†’
LLM decides what to do
Claude / GPT / local model
β†’
AgentSkill executes
shell, browser, file, API
β†’
Result sent back to you
reply in same messaging thread

End-to-end command flow

LLM Core

OpenClaw is model-agnostic β€” you bring your own LLM. Configure it with:

  • Cloud models: Claude (Anthropic API key), GPT-4o / GPT-5 (OpenAI API key), Gemini (Google API key)
  • Local models: Any model served by Ollama, LM Studio, or a compatible OpenAI-compatible endpoint β€” fully offline, no API key required

The LLM sees your message plus context (memory, task state, relevant skill descriptions) and decides which AgentSkill to invoke, with what arguments. It then receives the skill output and formulates a response.

AgentSkills Layer

AgentSkills are the tools the LLM can call. Each skill is a module that gives the agent access to a specific capability: run a shell command, read/write files, control a browser via Playwright, send an email, query a database. OpenClaw ships with 100+ built-in skills and an extension system for community or custom skills. The LLM never has direct OS access β€” it always goes through a skill, which means you can audit and restrict what OpenClaw can do.

Task Brain

The Task Brain (introduced in the 2026.3.31 release) is a SQLite-backed task ledger that manages everything that's running in the background. Before Task Brain, each OpenClaw session was stateless. Now it maintains:

  • Pending and in-progress tasks
  • Cron jobs (recurring scheduled tasks)
  • Subagents running in parallel
  • Background processes and their outputs

This means you can kick off a task (β€œcheck my inbox every hour and summarise important emails”), close the chat, and it keeps running. The Task Brain persists across restarts.

Persistent Memory

OpenClaw maintains a persistent memory store on your local machine. It learns your preferences, recurring contexts (β€œmy work calendar is here”, β€œI prefer Python for scripts”), and past task outcomes. This memory is injected into the LLM context on each request, giving OpenClaw continuity across sessions that cloud assistants lack without extra configuration.

Checklist: Do You Understand This?

  • OpenClaw has four layers: messaging channel β†’ Task Brain β†’ LLM β†’ AgentSkills
  • The LLM never has direct OS access β€” it calls AgentSkills which are auditable modules
  • Task Brain (2026.3.31) adds a SQLite ledger for persistent background tasks, cron jobs, and subagents
  • Model-agnostic: works with cloud APIs (Claude, GPT, Gemini) or fully local models (Ollama)
  • Persistent memory survives across sessions β€” stored locally on your machine

Page built: 01 Jun 2026