OpenClaw — Under the Hood
A source-backed deep dive into how OpenClaw works — for developers and power users who want to understand the internals.
10 Chapters
Section titled “10 Chapters” 🚀 1. Gateway Architecture The WebSocket broker, lazy-load startup, agent dispatch, and message flow. → 📁 2. Workspace Structure File hierarchy, loading order, and how AGENTS.md, SOUL.md, and friends interact. → 🔄 3. The Agent Loop Turn lifecycle: context assembly, LLM call, tool execution, and reply. → 🧩 4. Session Management How session keys are constructed, stored, isolated, and compacted. → 💬 5. Channel & Account Model Channel registration, multi-account routing, and the plugin interface. → 🔀 6. Multi-Agent Routing Binding evaluation, agent isolation, and the 8-tier routing cache. → 🧠 7. Memory System Two memory layers: static file injection and semantic search backends. → ⚙️ 8. Skills & Tools Built-in tools, AgentSkills spec, skill discovery, and allow/deny lists. → ⏱️ 9. Automation Cron internals, hooks, standing orders, and TaskFlow architecture. → 🔒 10. Security & Permissions Exec policy, the approval flow, sandboxing, and auth profiles. →
Built by LangCraft · Source analysis based on OpenClaw v2026.4.x