Architecture โ
OpenClaw's system architecture overview.
System Components โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Gateway โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Channel โ โ Channel โ โ Agent โ โ Tools โ โ
โ โ Manager โ โ Handler โ โ Manager โ โ Manager โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Session โ โ Memory โ โ Model โ โ Cron โ โ
โ โ Store โ โ Store โ โ Router โ โ Schedulerโ โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโ โโโโโโโโโโโโโ
โ Channels โ โ Models โ
โ WhatsApp โ โ Anthropic โ
โ Telegram โ โ OpenAI โ
โ Discord โ โ OpenRouterโ
โโโโโโโโโโโโโ โโโโโโโโโโโโโComponents โ
Gateway โ
The Gateway is the central hub that:
- Manages all channel connections
- Routes messages to agents
- Handles authentication
- Coordinates tools and skills
- Manages sessions and memory
Channels โ
Channels are messaging platform integrations:
- WhatsApp, Telegram, Discord, etc.
- Each channel has its own authentication
- Messages are normalized to a common format
Agents โ
Agents are AI entities that:
- Process incoming messages
- Use configured AI models
- Have access to tools and skills
- Maintain conversation context
Sessions โ
Sessions track conversation state:
- Message history
- Context windows
- User preferences
- Active tools
Memory โ
Long-term storage for:
- User facts and preferences
- Important information
- Cross-session context
Data Flow โ
Incoming Message
- Channel receives message
- Gateway identifies/creates session
- Agent processes message
Processing
- Agent retrieves relevant memory
- Model generates response
- Tools executed if needed
Response
- Response formatted for channel
- Sent back to user
- Session/memory updated
Configuration โ
All components are configured via ~/.config/openclaw/config.json5