# aluro7in/openclaw architecture

> Architecture diagram of the GitHub repository aluro7in/openclaw, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aluro7in/openclaw
- Repository: https://github.com/aluro7in/openclaw

## Overview

OpenClaw is a self-hosted personal AI assistant: messages and voice input reach a Gateway, which routes work to agents and returns replies through connected channels. The README also describes multi-agent routing, browser and memory tools, and companion apps with voice and Canvas capabilities. Paths and direct wiring are included where the supplied tree or excerpts support them; the README documents several core subsystems whose implementation files are not present in the supplied tree, so their internal links are intentionally limited.

Main entry points: [`src/auto-reply/reply/block-reply-pipeline.ts`](https://github.com/aluro7in/openclaw/blob/main/src/auto-reply/reply/block-reply-pipeline.ts) (Reply delivery), [`src/browser/routes/agent.storage.ts`](https://github.com/aluro7in/openclaw/blob/main/src/browser/routes/agent.storage.ts) (Browser routes), [`apps/android/app/src/main/java/ai/openclaw/android/NodeRuntime.kt`](https://github.com/aluro7in/openclaw/blob/main/apps/android/app/src/main/java/ai/openclaw/android/NodeRuntime.kt) (Android node), [`apps/ios/Sources/Model/NodeAppModel.swift`](https://github.com/aluro7in/openclaw/blob/main/apps/ios/Sources/Model/NodeAppModel.swift) (iOS node)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and Control"]
  node_onboarding["Onboarding"]
  node_gateway["Gateway"]
  node_controlui["Control UI settings<br/>[storage.ts]"]
end

subgraph group_assistant["Assistant Runtime"]
  node_channels["Messaging channels"]
  node_agent["Agent routing"]
  node_reply["Reply delivery"]
  node_policy["Tool policy"]
  node_models["Model providers"]
end

subgraph group_capabilities["Tools and Memory"]
  node_browserroutes["Browser routes<br/>[agent.storage.ts]"]
  node_browsertools["Browser controls"]
  node_memory["Memory embeddings"]
end

subgraph group_companions["Companion Apps"]
  node_android["Android node<br/>[NodeRuntime.kt]"]
  node_ios["iOS node<br/>[NodeAppModel.swift]"]
  node_macnode["macOS node"]
  node_voice["Voice features<br/>[TalkModeManager.kt]"]
  node_canvas["Live Canvas<br/>[RootCanvas.swift]"]
end

node_user(("User"))

node_user -->|"sends message"| node_channels
node_channels -->|"delivers input"| node_gateway
node_gateway -->|"routes request"| node_agent
node_agent -->|"filters tools"| node_policy
node_agent -->|"uses model"| node_models
node_agent -->|"invokes browser"| node_browserroutes
node_browserroutes -->|"runs controls"| node_browsertools
node_agent -->|"uses memory"| node_memory
node_agent -->|"produces reply"| node_reply
node_reply -->|"delivers reply"| node_channels
node_user -->|"configures assistant"| node_onboarding
node_onboarding -->|"sets up"| node_gateway
node_user -->|"sets preferences"| node_controlui
node_android -->|"connects node"| node_gateway
node_ios -->|"connects node"| node_gateway
node_macnode -->|"connects node"| node_gateway
node_voice -->|"sends voice input"| node_gateway
node_gateway -->|"drives canvas"| node_canvas

click node_controlui "https://github.com/aluro7in/openclaw/blob/main/ui/src/ui/storage.ts"
click node_reply "https://github.com/aluro7in/openclaw/blob/main/src/auto-reply/reply/block-reply-pipeline.ts"
click node_policy "https://github.com/aluro7in/openclaw/blob/main/src/agents/tool-policy-pipeline.ts"
click node_models "https://github.com/aluro7in/openclaw/blob/main/src/commands/auth-choice.apply.volcengine.ts"
click node_browserroutes "https://github.com/aluro7in/openclaw/blob/main/src/browser/routes/agent.storage.ts"
click node_browsertools "https://github.com/aluro7in/openclaw/blob/main/src/browser/pw-tools-core.storage.ts"
click node_memory "https://github.com/aluro7in/openclaw/blob/main/src/memory/manager-embedding-ops.ts"
click node_android "https://github.com/aluro7in/openclaw/blob/main/apps/android/app/src/main/java/ai/openclaw/android/NodeRuntime.kt"
click node_ios "https://github.com/aluro7in/openclaw/blob/main/apps/ios/Sources/Model/NodeAppModel.swift"
click node_macnode "https://github.com/aluro7in/openclaw/blob/main/apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift"
click node_voice "https://github.com/aluro7in/openclaw/blob/main/apps/android/app/src/main/java/ai/openclaw/android/voice/TalkModeManager.kt"
click node_canvas "https://github.com/aluro7in/openclaw/blob/main/apps/ios/Sources/RootCanvas.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_onboarding,node_gateway,node_controlui,node_user toneBlue
class node_channels,node_agent,node_reply,node_policy,node_models toneAmber
class node_browserroutes,node_browsertools,node_memory toneMint
class node_android,node_ios,node_macnode,node_voice,node_canvas toneRose
```

## Components

### Setup and Control

- **Onboarding**
- **Gateway**
- [Control UI settings](https://github.com/aluro7in/openclaw/blob/main/ui/src/ui/storage.ts): `ui/src/ui/storage.ts`

### Assistant Runtime

- **Messaging channels**
- **Agent routing**
- [Reply delivery](https://github.com/aluro7in/openclaw/blob/main/src/auto-reply/reply/block-reply-pipeline.ts): `src/auto-reply/reply/block-reply-pipeline.ts`
- [Tool policy](https://github.com/aluro7in/openclaw/blob/main/src/agents/tool-policy-pipeline.ts): `src/agents/tool-policy-pipeline.ts`
- [Model providers](https://github.com/aluro7in/openclaw/blob/main/src/commands/auth-choice.apply.volcengine.ts): `src/commands/auth-choice.apply.volcengine.ts`

### Tools and Memory

- [Browser routes](https://github.com/aluro7in/openclaw/blob/main/src/browser/routes/agent.storage.ts): `src/browser/routes/agent.storage.ts`
- [Browser controls](https://github.com/aluro7in/openclaw/blob/main/src/browser/pw-tools-core.storage.ts): `src/browser/pw-tools-core.storage.ts`
- [Memory embeddings](https://github.com/aluro7in/openclaw/blob/main/src/memory/manager-embedding-ops.ts): `src/memory/manager-embedding-ops.ts`

### Companion Apps

- [Android node](https://github.com/aluro7in/openclaw/blob/main/apps/android/app/src/main/java/ai/openclaw/android/NodeRuntime.kt): `apps/android/app/src/main/java/ai/openclaw/android/NodeRuntime.kt`
- [iOS node](https://github.com/aluro7in/openclaw/blob/main/apps/ios/Sources/Model/NodeAppModel.swift): `apps/ios/Sources/Model/NodeAppModel.swift`
- [macOS node](https://github.com/aluro7in/openclaw/blob/main/apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift): `apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift`
- [Voice features](https://github.com/aluro7in/openclaw/blob/main/apps/android/app/src/main/java/ai/openclaw/android/voice/TalkModeManager.kt): `apps/android/app/src/main/java/ai/openclaw/android/voice/TalkModeManager.kt`
- [Live Canvas](https://github.com/aluro7in/openclaw/blob/main/apps/ios/Sources/RootCanvas.swift): `apps/ios/Sources/RootCanvas.swift`

### Other components

- **User**

## Connections

- User → Messaging channels: sends message
- Messaging channels → Gateway: delivers input
- Gateway → Agent routing: routes request
- Agent routing → Tool policy: filters tools
- Agent routing → Model providers: uses model
- Agent routing → Browser routes: invokes browser
- Browser routes → Browser controls: runs controls
- Agent routing → Memory embeddings: uses memory
- Agent routing → Reply delivery: produces reply
- Reply delivery → Messaging channels: delivers reply
- User → Onboarding: configures assistant
- Onboarding → Gateway: sets up
- User → Control UI settings: sets preferences
- Android node → Gateway: connects node
- iOS node → Gateway: connects node
- macOS node → Gateway: connects node
- Voice features → Gateway: sends voice input
- Gateway → Live Canvas: drives canvas
