OpenClaw
OpenClaw
A self-hosted AI agent platform — "an operating system for AI agents." Built around a central Gateway (Node.js 22+) using a hub-and-spoke architecture. Wraps the pi-agent-core runtime and supports multiple messaging platforms (WhatsApp, Telegram, Discord, Slack, iMessage) via channel adapters.
Capabilities
- RPC surface:
agent,agent.wait, and other gateway commands. - Session management: serialized per-session runs via session lanes + global queue.
- Hook system: both internal gateway hooks and plugin hooks at fine-grained lifecycle points.
- Streaming: bridges pi-agent-core events to structured
assistant,tool, andlifecycleevent streams. - Skills: loaded as a snapshot and injected into env + system prompt.
- Multi-platform channels: WhatsApp, Telegram, Discord, Slack, iMessage via channel adapters.
- Canvas / A2UI: agent-driven visual workspace with declarative UI component rendering.
- Memory: hybrid search (vector + keyword) over long-term memory injected at context assembly.
Architecture
Channel Adapters (WhatsApp, Telegram, Discord…) ─┐
├─→ Gateway (127.0.0.1:18789) ─→ Agent Runtime
Control Interfaces (Web UI, CLI, macOS app…) ┘
Six-phase execution: ingestion → access control & routing → context assembly → model invocation → tool execution → response delivery.
Key concepts
- OpenClaw Gateway — hub-and-spoke design, channel adapters, six-phase flow
- Agent Loop (OpenClaw) — the core execution path (phases 3–5)
- Context Assembly — AGENTS.md / SOUL.md / TOOLS.md + hybrid memory search
- Canvas & A2UI — agent-driven visual workspace
- Security Model — layered defense: loopback, auth, device pairing, Docker sandboxing
- Deployment Options — local, macOS LaunchAgent, Linux/VPS, Fly.io
- Command Queue — queue modes (collect/steer/followup) and lane system
- Streaming — chunking and block reply behavior
- Compaction — long-context summarization
- OpenClaw Hooks — internal gateway hooks