
The Art of Understanding Relationships
"How do these parts connect and interact?"
Logic is the second stage, and it depends entirely on Grammar being solid. Logic answers the questions: "How do these parts connect? What causes what? What are the rules? What happens if I change this?"
In classical education, Logic was taught to students around ages 11-14 - the age when children naturally begin questioning everything and arguing. The curriculum channeled that instinct into formal reasoning: cause and effect, if-then relationships, identifying contradictions, distinguishing correlation from causation.
For OpenClaw, Logic means understanding how the seven core components interact as a system. When a message arrives on WhatsApp, what path does it take through the architecture? Why does session memory work differently from workspace memory? What happens when the AI model's context window fills up?
The test for whether you have completed Logic is not whether you can recite facts but whether you can predict outcomes.
Learning Objectives:
OpenClaw is organized into three conceptual layers. Understanding this architecture is the key to troubleshooting, customization, and mastery.
Layer 1: The Foundation (Gateway)
The Gateway is the base layer. It is a single process that runs continuously in the background. Everything else depends on it. If the Gateway crashes, the entire system goes down. The Gateway handles:
Layer 2: The Connections (Channels & Nodes)
The middle layer consists of all the ways the outside world connects to the Gateway. This includes:
Each connection in this layer is independent. If WhatsApp breaks, Telegram still works. If your iPhone disconnects, your Mac node continues functioning.
Layer 3: The Intelligence (Agent & AI Model)
The top layer is where the actual "thinking" happens:
Learning Objectives:
When you send a message to your OpenClaw assistant, here is exactly what happens:
Step 1: Platform Capture
You type a message in WhatsApp (or Telegram, Discord, etc.) and hit send. The message lives on that platform's servers first.
Step 2: Channel Adapter Receives
The OpenClaw channel adapter for that platform (running as part of the Gateway) polls or listens for new messages. When it detects your message, it downloads it and translates it into OpenClaw's internal message format.
Step 3: Gateway Routes
The Gateway receives the standardized message from the channel adapter. It looks up which agent should handle this message (based on the channel, user, and session). It then routes the message to that agent.
Step 4: Agent Processes
The agent receives the message and loads the relevant context:
The agent constructs a prompt that includes your message plus all this context, and sends it to the AI model.
Step 5: AI Model Responds
The AI model (Claude, GPT, etc.) processes the prompt and generates a response. This might be:
If the response includes tool calls, the agent executes them and may send follow-up prompts to the AI model with the tool results.
Step 6: Response Returns
Once the agent has a final response, it sends it back to the Gateway. The Gateway routes it to the appropriate channel adapter. The channel adapter translates it back into the platform's format and posts it. You see the response in WhatsApp.
Learning Objectives:
| If You Change... | Then This Happens... |
|---|---|
| The AI model in config | The agent uses a different brain on the next message. No restart needed (hot-reload). Like swapping which chef is in the kitchen. |
| A channel setting | The Gateway reconnects to that platform. Other channels continue working uninterrupted. |
| SOUL.md | The agent's personality changes on the next conversation turn. Like updating an employee's personality profile. |
| AGENTS.md | The agent's core behavior instructions change. This is the most impactful edit you can make - it is the agent's entire job description and rulebook. |
| A skill is installed | The agent gains a new capability. Skills are discovered at runtime and selectively injected into the prompt only when relevant - not every skill loads on every message. |
| The Gateway token | All connected clients must re-authenticate. Like changing the office door code - everyone needs the new password. |
| Session reset settings | Changes when conversations expire and get wiped. Default is daily at 4 AM. Misconfiguring this can cause the "my agent forgot everything" frustration. |
Skills come in three categories, and understanding the distinction matters enormously for both security and reliability:
Bundled Skills - come pre-installed with OpenClaw. Maintained by the core team. Generally safe and well-tested. These are like the software that comes pre-installed on a new computer.
Managed Skills - community-created skills available through the OpenClaw ecosystem. Quality and safety vary widely. Some are excellent. Some are poorly written. Some could be malicious. Always read the SKILL.md before installing. These are like third-party apps from an app store with no review process.
Workspace Skills - skills you create yourself in your agent's workspace/skills/ directory. You control the quality and safety because you wrote them. These are like custom macros or scripts you build for your own use.
Skills can run code on your computer. Cisco's AI security research team tested a third-party OpenClaw skill and found it performed data exfiltration and prompt injection without user awareness. The skill repository lacks adequate vetting to prevent malicious submissions. This is not a theoretical risk - it has been demonstrated. Only install skills you trust, review the SKILL.md file before installing, and prefer sandboxed execution for anything from an unknown source.
Learning Objectives:
Session Memory (Short-term, Volatile)
This is the conversation transcript - the raw back-and-forth messages in the current session. It lives in RAM and in temporary session files. Session memory is:
Workspace Memory (Medium-term, Persistent)
This is information the agent explicitly saves to files in its workspace directory. Workspace memory is:
Compacted Memory (Long-term, Lossy)
When a session grows too long, older messages are summarized to make room. Compacted memory is:
The most common frustration with OpenClaw is memory loss. Understanding why it happens requires understanding three mechanisms:
Session resets: Sessions expire daily by default. When a session resets, the agent loses all conversation context unless important facts were saved to workspace memory files first.
Compaction: When a session grows too long, older content is summarized (lossy). Details, credentials, and specific instructions shared early in a conversation can be lost during compaction.
Memory search failures: Even when information is saved to workspace files, the agent must search for it. If the search does not return the right file, the agent behaves as if it does not know the information.
Learning Objectives:
OpenClaw's security is built on multiple layers:
Network binding: By default, the Gateway only listens on localhost (127.0.0.1). Nobody outside your computer can reach it. This is the most important security feature and should not be changed without understanding the consequences.
Authentication token: Even local connections can require a password-like token. If someone gains access to your computer (physically or remotely), this token prevents them from controlling the Gateway.
Device pairing: New devices (iPhones, iPads, other computers) must be approved before they can connect to the Gateway. This prevents unknown devices from connecting even if they can reach the Gateway's network address.
Sandboxing: Tools can run inside Docker containers so they cannot damage your main system. This limits the blast radius if a malicious skill or prompt injection causes the agent to execute harmful commands.
Channel-level controls: You can restrict which users, groups, and roles the agent responds to on each platform. This prevents unauthorized people from commanding your agent.
The most dangerous and most common mistake is exposing your Gateway to the public internet without proper authentication. Security researchers found over 30,000 exposed OpenClaw instances in a single two-week analysis period in early 2026.
If someone reaches your Gateway, they can:
Never expose the Gateway to the internet. If you need remote access, use Tailscale or an SSH tunnel.
You have learned how OpenClaw's components interact as a system. Now it is time to test your understanding. You need to score 70% or higher to unlock the Rhetoric stage.
The quiz will cover:
Take your time and think through each question carefully.
Take the Logic Stage quiz to prove you understand how OpenClaw's components interact. You need 70% or higher to unlock the Rhetoric stage.