# vibex-ai/vibex architecture

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

- Interactive diagram: https://gitdiagram.com/vibex-ai/vibex
- Repository: https://github.com/vibex-ai/vibex

## Overview

Vibex is a local-first AI coding workbench spanning desktop, terminal, and mobile clients. The main workflow is to configure an Agent and Providers, work in a project, submit tasks to Agent sessions, inspect edits and tool activity, and review changes; sessions can also be monitored remotely. The graph preserves documented capabilities including teams, browser/computer use, previews, gateway routing, remote runtimes, and Relay. Several subsystem links are documented rather than verified from sampled implementation, so those edges cite the README; unsampled internals are represented at their source paths.

Main entry points: [`crates/agent/src/manager.rs`](https://github.com/vibex-ai/vibex/blob/main/crates/agent/src/manager.rs) (Agent runtime), [`apps/desktop/src/main.rs`](https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/main.rs) (Desktop workbench), [`crates/desktop-runtime/src/workbench.rs`](https://github.com/vibex-ai/vibex/blob/main/crates/desktop-runtime/src/workbench.rs) (Workspace workbench), [`crates/vibex-tui/src/app.rs`](https://github.com/vibex-ai/vibex/blob/main/crates/vibex-tui/src/app.rs) (Terminal UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User clients"]
  node_desktop["Desktop workbench<br/>[main.rs]"]
  node_tui["Terminal UI<br/>[app.rs]"]
  node_tuiworker["TUI worker<br/>[worker.rs]"]
  node_mobile["Mobile client<br/>[app.rs]"]
end

subgraph group_agents["Agents and sessions"]
  node_agentruntime["Agent runtime<br/>[manager.rs]"]
  node_acp["ACP adapters<br/>[runtime.rs]"]
  node_teams["Agent teams<br/>[delegation.rs]"]
  node_timeline["Session timeline<br/>[timeline.rs]"]
end

subgraph group_workspace["Workspace tools"]
  node_workbench["Workspace workbench<br/>[workbench.rs]"]
  node_git["Git review<br/>[lib.rs]"]
  node_terminal["Terminal sessions<br/>[lib.rs]"]
  node_browser["Browser tools<br/>[service.rs]"]
  node_computer["Computer use<br/>[service.rs]"]
  node_content["Document previews<br/>[lib.rs]"]
end

subgraph group_services["Runtime services"]
  node_providers["Provider management<br/>[management.rs]"]
  node_routes["Gateway routing UI<br/>[routes.rs]"]
  node_gateway["Model gateway<br/>[service.rs]"]
  node_gatewayhttp["Gateway HTTP API<br/>[server.rs]"]
  node_database[("Durable state<br/>[lib.rs]")]
end

subgraph group_remote["Remote access"]
  node_server["Remote server<br/>[main.rs]"]
  node_remoteclient["Remote client<br/>[backend.rs]"]
  node_pairing["Pairing<br/>[lan_pairing.rs]"]
  node_relay["Optional Relay<br/>[lib.rs]"]
  node_ssh["SSH runtime<br/>[service.rs]"]
end

node_user(("User"))

node_user -->|"uses"| node_desktop
node_user -->|"uses"| node_tui
node_user -->|"uses"| node_mobile
node_desktop -->|"controls"| node_agentruntime
node_tui -->|"dispatches effects"| node_tuiworker
node_tuiworker -.->|"steers sessions"| node_agentruntime
node_agentruntime -->|"runs adapters"| node_acp
node_agentruntime -->|"delegates tasks"| node_teams
node_agentruntime -->|"records activity"| node_timeline
node_desktop -->|"opens workspace"| node_workbench
node_workbench -->|"reviews changes"| node_git
node_workbench -->|"hosts terminal"| node_terminal
node_agentruntime -->|"drives browser"| node_browser
node_agentruntime -->|"controls machine"| node_computer
node_workbench -->|"previews files"| node_content
node_desktop -->|"configures"| node_providers
node_providers -->|"edits routes"| node_routes
node_providers -.->|"stores configuration"| node_database
node_gateway -->|"reads configuration"| node_database
node_gatewayhttp -->|"handles requests"| node_gateway
node_agentruntime -.->|"requests models"| node_gatewayhttp
node_mobile -.->|"connects remotely"| node_remoteclient
node_tui -.->|"attaches remotely"| node_remoteclient
node_remoteclient -.->|"connects to"| node_server
node_user -->|"pairs devices"| node_pairing
node_server -.->|"uses encrypted frames"| node_relay
node_desktop -->|"connects runtimes"| node_ssh

click node_desktop "https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/main.rs"
click node_tui "https://github.com/vibex-ai/vibex/blob/main/crates/vibex-tui/src/app.rs"
click node_tuiworker "https://github.com/vibex-ai/vibex/blob/main/crates/vibex-tui/src/worker.rs"
click node_mobile "https://github.com/vibex-ai/vibex/blob/main/apps/mobile/src/app.rs"
click node_agentruntime "https://github.com/vibex-ai/vibex/blob/main/crates/agent/src/manager.rs"
click node_acp "https://github.com/vibex-ai/vibex/blob/main/crates/agent-acp/src/runtime.rs"
click node_teams "https://github.com/vibex-ai/vibex/blob/main/crates/agent/src/delegation.rs"
click node_timeline "https://github.com/vibex-ai/vibex/blob/main/crates/core/src/timeline.rs"
click node_workbench "https://github.com/vibex-ai/vibex/blob/main/crates/desktop-runtime/src/workbench.rs"
click node_git "https://github.com/vibex-ai/vibex/blob/main/crates/git/src/lib.rs"
click node_terminal "https://github.com/vibex-ai/vibex/blob/main/crates/terminal/src/lib.rs"
click node_browser "https://github.com/vibex-ai/vibex/blob/main/crates/browser/src/service.rs"
click node_computer "https://github.com/vibex-ai/vibex/blob/main/crates/computer/src/service.rs"
click node_content "https://github.com/vibex-ai/vibex/blob/main/crates/content/src/lib.rs"
click node_providers "https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/management.rs"
click node_routes "https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/management/provider_workspace/routes.rs"
click node_gateway "https://github.com/vibex-ai/vibex/blob/main/crates/model-gateway/src/service.rs"
click node_gatewayhttp "https://github.com/vibex-ai/vibex/blob/main/crates/model-gateway/src/server.rs"
click node_database "https://github.com/vibex-ai/vibex/blob/main/crates/db/src/lib.rs"
click node_server "https://github.com/vibex-ai/vibex/blob/main/apps/server/src/main.rs"
click node_remoteclient "https://github.com/vibex-ai/vibex/blob/main/crates/vibex-remote-client/src/backend.rs"
click node_pairing "https://github.com/vibex-ai/vibex/blob/main/crates/remote/src/lan_pairing.rs"
click node_relay "https://github.com/vibex-ai/vibex/blob/main/crates/relay/src/lib.rs"
click node_ssh "https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/ssh_connection/service.rs"

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_desktop,node_tui,node_tuiworker,node_mobile,node_user toneBlue
class node_agentruntime,node_acp,node_teams,node_timeline toneAmber
class node_workbench,node_git,node_terminal,node_browser,node_computer,node_content toneMint
class node_providers,node_routes,node_gateway,node_gatewayhttp,node_database toneRose
class node_server,node_remoteclient,node_pairing,node_relay,node_ssh toneIndigo
```

## Components

### User clients

- [Desktop workbench](https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/main.rs): `apps/desktop/src/main.rs`
- [Terminal UI](https://github.com/vibex-ai/vibex/blob/main/crates/vibex-tui/src/app.rs): `crates/vibex-tui/src/app.rs`
- [TUI worker](https://github.com/vibex-ai/vibex/blob/main/crates/vibex-tui/src/worker.rs): `crates/vibex-tui/src/worker.rs`
- [Mobile client](https://github.com/vibex-ai/vibex/blob/main/apps/mobile/src/app.rs): `apps/mobile/src/app.rs`

### Agents and sessions

- [Agent runtime](https://github.com/vibex-ai/vibex/blob/main/crates/agent/src/manager.rs): `crates/agent/src/manager.rs`
- [ACP adapters](https://github.com/vibex-ai/vibex/blob/main/crates/agent-acp/src/runtime.rs): `crates/agent-acp/src/runtime.rs`
- [Agent teams](https://github.com/vibex-ai/vibex/blob/main/crates/agent/src/delegation.rs): `crates/agent/src/delegation.rs`
- [Session timeline](https://github.com/vibex-ai/vibex/blob/main/crates/core/src/timeline.rs): `crates/core/src/timeline.rs`

### Workspace tools

- [Workspace workbench](https://github.com/vibex-ai/vibex/blob/main/crates/desktop-runtime/src/workbench.rs): `crates/desktop-runtime/src/workbench.rs`
- [Git review](https://github.com/vibex-ai/vibex/blob/main/crates/git/src/lib.rs): `crates/git/src/lib.rs`
- [Terminal sessions](https://github.com/vibex-ai/vibex/blob/main/crates/terminal/src/lib.rs): `crates/terminal/src/lib.rs`
- [Browser tools](https://github.com/vibex-ai/vibex/blob/main/crates/browser/src/service.rs): `crates/browser/src/service.rs`
- [Computer use](https://github.com/vibex-ai/vibex/blob/main/crates/computer/src/service.rs): `crates/computer/src/service.rs`
- [Document previews](https://github.com/vibex-ai/vibex/blob/main/crates/content/src/lib.rs): `crates/content/src/lib.rs`

### Runtime services

- [Provider management](https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/management.rs): `apps/desktop/src/management.rs`
- [Gateway routing UI](https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/management/provider_workspace/routes.rs): `apps/desktop/src/management/provider_workspace/routes.rs`
- [Model gateway](https://github.com/vibex-ai/vibex/blob/main/crates/model-gateway/src/service.rs): `crates/model-gateway/src/service.rs`
- [Gateway HTTP API](https://github.com/vibex-ai/vibex/blob/main/crates/model-gateway/src/server.rs): `crates/model-gateway/src/server.rs`
- [Durable state](https://github.com/vibex-ai/vibex/blob/main/crates/db/src/lib.rs): `crates/db/src/lib.rs`

### Remote access

- [Remote server](https://github.com/vibex-ai/vibex/blob/main/apps/server/src/main.rs): `apps/server/src/main.rs`
- [Remote client](https://github.com/vibex-ai/vibex/blob/main/crates/vibex-remote-client/src/backend.rs): `crates/vibex-remote-client/src/backend.rs`
- [Pairing](https://github.com/vibex-ai/vibex/blob/main/crates/remote/src/lan_pairing.rs): `crates/remote/src/lan_pairing.rs`
- [Optional Relay](https://github.com/vibex-ai/vibex/blob/main/crates/relay/src/lib.rs): `crates/relay/src/lib.rs`
- [SSH runtime](https://github.com/vibex-ai/vibex/blob/main/apps/desktop/src/ssh_connection/service.rs): `apps/desktop/src/ssh_connection/service.rs`

### Other components

- **User**

## Connections

- User → Desktop workbench: uses (evidence: `README.md`)
- User → Terminal UI: uses (evidence: `README.md`)
- User → Mobile client: uses (evidence: `README.md`)
- Desktop workbench → Agent runtime: controls (evidence: `README.md`)
- Terminal UI → TUI worker: dispatches effects (evidence: `crates/vibex-tui/src/app.rs`)
- TUI worker → Agent runtime: steers sessions
- Agent runtime → ACP adapters: runs adapters (evidence: `README.md`)
- Agent runtime → Agent teams: delegates tasks (evidence: `README.md`)
- Agent runtime → Session timeline: records activity (evidence: `README.md`)
- Desktop workbench → Workspace workbench: opens workspace (evidence: `README.md`)
- Workspace workbench → Git review: reviews changes (evidence: `README.md`)
- Workspace workbench → Terminal sessions: hosts terminal (evidence: `README.md`)
- Agent runtime → Browser tools: drives browser (evidence: `README.md`)
- Agent runtime → Computer use: controls machine (evidence: `README.md`)
- Workspace workbench → Document previews: previews files (evidence: `README.md`)
- Desktop workbench → Provider management: configures (evidence: `README.md`)
- Provider management → Gateway routing UI: edits routes (evidence: `apps/desktop/src/management/provider_workspace/routes.rs`)
- Provider management → Durable state: stores configuration
- Model gateway → Durable state: reads configuration (evidence: `crates/model-gateway/src/service.rs`)
- Gateway HTTP API → Model gateway: handles requests (evidence: `crates/model-gateway/src/server.rs`)
- Agent runtime → Gateway HTTP API: requests models
- Mobile client → Remote client: connects remotely
- Terminal UI → Remote client: attaches remotely
- Remote client → Remote server: connects to
- User → Pairing: pairs devices (evidence: `README.md`)
- Remote server → Optional Relay: uses encrypted frames
- Desktop workbench → SSH runtime: connects runtimes (evidence: `README.md`)
