# deepseek-ai/deepseek-harness architecture

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

- Interactive diagram: https://gitdiagram.com/deepseek-ai/deepseek-harness
- Repository: https://github.com/deepseek-ai/deepseek-harness
- Video tour (about a minute): https://gitdiagram.com/deepseek-ai/deepseek-harness/video

## Overview

DeepSeek Harness is a plugin-oriented agent harness with Web and Desktop entry points. The documented user path is launching `dsh web` to start the Web UI; the source index also identifies session, tool, subagent, scheduling, and plugin-management subsystems. The graph preserves these distinct product areas and the session client’s internal layers. Evidence is limited: only selected files were sampled, so undocumented runtime connections between subsystems are intentionally not asserted.

Main entry points: [`apps/cli/src/bin.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/src/bin.ts) (CLI launcher), [`apps/web/src/main.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/web/src/main.ts) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_cli["CLI launcher<br/>[bin.ts]"]
  node_web["Web application<br/>[main.ts]"]
  node_desktop["Desktop application<br/>[main.ts]"]
end

subgraph group_sessions["Session lifecycle"]
  node_session_client["Session client manager<br/>[manager.ts]"]
  node_session_projection["Session projections"]
  node_session_notify["Session notifications<br/>[notifier.ts]"]
  node_session_history["History controller<br/>[controller.ts]"]
  node_session_storage[("JSONL persistence<br/>[storage.ts]")]
end

subgraph group_agent["Agent capabilities"]
  node_tool_pipeline["Tool execution<br/>[pipeline.ts]"]
  node_subagent_manager["Subagent manager<br/>[manager.ts]"]
  node_schedule_storage[("Scheduled tasks<br/>[storage.ts]")]
end

subgraph group_extensions["Plugin experience"]
  node_plugin_manager["Plugin manager UI"]
  node_mods_engine["Claude mods engine<br/>[engine.ts]"]
end

node_user(("User"))

node_user -->|"launches"| node_cli
node_cli -->|"starts"| node_web

click node_cli "https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/src/bin.ts"
click node_web "https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/web/src/main.ts"
click node_desktop "https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/desktop/src/main.ts"
click node_session_client "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/client/sessions/manager.ts"
click node_session_projection "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/client/sessions/projection-store.ts"
click node_session_notify "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/client/sessions/notifier.ts"
click node_session_history "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/history/controller.ts"
click node_session_storage "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-persistence-jsonl/src/storage.ts"
click node_tool_pipeline "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/pipeline.ts"
click node_subagent_manager "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/src/manager.ts"
click node_schedule_storage "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/schedule/schedule/src/storage.ts"
click node_plugin_manager "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx"
click node_mods_engine "https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/claude-code-mods/src/engine.ts"

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_web,node_desktop,node_user toneBlue
class node_session_client,node_session_projection,node_session_notify,node_session_history,node_session_storage toneAmber
class node_tool_pipeline,node_subagent_manager,node_schedule_storage toneMint
class node_plugin_manager,node_mods_engine toneRose
```

## Components

### User entry points

- [CLI launcher](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/src/bin.ts): `apps/cli/src/bin.ts`
- [Web application](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/web/src/main.ts): `apps/web/src/main.ts`
- [Desktop application](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/desktop/src/main.ts): `apps/desktop/src/main.ts`

### Session lifecycle

- [Session client manager](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/client/sessions/manager.ts): `packages/api/session-controller/src/client/sessions/manager.ts`
- [Session projections](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/client/sessions/projection-store.ts): `packages/api/session-controller/src/client/sessions/projection-store.ts`
- [Session notifications](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/client/sessions/notifier.ts): `packages/api/session-controller/src/client/sessions/notifier.ts`
- [History controller](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/history/controller.ts): `packages/api/session-controller/src/history/controller.ts`
- [JSONL persistence](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-persistence-jsonl/src/storage.ts): `packages/session/session-persistence-jsonl/src/storage.ts`

### Agent capabilities

- [Tool execution](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/pipeline.ts): `packages/core/tools/src/pipeline.ts`
- [Subagent manager](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/src/manager.ts): `packages/subagent/subagent/src/manager.ts`
- [Scheduled tasks](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/schedule/schedule/src/storage.ts): `packages/schedule/schedule/src/storage.ts`

### Plugin experience

- [Plugin manager UI](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx): `packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx`
- [Claude mods engine](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/claude-code-mods/src/engine.ts): `packages/experimental/claude-code-mods/src/engine.ts`

### Other components

- **User**

## Connections

- User → CLI launcher: launches (evidence: `README.md`)
- CLI launcher → Web application: starts (evidence: `README.md`)
