The Hub of Intelligence
The Gateway is the central nervous system of OpenClaw. It serves as an asynchronous message broker, ensuring that commands from any channel (CLI, WhatsApp, etc.) are correctly routed to the AI core and back.
Key Responsibilities
- Session Management: Tracking active conversations and their corresponding model states.
- Tool Orchestration: Determining which skill to call based on the LLM's function definition.
- Privacy Filtering: Scrubbing sensitive logs before they are cached or stored.
- Queue Management: Handling high-traffic bursts from multiple concurrent users or agent teams.
Architecture: The Gateway is built on
Express and Socket.io,
providing a lightweight but highly scalable foundation.