# umr-xiaomai/seekclaw architecture

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

- Interactive diagram: https://gitdiagram.com/umr-xiaomai/seekclaw
- Repository: https://github.com/umr-xiaomai/seekclaw

## Overview

SeekClaw is a .NET AI-agent runtime with CLI and Electron desktop clients, plus a web documentation and skills portal. The main workflow starts with a user request in a client, reaches the runtime through its facade or local daemon, and is handled by the Agent using model providers and tools before results return through events. The runtime also supports workspaces, persistent sessions, skills, MCP, scheduled tasks, computer use, and verification. Relationships for unsampled subsystems follow explicit README architecture statements; their internal call paths are not asserted here.

Main entry points: [`seekclaw_runtime/SeekClawRuntime.cs`](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/SeekClawRuntime.cs) (Runtime Facade), [`seekclaw_runtime/Agents/Agent.cs`](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Agents/Agent.cs) (Agent Loop), [`seekclaw_webserver/Program.cs`](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Program.cs) (Docs and Skills Portal), [`seekclaw_runtime/Events/EventBus.cs`](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Events/EventBus.cs) (Event Bus)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User Clients"]
  node_cli["CLI<br/>[Program.cs]"]
  node_desktop["Desktop UI<br/>[App.vue]"]
  node_desktop_ipc["Daemon Client<br/>[daemon-client.ts]"]
end

subgraph group_runtime["Runtime Orchestration"]
  node_daemon["Daemon Server<br/>[DaemonServer.cs]"]
  node_facade["Runtime Facade<br/>[SeekClawRuntime.cs]"]
  node_agent["Agent Loop<br/>[Agent.cs]"]
  node_events["Event Bus<br/>[EventBus.cs]"]
end

subgraph group_capabilities["Agent Capabilities"]
  node_providers["Provider Routing<br/>[ProviderManager.cs]"]
  node_tools["Built-in Tools"]
  node_mcp["MCP Integrations<br/>[McpManager.cs]"]
  node_computer["Computer Use<br/>[ComputerTools.cs]"]
  node_skills["Skills<br/>[SkillManager.cs]"]
  node_prompts["Prompt System<br/>[PromptProvider.cs]"]
  node_subagents["Subagents<br/>[SubAgentRunner.cs]"]
  node_verification["Build Verification<br/>[BuildVerifier.cs]"]
  node_scheduling["Scheduled Tasks<br/>[ScheduleService.cs]"]
end

subgraph group_state["Runtime State"]
  node_workspace["Workspace Manager"]
  node_config["Configuration<br/>[ConfigStore.cs]"]
  node_sessions["Session Store<br/>[SessionStore.cs]"]
  node_database[("SQLite Database")]
end

subgraph group_portal["Web Portal"]
  node_web["Docs and Skills Portal<br/>[Program.cs]"]
  node_web_auth["Authentication<br/>[AuthService.cs]"]
  node_web_skills["Skills Service<br/>[SkillService.cs]"]
  node_web_db[("Portal Database<br/>[AppDbContext.cs]")]
end

node_user(("User"))
node_web_user(("Portal User"))

node_user -->|"enters request"| node_cli
node_user -->|"enters request"| node_desktop
node_cli -->|"invokes runtime"| node_facade
node_desktop -.->|"sends commands"| node_desktop_ipc
node_desktop_ipc -->|"uses JSONL IPC"| node_daemon
node_daemon -->|"dispatches turns"| node_agent
node_facade -->|"provides runtime"| node_agent
node_agent -->|"requests completions"| node_providers
node_agent -->|"dispatches tools"| node_tools
node_agent -->|"persists sessions"| node_sessions
node_agent -->|"runs verification"| node_verification
node_agent -->|"publishes events"| node_events
node_events -->|"updates terminal"| node_cli
node_events -->|"notifies clients"| node_daemon
node_facade -->|"loads settings"| node_config
node_facade -.->|"composes workspace"| node_workspace
node_facade -->|"attaches skills"| node_skills
node_facade -->|"registers runner"| node_subagents
node_facade -->|"registers built-ins"| node_tools
node_skills -->|"contributes prompts"| node_prompts
node_mcp -->|"registers tools"| node_tools
node_mcp -->|"provides prompts"| node_prompts
node_agent -->|"uses computer tools"| node_computer
node_facade -.->|"hosts schedules"| node_scheduling
node_sessions -->|"stores sessions"| node_database
node_database -->|"is composed by"| node_facade
node_web_user -->|"visits portal"| node_web
node_web -->|"routes authentication"| node_web_auth
node_web -->|"routes skill market"| node_web_skills
node_web_auth -->|"reads and writes"| node_web_db
node_web_skills -->|"reads and writes"| node_web_db
node_web -.->|"publishes market API"| node_skills

click node_cli "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_cli/Program.cs"
click node_desktop "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_desktop/src/renderer/src/App.vue"
click node_desktop_ipc "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_desktop/src/main/daemon-client.ts"
click node_daemon "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Daemon/DaemonServer.cs"
click node_facade "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/SeekClawRuntime.cs"
click node_agent "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Agents/Agent.cs"
click node_events "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Events/EventBus.cs"
click node_providers "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Providers/ProviderManager.cs"
click node_tools "https://github.com/umr-xiaomai/seekclaw/tree/master/seekclaw_runtime/Tools/Builtin"
click node_mcp "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Mcp/McpManager.cs"
click node_computer "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/ComputerUse/ComputerTools.cs"
click node_skills "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Skills/SkillManager.cs"
click node_prompts "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Prompts/PromptProvider.cs"
click node_subagents "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/SubAgents/SubAgentRunner.cs"
click node_verification "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Verification/BuildVerifier.cs"
click node_scheduling "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Scheduling/ScheduleService.cs"
click node_workspace "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Workspaces/WorkspaceManager.cs"
click node_config "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Configuration/ConfigStore.cs"
click node_sessions "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Sessions/SessionStore.cs"
click node_database "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Data/SeekClawDatabase.cs"
click node_web "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Program.cs"
click node_web_auth "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Services/AuthService.cs"
click node_web_skills "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Services/SkillService.cs"
click node_web_db "https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Data/AppDbContext.cs"

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_cli,node_desktop,node_desktop_ipc,node_user,node_web_user toneBlue
class node_daemon,node_facade,node_agent,node_events toneAmber
class node_providers,node_tools,node_mcp,node_computer,node_skills,node_prompts,node_subagents,node_verification,node_scheduling toneMint
class node_workspace,node_config,node_sessions,node_database toneRose
class node_web,node_web_auth,node_web_skills,node_web_db toneIndigo
```

## Components

### User Clients

- [CLI](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_cli/Program.cs): `seekclaw_cli/Program.cs`
- [Desktop UI](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_desktop/src/renderer/src/App.vue): `seekclaw_desktop/src/renderer/src/App.vue`
- [Daemon Client](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_desktop/src/main/daemon-client.ts): `seekclaw_desktop/src/main/daemon-client.ts`

### Runtime Orchestration

- [Daemon Server](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Daemon/DaemonServer.cs): `seekclaw_runtime/Daemon/DaemonServer.cs`
- [Runtime Facade](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/SeekClawRuntime.cs): `seekclaw_runtime/SeekClawRuntime.cs`
- [Agent Loop](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Agents/Agent.cs): `seekclaw_runtime/Agents/Agent.cs`
- [Event Bus](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Events/EventBus.cs): `seekclaw_runtime/Events/EventBus.cs`

### Agent Capabilities

- [Provider Routing](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Providers/ProviderManager.cs): `seekclaw_runtime/Providers/ProviderManager.cs`
- [Built-in Tools](https://github.com/umr-xiaomai/seekclaw/tree/master/seekclaw_runtime/Tools/Builtin): `seekclaw_runtime/Tools/Builtin`
- [MCP Integrations](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Mcp/McpManager.cs): `seekclaw_runtime/Mcp/McpManager.cs`
- [Computer Use](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/ComputerUse/ComputerTools.cs): `seekclaw_runtime/ComputerUse/ComputerTools.cs`
- [Skills](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Skills/SkillManager.cs): `seekclaw_runtime/Skills/SkillManager.cs`
- [Prompt System](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Prompts/PromptProvider.cs): `seekclaw_runtime/Prompts/PromptProvider.cs`
- [Subagents](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/SubAgents/SubAgentRunner.cs): `seekclaw_runtime/SubAgents/SubAgentRunner.cs`
- [Build Verification](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Verification/BuildVerifier.cs): `seekclaw_runtime/Verification/BuildVerifier.cs`
- [Scheduled Tasks](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Scheduling/ScheduleService.cs): `seekclaw_runtime/Scheduling/ScheduleService.cs`

### Runtime State

- [Workspace Manager](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Workspaces/WorkspaceManager.cs): `seekclaw_runtime/Workspaces/WorkspaceManager.cs`
- [Configuration](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Configuration/ConfigStore.cs): `seekclaw_runtime/Configuration/ConfigStore.cs`
- [Session Store](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Sessions/SessionStore.cs): `seekclaw_runtime/Sessions/SessionStore.cs`
- [SQLite Database](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_runtime/Data/SeekClawDatabase.cs): `seekclaw_runtime/Data/SeekClawDatabase.cs`

### Web Portal

- [Docs and Skills Portal](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Program.cs): `seekclaw_webserver/Program.cs`
- [Authentication](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Services/AuthService.cs): `seekclaw_webserver/Services/AuthService.cs`
- [Skills Service](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Services/SkillService.cs): `seekclaw_webserver/Services/SkillService.cs`
- [Portal Database](https://github.com/umr-xiaomai/seekclaw/blob/master/seekclaw_webserver/Data/AppDbContext.cs): `seekclaw_webserver/Data/AppDbContext.cs`

### Other components

- **User**
- **Portal User**

## Connections

- User → CLI: enters request (evidence: `README.md`)
- User → Desktop UI: enters request (evidence: `README.md`)
- CLI → Runtime Facade: invokes runtime (evidence: `README.md`)
- Desktop UI → Daemon Client: sends commands
- Daemon Client → Daemon Server: uses JSONL IPC (evidence: `README.md`)
- Daemon Server → Agent Loop: dispatches turns (evidence: `README.md`)
- Runtime Facade → Agent Loop: provides runtime (evidence: `README.md`)
- Agent Loop → Provider Routing: requests completions (evidence: `README.md`)
- Agent Loop → Built-in Tools: dispatches tools (evidence: `README.md`)
- Agent Loop → Session Store: persists sessions (evidence: `README.md`)
- Agent Loop → Build Verification: runs verification (evidence: `README.md`)
- Agent Loop → Event Bus: publishes events (evidence: `README.md`)
- Event Bus → CLI: updates terminal (evidence: `README.md`)
- Event Bus → Daemon Server: notifies clients (evidence: `README.md`)
- Runtime Facade → Configuration: loads settings (evidence: `seekclaw_runtime/SeekClawRuntime.cs`)
- Runtime Facade → Workspace Manager: composes workspace (evidence: `seekclaw_runtime/SeekClawRuntime.cs`)
- Runtime Facade → Skills: attaches skills (evidence: `seekclaw_runtime/SeekClawRuntime.cs`)
- Runtime Facade → Subagents: registers runner (evidence: `seekclaw_runtime/SeekClawRuntime.cs`)
- Runtime Facade → Built-in Tools: registers built-ins (evidence: `seekclaw_runtime/SeekClawRuntime.cs`)
- Skills → Prompt System: contributes prompts (evidence: `seekclaw_runtime/Skills/SkillManager.cs`)
- MCP Integrations → Built-in Tools: registers tools (evidence: `README.md`)
- MCP Integrations → Prompt System: provides prompts (evidence: `README.md`)
- Agent Loop → Computer Use: uses computer tools (evidence: `README.md`)
- Runtime Facade → Scheduled Tasks: hosts schedules (evidence: `seekclaw_runtime/Scheduling/ScheduleService.cs`)
- Session Store → SQLite Database: stores sessions (evidence: `seekclaw_runtime/Sessions/SessionStore.cs`)
- SQLite Database → Runtime Facade: is composed by (evidence: `seekclaw_runtime/SeekClawRuntime.cs`)
- Portal User → Docs and Skills Portal: visits portal (evidence: `README.md`)
- Docs and Skills Portal → Authentication: routes authentication (evidence: `seekclaw_webserver/Program.cs`)
- Docs and Skills Portal → Skills Service: routes skill market (evidence: `seekclaw_webserver/Program.cs`)
- Authentication → Portal Database: reads and writes (evidence: `seekclaw_webserver/Services/AuthService.cs`)
- Skills Service → Portal Database: reads and writes (evidence: `seekclaw_webserver/Services/SkillService.cs`)
- Docs and Skills Portal → Skills: publishes market API (evidence: `README.md`)
