# botharness/deepseekbot architecture

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

- Interactive diagram: https://gitdiagram.com/botharness/deepseekbot
- Repository: https://github.com/botharness/deepseekbot

## Overview

Tobs is a DeepSeek Harness plugin and companion mobile client for managing a persistent crew of AI bots. The main workflow is to create or install bots, talk with them individually or in groups, and delegate work that can recur or require approval; users can also connect external chat services and let bots operate computers or browsers. The graph preserves README-documented capabilities, while source evidence is limited to the supplied excerpts and SOURCE INDEX, so many runtime links are documented rather than verified in sampled implementation.

Main entry points: [`apps/mobile/src/host/host-session.ts`](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/host/host-session.ts) (Host session), [`apps/mobile/src/host/bot-creation-steps.ts`](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/host/bot-creation-steps.ts) (Bot creation), [`packages/core/src/messaging`](https://github.com/botharness/deepseekbot/tree/main/packages/core/src/messaging) (Conversations), [`packages/host-client/src/client.ts`](https://github.com/botharness/deepseekbot/blob/main/packages/host-client/src/client.ts) (Host client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bot_work["Bots and collaboration"]
  node_bot_creation["Bot creation"]
  node_bot_identity["Bot identity"]
  node_conversations["Conversations"]
  node_group_work["Group collaboration"]
  node_memory["Bot memory<br/>[memory.tsx]"]
  node_routines["Scheduled routines<br/>[routine-new.tsx]"]
  node_approvals["Approvals<br/>[approval-rules.tsx]"]
  node_computer_browser["Computer and browser<br/>[service.ts]"]
end

subgraph group_host_runtime["Host and connectivity"]
  node_host_session["Host session<br/>[host-session.ts]"]
  node_host_client["Host client<br/>[client.ts]"]
  node_local_cache[("Conversation cache")]
end

subgraph group_mobile_client["Mobile experience"]
  node_mobile_app["Mobile app routes"]
  node_notifications["Notifications"]
  node_pairing["Host pairing"]
  node_settings["Preferences and storage"]
end

subgraph group_ecosystem["Integrations and distribution"]
  node_external_chats["Chat services"]
  node_marketplace["Bot marketplace<br/>[worker.ts]"]
  node_cloud_teams["Cloud teams"]
end

node_user(("User"))
node_dsh["DeepSeek Harness"]

node_user -->|"uses"| node_mobile_app
node_mobile_app -.->|"connects through"| node_host_session
node_host_session -->|"uses"| node_host_client
node_host_client -.->|"connects to"| node_dsh
node_user -->|"creates"| node_bot_creation
node_bot_creation -.->|"configures"| node_bot_identity
node_user -->|"chats with"| node_conversations
node_user -->|"delegates in"| node_group_work
node_conversations -->|"uses persistent memory"| node_memory
node_user -->|"schedules"| node_routines
node_user -->|"reviews"| node_approvals
node_user -->|"authorizes"| node_computer_browser
node_host_session -->|"loads conversations"| node_local_cache
node_host_session -.->|"coordinates"| node_notifications
node_user -->|"pairs device"| node_pairing
node_user -->|"manages preferences"| node_settings
node_user -->|"connects bots"| node_external_chats
node_user -->|"browses and installs"| node_marketplace
node_user -.->|"manages teams"| node_cloud_teams

click node_mobile_app "https://github.com/botharness/deepseekbot/tree/main/apps/mobile/app"
click node_host_session "https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/host/host-session.ts"
click node_host_client "https://github.com/botharness/deepseekbot/blob/main/packages/host-client/src/client.ts"
click node_bot_creation "https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/host/bot-creation-steps.ts"
click node_bot_identity "https://github.com/botharness/deepseekbot/tree/main/packages/core/src/bots"
click node_conversations "https://github.com/botharness/deepseekbot/tree/main/packages/core/src/messaging"
click node_group_work "https://github.com/botharness/deepseekbot/tree/main/apps/mobile/app/group"
click node_memory "https://github.com/botharness/deepseekbot/blob/main/apps/mobile/app/bot/%5Bslug%5D/memory.tsx"
click node_routines "https://github.com/botharness/deepseekbot/blob/main/apps/mobile/app/bot/%5Bslug%5D/routine-new.tsx"
click node_approvals "https://github.com/botharness/deepseekbot/blob/main/apps/mobile/app/bot/%5Bslug%5D/approval-rules.tsx"
click node_computer_browser "https://github.com/botharness/deepseekbot/blob/main/packages/computer/src/service.ts"
click node_local_cache "https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/host/native-conversations.ts"
click node_notifications "https://github.com/botharness/deepseekbot/blob/main/apps/mobile/modules/conversation-notifications/android/src/main/java/expo/modules/conversationnotifications/ConnectionService.kt"
click node_pairing "https://github.com/botharness/deepseekbot/tree/main/apps/mobile/app/pair"
click node_settings "https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/ui/storage-settings.tsx"
click node_external_chats "https://github.com/botharness/deepseekbot/tree/main/packages/core/src"
click node_marketplace "https://github.com/botharness/deepseekbot/blob/main/packages/market/src/worker.ts"
click node_cloud_teams "https://github.com/botharness/deepseekbot/tree/main/apps/mobile/src/cloud"

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_bot_creation,node_bot_identity,node_conversations,node_group_work,node_memory,node_routines,node_approvals,node_computer_browser,node_user toneBlue
class node_host_session,node_host_client,node_local_cache toneAmber
class node_mobile_app,node_notifications,node_pairing,node_settings toneMint
class node_external_chats,node_marketplace,node_cloud_teams toneRose
class node_dsh toneIndigo
```

## Components

### Bots and collaboration

- [Bot creation](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/host/bot-creation-steps.ts): `apps/mobile/src/host/bot-creation-steps.ts`
- [Bot identity](https://github.com/botharness/deepseekbot/tree/main/packages/core/src/bots): `packages/core/src/bots`
- [Conversations](https://github.com/botharness/deepseekbot/tree/main/packages/core/src/messaging): `packages/core/src/messaging`
- [Group collaboration](https://github.com/botharness/deepseekbot/tree/main/apps/mobile/app/group): `apps/mobile/app/group`
- [Bot memory](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/app/bot/%5Bslug%5D/memory.tsx): `apps/mobile/app/bot/[slug]/memory.tsx`
- [Scheduled routines](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/app/bot/%5Bslug%5D/routine-new.tsx): `apps/mobile/app/bot/[slug]/routine-new.tsx`
- [Approvals](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/app/bot/%5Bslug%5D/approval-rules.tsx): `apps/mobile/app/bot/[slug]/approval-rules.tsx`
- [Computer and browser](https://github.com/botharness/deepseekbot/blob/main/packages/computer/src/service.ts): `packages/computer/src/service.ts`

### Host and connectivity

- [Host session](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/host/host-session.ts): `apps/mobile/src/host/host-session.ts`
- [Host client](https://github.com/botharness/deepseekbot/blob/main/packages/host-client/src/client.ts): `packages/host-client/src/client.ts`
- [Conversation cache](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/host/native-conversations.ts): `apps/mobile/src/host/native-conversations.ts`

### Mobile experience

- [Mobile app routes](https://github.com/botharness/deepseekbot/tree/main/apps/mobile/app): `apps/mobile/app`
- [Notifications](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/modules/conversation-notifications/android/src/main/java/expo/modules/conversationnotifications/ConnectionService.kt): `apps/mobile/modules/conversation-notifications/android/src/main/java/expo/modules/conversationnotifications/ConnectionService.kt`
- [Host pairing](https://github.com/botharness/deepseekbot/tree/main/apps/mobile/app/pair): `apps/mobile/app/pair`
- [Preferences and storage](https://github.com/botharness/deepseekbot/blob/main/apps/mobile/src/ui/storage-settings.tsx): `apps/mobile/src/ui/storage-settings.tsx`

### Integrations and distribution

- [Chat services](https://github.com/botharness/deepseekbot/tree/main/packages/core/src): `packages/core/src`
- [Bot marketplace](https://github.com/botharness/deepseekbot/blob/main/packages/market/src/worker.ts): `packages/market/src/worker.ts`
- [Cloud teams](https://github.com/botharness/deepseekbot/tree/main/apps/mobile/src/cloud): `apps/mobile/src/cloud`

### Other components

- **User**
- **DeepSeek Harness**

## Connections

- User → Mobile app routes: uses (evidence: `README.md`)
- Mobile app routes → Host session: connects through (evidence: `apps/mobile/app/settings/storage.tsx`)
- Host session → Host client: uses (evidence: `apps/mobile/src/host/host-session.ts`)
- Host client → DeepSeek Harness: connects to
- User → Bot creation: creates (evidence: `README.md`)
- Bot creation → Bot identity: configures
- User → Conversations: chats with (evidence: `README.md`)
- User → Group collaboration: delegates in (evidence: `README.md`)
- Conversations → Bot memory: uses persistent memory (evidence: `README.md`)
- User → Scheduled routines: schedules (evidence: `README.md`)
- User → Approvals: reviews (evidence: `README.md`)
- User → Computer and browser: authorizes (evidence: `README.md`)
- Host session → Conversation cache: loads conversations (evidence: `apps/mobile/src/host/host-session.ts`)
- Host session → Notifications: coordinates
- User → Host pairing: pairs device (evidence: `README.md`)
- User → Preferences and storage: manages preferences (evidence: `README.md`)
- User → Chat services: connects bots (evidence: `README.md`)
- User → Bot marketplace: browses and installs (evidence: `README.md`)
- User → Cloud teams: manages teams
