# copilotkit/openfuse architecture

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

- Interactive diagram: https://gitdiagram.com/copilotkit/openfuse
- Repository: https://github.com/copilotkit/openfuse

## Overview

OpenFuse is a personal-agent app: users submit requests in the mobile chat, the server runs agent work and computer tools, and results appear as reviewable activity and rich artifacts. Major branches also cover goals and page monitoring, mail/calendar and Google integration, documents/PDFs, finance, and the persistent browser and optional Linux workspace. The excerpts show key server orchestration and computer routes; other subsystem links are included only where the README or source index supports them.

Main entry points: [`apps/server/src/engine/service.ts`](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/service.ts) (Agent service), [`apps/server/src/app.ts`](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/app.ts) (HTTP API), [`apps/mobile/App.tsx`](https://github.com/copilotkit/openfuse/blob/main/apps/mobile/App.tsx) (Mobile app), [`apps/server/src/computer-routes.ts`](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/computer-routes.ts) (Computer routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile experience"]
  node_mobile["Mobile app<br/>[App.tsx]"]
  node_chat["Chat and results<br/>[chat.tsx]"]
  node_screens["Workspace screens<br/>[screens.tsx]"]
  node_mobile_api["API client<br/>[api.ts]"]
end

subgraph group_server["API and orchestration"]
  node_api["HTTP API<br/>[app.ts]"]
  node_auth["Session auth<br/>[auth.ts]"]
  node_actions["Action approvals<br/>[actions.ts]"]
  node_db[("Durable store<br/>[db.ts]")]
end

subgraph group_agent["Agent work"]
  node_agent_routes["Agent routes<br/>[routes.ts]"]
  node_agent_service["Agent service<br/>[service.ts]"]
  node_task_worker["Task worker<br/>[worker.ts]"]
  node_model["Model execution<br/>[model.ts]"]
  node_domain["Agent contracts<br/>[agent.ts]"]
  node_finance["Finance tasks<br/>[finance.ts]"]
end

subgraph group_computer["Agent computer"]
  node_browser["Browser sessions<br/>[browser.ts]"]
  node_browser_worker["Browser worker<br/>[browser.ts]"]
  node_computer["Computer service<br/>[computer.ts]"]
  node_computer_routes["Computer routes<br/>[computer-routes.ts]"]
end

subgraph group_personal["Personal services"]
  node_files["Files and PDFs<br/>[files.ts]"]
  node_pdf["PDF integration<br/>[pdf.ts]"]
  node_workspace["Mail and calendar<br/>[workspace.ts]"]
  node_google["Google integration<br/>[google.ts]"]
  node_jev["Jev experience<br/>[service.ts]"]
  node_search["Mailbox search<br/>[search.ts]"]
end

node_user(("User"))

node_user -->|"uses"| node_mobile
node_mobile -->|"shows"| node_chat
node_mobile -->|"shows"| node_screens
node_chat -.->|"requests"| node_mobile_api
node_mobile_api -.->|"calls"| node_api
node_api -->|"configures"| node_auth
node_api -->|"calls"| node_actions
node_api -->|"creates"| node_files
node_api -->|"creates"| node_workspace
node_api -->|"routes to"| node_agent_routes
node_api -->|"routes to"| node_computer_routes
node_agent_routes -->|"calls"| node_agent_service
node_agent_service -->|"starts"| node_task_worker
node_agent_service -->|"executes via"| node_model
node_agent_service -->|"persists"| node_db
node_agent_service -->|"uses"| node_search
node_agent_service -->|"uses"| node_browser
node_agent_service -->|"uses"| node_computer
node_computer_routes -->|"calls"| node_computer
node_computer_routes -->|"transfers PDFs"| node_files
node_browser -.->|"uses"| node_browser_worker
node_files -->|"inspects and fills"| node_pdf
node_workspace -->|"uses"| node_google
node_jev -->|"persists"| node_db
node_agent_service -->|"uses"| node_finance
node_agent_service -->|"uses types"| node_domain

click node_mobile "https://github.com/copilotkit/openfuse/blob/main/apps/mobile/App.tsx"
click node_chat "https://github.com/copilotkit/openfuse/blob/main/apps/mobile/src/chat.tsx"
click node_screens "https://github.com/copilotkit/openfuse/blob/main/apps/mobile/src/screens.tsx"
click node_mobile_api "https://github.com/copilotkit/openfuse/blob/main/apps/mobile/src/api.ts"
click node_api "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/app.ts"
click node_auth "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/auth.ts"
click node_actions "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/actions.ts"
click node_db "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/db.ts"
click node_agent_routes "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/routes.ts"
click node_agent_service "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/service.ts"
click node_task_worker "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/worker.ts"
click node_model "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/model.ts"
click node_domain "https://github.com/copilotkit/openfuse/blob/main/packages/domain/src/agent.ts"
click node_browser "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/browser.ts"
click node_browser_worker "https://github.com/copilotkit/openfuse/blob/main/apps/worker/src/browser.ts"
click node_computer "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/computer.ts"
click node_computer_routes "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/computer-routes.ts"
click node_files "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/files.ts"
click node_pdf "https://github.com/copilotkit/openfuse/blob/main/packages/integrations/src/pdf.ts"
click node_workspace "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/workspace.ts"
click node_google "https://github.com/copilotkit/openfuse/blob/main/packages/integrations/src/google.ts"
click node_jev "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/jev/service.ts"
click node_finance "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/finance.ts"
click node_search "https://github.com/copilotkit/openfuse/blob/main/apps/server/src/search.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_mobile,node_chat,node_screens,node_mobile_api,node_user toneBlue
class node_api,node_auth,node_actions,node_db toneAmber
class node_agent_routes,node_agent_service,node_task_worker,node_model,node_domain,node_finance toneMint
class node_browser,node_browser_worker,node_computer,node_computer_routes toneRose
class node_files,node_pdf,node_workspace,node_google,node_jev,node_search toneIndigo
```

## Components

### Mobile experience

- [Mobile app](https://github.com/copilotkit/openfuse/blob/main/apps/mobile/App.tsx): `apps/mobile/App.tsx`
- [Chat and results](https://github.com/copilotkit/openfuse/blob/main/apps/mobile/src/chat.tsx): `apps/mobile/src/chat.tsx`
- [Workspace screens](https://github.com/copilotkit/openfuse/blob/main/apps/mobile/src/screens.tsx): `apps/mobile/src/screens.tsx`
- [API client](https://github.com/copilotkit/openfuse/blob/main/apps/mobile/src/api.ts): `apps/mobile/src/api.ts`

### API and orchestration

- [HTTP API](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/app.ts): `apps/server/src/app.ts`
- [Session auth](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/auth.ts): `apps/server/src/auth.ts`
- [Action approvals](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/actions.ts): `apps/server/src/actions.ts`
- [Durable store](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/db.ts): `apps/server/src/db.ts`

### Agent work

- [Agent routes](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/routes.ts): `apps/server/src/engine/routes.ts`
- [Agent service](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/service.ts): `apps/server/src/engine/service.ts`
- [Task worker](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/worker.ts): `apps/server/src/engine/worker.ts`
- [Model execution](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/model.ts): `apps/server/src/engine/model.ts`
- [Agent contracts](https://github.com/copilotkit/openfuse/blob/main/packages/domain/src/agent.ts): `packages/domain/src/agent.ts`
- [Finance tasks](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/engine/finance.ts): `apps/server/src/engine/finance.ts`

### Agent computer

- [Browser sessions](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/browser.ts): `apps/server/src/browser.ts`
- [Browser worker](https://github.com/copilotkit/openfuse/blob/main/apps/worker/src/browser.ts): `apps/worker/src/browser.ts`
- [Computer service](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/computer.ts): `apps/server/src/computer.ts`
- [Computer routes](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/computer-routes.ts): `apps/server/src/computer-routes.ts`

### Personal services

- [Files and PDFs](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/files.ts): `apps/server/src/files.ts`
- [PDF integration](https://github.com/copilotkit/openfuse/blob/main/packages/integrations/src/pdf.ts): `packages/integrations/src/pdf.ts`
- [Mail and calendar](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/workspace.ts): `apps/server/src/workspace.ts`
- [Google integration](https://github.com/copilotkit/openfuse/blob/main/packages/integrations/src/google.ts): `packages/integrations/src/google.ts`
- [Jev experience](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/jev/service.ts): `apps/server/src/jev/service.ts`
- [Mailbox search](https://github.com/copilotkit/openfuse/blob/main/apps/server/src/search.ts): `apps/server/src/search.ts`

### Other components

- **User**

## Connections

- User → Mobile app: uses (evidence: `README.md`)
- Mobile app → Chat and results: shows (evidence: `apps/mobile/App.tsx`)
- Mobile app → Workspace screens: shows (evidence: `apps/mobile/App.tsx`)
- Chat and results → API client: requests
- API client → HTTP API: calls
- HTTP API → Session auth: configures (evidence: `apps/server/src/app.ts`)
- HTTP API → Action approvals: calls (evidence: `apps/server/src/app.ts`)
- HTTP API → Files and PDFs: creates (evidence: `apps/server/src/app.ts`)
- HTTP API → Mail and calendar: creates (evidence: `apps/server/src/app.ts`)
- HTTP API → Agent routes: routes to (evidence: `apps/server/src/app.ts`)
- HTTP API → Computer routes: routes to (evidence: `apps/server/src/app.ts`)
- Agent routes → Agent service: calls (evidence: `apps/server/src/engine/routes.ts`)
- Agent service → Task worker: starts (evidence: `apps/server/src/engine/service.ts`)
- Agent service → Model execution: executes via (evidence: `apps/server/src/engine/service.ts`)
- Agent service → Durable store: persists (evidence: `apps/server/src/engine/service.ts`)
- Agent service → Mailbox search: uses (evidence: `apps/server/src/engine/service.ts`)
- Agent service → Browser sessions: uses (evidence: `apps/server/src/engine/service.ts`)
- Agent service → Computer service: uses (evidence: `apps/server/src/engine/service.ts`)
- Computer routes → Computer service: calls (evidence: `apps/server/src/computer-routes.ts`)
- Computer routes → Files and PDFs: transfers PDFs (evidence: `apps/server/src/computer-routes.ts`)
- Browser sessions → Browser worker: uses
- Files and PDFs → PDF integration: inspects and fills (evidence: `apps/server/src/files.ts`)
- Mail and calendar → Google integration: uses (evidence: `apps/server/src/workspace.ts`)
- Jev experience → Durable store: persists (evidence: `apps/server/src/jev/service.ts`)
- Agent service → Finance tasks: uses (evidence: `apps/server/src/engine/service.ts`)
- Agent service → Agent contracts: uses types (evidence: `apps/server/src/engine/service.ts`)
