# suman724/remote-browser-use architecture

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

- Interactive diagram: https://gitdiagram.com/suman724/remote-browser-use
- Repository: https://github.com/suman724/remote-browser-use

## Overview

Muse is a desktop browser-control workspace backed by a FastAPI service. The main workflow is a user starting or attaching to a session, then viewing browser frames and session updates while taking control or allowing an agent to act through browser tools. The backend owns session orchestration, browser access, lease and approval handling, and session history/settings persistence. The source index and excerpts support the main internal links; the renderer-to-backend connection is shown as unverified because the excerpts do not establish its route wiring.

Main entry points: [`backend/muse_backend/session.py`](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/session.py) (Session manager), [`backend/muse_backend/main.py`](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/main.py) (Service lifecycle), [`app/src/renderer/src/App.tsx`](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/App.tsx) (Workspace shell), [`app/src/renderer/src/lib/client.ts`](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/lib/client.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop workspace"]
  node_app["Workspace shell<br/>[App.tsx]"]
  node_browser_stage["Browser view<br/>[BrowserStage.tsx]"]
  node_run_rail["Run controls<br/>[RunRail.tsx]"]
  node_history_view["History view<br/>[HistoryView.tsx]"]
  node_settings_view["Settings drawer<br/>[SettingsDrawer.tsx]"]
  node_client["API client<br/>[client.ts]"]
  node_ui_state["UI session state<br/>[state.ts]"]
  node_ui_protocol["Wire protocol<br/>[protocol.ts]"]
end

subgraph group_service["Backend service"]
  node_backend_api["REST routes<br/>[routes.py]"]
  node_websocket_api["WebSocket API<br/>[ws.py]"]
  node_app_factory["Service lifecycle<br/>[main.py]"]
  node_sdk["Python tools client<br/>[client.py]"]
end

subgraph group_automation["Browser automation"]
  node_tools["Browser tools<br/>[tools.py]"]
  node_driver["Demo driver<br/>[driver.py]"]
  node_bridge["Browser bridge<br/>[bridge.py]"]
  node_provider["Browser provider<br/>[provider.py]"]
  node_snapshot["Page snapshots<br/>[snapshot.py]"]
end

subgraph group_state["Session state and safety"]
  node_sessions["Session manager<br/>[session.py]"]
  node_lease["Control lease<br/>[lease.py]"]
  node_risk["Risk checks<br/>[risk.py]"]
  node_settings_store[("User settings<br/>[user_settings.py]")]
  node_history_store[("Profiles and history<br/>[profile.py]")]
  node_recorder[("Event recorder<br/>[recorder.py]")]
end

node_user(("User"))
node_browser_service["Steel Chromium service"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_browser_stage
node_app -->|"renders"| node_run_rail
node_app -->|"renders"| node_history_view
node_app -->|"renders"| node_settings_view
node_app -->|"calls"| node_client
node_app -->|"dispatches"| node_ui_state
node_browser_stage -->|"reads"| node_ui_state
node_run_rail -->|"reads"| node_ui_state
node_history_view -->|"requests history"| node_client
node_settings_view -->|"saves settings"| node_client
node_client -->|"decodes frames"| node_ui_protocol
node_ui_state -->|"handles messages"| node_ui_protocol
node_client -.->|"calls over HTTP"| node_backend_api
node_client -.->|"connects over WebSocket"| node_websocket_api
node_app_factory -->|"registers routes"| node_backend_api
node_app_factory -->|"registers routes"| node_websocket_api
node_app_factory -->|"creates manager"| node_sessions
node_app_factory -->|"configures"| node_provider
node_app_factory -->|"starts"| node_history_store
node_app_factory -->|"creates"| node_recorder
node_app_factory -->|"loads"| node_settings_store
node_backend_api -->|"serves session requests"| node_sessions
node_backend_api -->|"lists tools"| node_tools
node_backend_api -->|"updates settings"| node_settings_store
node_websocket_api -.->|"routes client messages"| node_sessions
node_sessions -->|"checks control"| node_lease
node_sessions -->|"runs tool calls"| node_tools
node_sessions -->|"controls browser"| node_bridge
node_sessions -->|"creates browser session"| node_provider
node_sessions -->|"observes page"| node_snapshot
node_sessions -->|"runs demo"| node_driver
node_sessions -.->|"checks actions"| node_risk
node_sessions -.->|"records events"| node_recorder
node_tools -->|"acts through"| node_bridge
node_provider -->|"creates sessions"| node_browser_service
node_sdk -.->|"calls API"| node_backend_api

click node_app "https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/App.tsx"
click node_browser_stage "https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/components/BrowserStage.tsx"
click node_run_rail "https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/components/RunRail.tsx"
click node_history_view "https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/components/HistoryView.tsx"
click node_settings_view "https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/components/SettingsDrawer.tsx"
click node_client "https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/lib/client.ts"
click node_ui_state "https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/state.ts"
click node_ui_protocol "https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/lib/protocol.ts"
click node_backend_api "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/api/routes.py"
click node_websocket_api "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/api/ws.py"
click node_app_factory "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/main.py"
click node_sessions "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/session.py"
click node_lease "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/lease.py"
click node_risk "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/risk.py"
click node_settings_store "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/user_settings.py"
click node_history_store "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/profile.py"
click node_recorder "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/recorder.py"
click node_tools "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/tools.py"
click node_driver "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/driver.py"
click node_bridge "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/browser/bridge.py"
click node_provider "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/browser/provider.py"
click node_snapshot "https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/browser/snapshot.py"
click node_sdk "https://github.com/suman724/remote-browser-use/blob/main/sdk/python/muse_tools/client.py"

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_app,node_browser_stage,node_run_rail,node_history_view,node_settings_view,node_client,node_ui_state,node_ui_protocol,node_user toneBlue
class node_backend_api,node_websocket_api,node_app_factory,node_sdk toneAmber
class node_tools,node_driver,node_bridge,node_provider,node_snapshot toneMint
class node_sessions,node_lease,node_risk,node_settings_store,node_history_store,node_recorder toneRose
class node_browser_service toneIndigo
```

## Components

### Desktop workspace

- [Workspace shell](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/App.tsx): `app/src/renderer/src/App.tsx`
- [Browser view](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/components/BrowserStage.tsx): `app/src/renderer/src/components/BrowserStage.tsx`
- [Run controls](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/components/RunRail.tsx): `app/src/renderer/src/components/RunRail.tsx`
- [History view](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/components/HistoryView.tsx): `app/src/renderer/src/components/HistoryView.tsx`
- [Settings drawer](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/components/SettingsDrawer.tsx): `app/src/renderer/src/components/SettingsDrawer.tsx`
- [API client](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/lib/client.ts): `app/src/renderer/src/lib/client.ts`
- [UI session state](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/state.ts): `app/src/renderer/src/state.ts`
- [Wire protocol](https://github.com/suman724/remote-browser-use/blob/main/app/src/renderer/src/lib/protocol.ts): `app/src/renderer/src/lib/protocol.ts`

### Backend service

- [REST routes](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/api/routes.py): `backend/muse_backend/api/routes.py`
- [WebSocket API](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/api/ws.py): `backend/muse_backend/api/ws.py`
- [Service lifecycle](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/main.py): `backend/muse_backend/main.py`
- [Python tools client](https://github.com/suman724/remote-browser-use/blob/main/sdk/python/muse_tools/client.py): `sdk/python/muse_tools/client.py`

### Browser automation

- [Browser tools](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/tools.py): `backend/muse_backend/tools.py`
- [Demo driver](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/driver.py): `backend/muse_backend/driver.py`
- [Browser bridge](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/browser/bridge.py): `backend/muse_backend/browser/bridge.py`
- [Browser provider](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/browser/provider.py): `backend/muse_backend/browser/provider.py`
- [Page snapshots](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/browser/snapshot.py): `backend/muse_backend/browser/snapshot.py`

### Session state and safety

- [Session manager](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/session.py): `backend/muse_backend/session.py`
- [Control lease](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/lease.py): `backend/muse_backend/lease.py`
- [Risk checks](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/risk.py): `backend/muse_backend/risk.py`
- [User settings](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/user_settings.py): `backend/muse_backend/user_settings.py`
- [Profiles and history](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/profile.py): `backend/muse_backend/profile.py`
- [Event recorder](https://github.com/suman724/remote-browser-use/blob/main/backend/muse_backend/recorder.py): `backend/muse_backend/recorder.py`

### Other components

- **User**
- **Steel Chromium service**

## Connections

- User → Workspace shell: uses (evidence: `app/src/renderer/src/App.tsx`)
- Workspace shell → Browser view: renders (evidence: `app/src/renderer/src/App.tsx`)
- Workspace shell → Run controls: renders (evidence: `app/src/renderer/src/App.tsx`)
- Workspace shell → History view: renders (evidence: `app/src/renderer/src/App.tsx`)
- Workspace shell → Settings drawer: renders (evidence: `app/src/renderer/src/App.tsx`)
- Workspace shell → API client: calls (evidence: `app/src/renderer/src/App.tsx`)
- Workspace shell → UI session state: dispatches (evidence: `app/src/renderer/src/App.tsx`)
- Browser view → UI session state: reads (evidence: `app/src/renderer/src/components/BrowserStage.tsx`)
- Run controls → UI session state: reads (evidence: `app/src/renderer/src/components/RunRail.tsx`)
- History view → API client: requests history (evidence: `app/src/renderer/src/components/HistoryView.tsx`)
- Settings drawer → API client: saves settings (evidence: `app/src/renderer/src/components/SettingsDrawer.tsx`)
- API client → Wire protocol: decodes frames (evidence: `app/src/renderer/src/lib/client.ts`)
- UI session state → Wire protocol: handles messages (evidence: `app/src/renderer/src/state.ts`)
- API client → REST routes: calls over HTTP
- API client → WebSocket API: connects over WebSocket
- Service lifecycle → REST routes: registers routes (evidence: `backend/muse_backend/main.py`)
- Service lifecycle → WebSocket API: registers routes (evidence: `backend/muse_backend/main.py`)
- Service lifecycle → Session manager: creates manager (evidence: `backend/muse_backend/main.py`)
- Service lifecycle → Browser provider: configures (evidence: `backend/muse_backend/main.py`)
- Service lifecycle → Profiles and history: starts (evidence: `backend/muse_backend/main.py`)
- Service lifecycle → Event recorder: creates (evidence: `backend/muse_backend/main.py`)
- Service lifecycle → User settings: loads (evidence: `backend/muse_backend/main.py`)
- REST routes → Session manager: serves session requests (evidence: `backend/muse_backend/api/routes.py`)
- REST routes → Browser tools: lists tools (evidence: `backend/muse_backend/api/routes.py`)
- REST routes → User settings: updates settings (evidence: `backend/muse_backend/api/routes.py`)
- WebSocket API → Session manager: routes client messages
- Session manager → Control lease: checks control (evidence: `backend/muse_backend/session.py`)
- Session manager → Browser tools: runs tool calls (evidence: `backend/muse_backend/session.py`)
- Session manager → Browser bridge: controls browser (evidence: `backend/muse_backend/session.py`)
- Session manager → Browser provider: creates browser session (evidence: `backend/muse_backend/session.py`)
- Session manager → Page snapshots: observes page (evidence: `backend/muse_backend/session.py`)
- Session manager → Demo driver: runs demo (evidence: `backend/muse_backend/session.py`)
- Session manager → Risk checks: checks actions (evidence: `backend/muse_backend/session.py`)
- Session manager → Event recorder: records events (evidence: `backend/muse_backend/session.py`)
- Browser tools → Browser bridge: acts through (evidence: `backend/muse_backend/tools.py`)
- Browser provider → Steel Chromium service: creates sessions (evidence: `backend/muse_backend/browser/provider.py`)
- Python tools client → REST routes: calls API
