Dimo is an all-in-one Agent-Native Development Platform & Vibe Coding Toolkit built on a Rust workspace backend and a React 19 + TypeScript frontend. A single Rust execution core (Dimo Host, dimo-server) powers the Electron desktop app (electron/ spawning dimo-server --desktop), standalone headless daemon (dimo-server), browser WebUI, remote desktop workstations (SSH / LAN / E2EE WebRTC), native iOS & Android companions, and bidirectional IM channels.
For domain terminology, read CONTEXT.md. For the complete documentation map, read docs/INDEX.md. For permanent architectural decisions, see docs/adr/.
Only one Dimo Host owns a Dimo SQLite data directory at a time (ADR-0033, ADR-0054, ADR-0078, ADR-0090). Every agent process, Git worktree, PTY terminal, Pulse rule, DAG workflow, automation scheduler, plugin worker, and IM channel runs on the Host — clients render projections and issue typed commands over a unified seam.
flowchart TB
subgraph Clients["Client Surfaces"]
DesktopUI["Electron Desktop Shell\\n(ElectronTransport + DesktopShellBridge)"]
WebUI["Browser WebUI :17891\\n(WebTransport)"]
Workstation["Remote Desktop Workstation\\n(RemoteDesktopTransport: HTTPS/WS + WebRTC E2EE)"]
Mobile["Native iOS & Android Companions\\n(Remote Protocol v1)"]
IM["Chat Channels\\n(Telegram / Feishu / WeCom / Weixin iLink / QQ / Webhook)"]
end
subgraph Seam["Single-Seam Host Boundary (ADR-0078 / ADR-0090)"]
Registry["HostCommandRegistry\\nTyped Commands + Derived Capabilities"]
EventBus["HostEventBus\\nDurable Sequence Replay + Live Stream"]
end
subgraph Core["Rust Application Core (HostRuntime / dimo-server)"]
Agents["crates/agents\\nDedicated Native Agent Engines (Primary)\\n+ ACP v1/v2 Fallback (20 Built-in + Registry)"]
Conv["crates/conversations\\nSQLite Single-Authority Projections\\n+ Turn Control + Cross-Agent Handoff"]
Collab["crates/delegation + crates/dimo-mcp\\nCollaboration Space + &Agent Delegation"]
Flow["crates/pulse + crates/workflows + crates/automation\\nEvent Engine + Dual-Primitive DAGs + Lease Scheduler"]
Plug["crates/plugins + crates/artifacts + crates/browser-host\\nPlugin Kernel v4 + Full-Trust Workers + Browser Bridge"]
GitSvc["crates/git + crates/services\\nGit Worktrees + PTY + File Ranking + Diffs"]
DB["crates/db\\nSQLite WritePool(1) / ReadPool(4) + CommitVisibilityFence"]
end
DesktopUI --> Registry
WebUI --> Registry
Workstation --> Registry
Mobile --> Registry
IM --> Conv
Registry --> Core
Core --> EventBus
EventBus --> DesktopUI
EventBus --> WebUI
EventBus --> Workstation
EventBus --> Mobile
HostRuntime&ApplicationCore(crates/application,crates/deployment,crates/local-deployment): Transport-agnostic composition of all domain services.crates/serveradapts authentication, HTTP/WebSocket framing, and desktop sidecar lifecycle (--desktop) ontoHostRuntime.- Electron Thin Desktop Shell (
electron/, ADR-0090): Spawnsdimo-server --desktopon127.0.0.1:0with a per-launch Bearer token passed via env/stdin,dimo-server-readystdout handshake, PID watchdog / Windows Job Object orphan protection, and loopback-only/api/v1/desktop/*lifecycle routes. Serves production UI ondimo-app://localhostand allowlisted local files ondimo-asset://. Embedded browser tabs use Electron<webview>bridged tocrates/browser-hostviaElectronNativeTabsWebSocket JSON-RPC. HostCommandRegistry&HostEventBus(ADR-0078): Every product command is registered once inHostCommandRegistry(shared/hostCommands.tsmirrors the contract on the frontend), and/api/v1/capabilitiesderives directly from it. Native desktop-shell operations (OS dialogs, window controls, clipboard, allowlisted FS, deep links, auto-updater) live inDesktopShellBridge(electron/src/preload/). All push updates (conversation row-ops, workspace diffs, terminal streams, workflow progress, Pulse events) flow throughHostEventBus.- Frontend
BackendTransport(frontend/src/lib/transport/): React components and hooks stay transport-agnostic. At bootstrap, the window binds to a singleServerProfile(ADR-0059) and instantiates:ElectronTransportfor the local Desktop Host (dimo-server --desktop, with automatic snapshot resync on WSLaggedgaps);WebTransportfor browser WebUI (dimo serve);RemoteDesktopTransportfor paired remote Hosts over LAN/SSH/Tailscale HTTPS+WS or NAT-traversing E2EE WebRTC DataChannels (dimo-webrtc://).
Dimo pairs two synchronized workspaces over the same live conversation, file, terminal, and preview state:
- Dockview IDE Stage (ADR-0042, ADR-0068): Conversations are first-class Dockview tabs alongside CodeMirror/Monaco editors, 3-pane Git merge & diff views, multi-tab PTY + agent terminals, embedded Electron
<webview>preview tabs, and plugin App surfaces. Opening a project defaults to its Project-root workspace (use_worktree: false). - Infinite Spatial Canvas Stage (
@xyflow/react): One-click toggle (Alt+Shift+C) projects up to 24 live interactive windows onto a pan-and-zoom 2D canvas with 8-direction resize, smart snap guides, radial quick-create menu, minimap, and viewport persistence. Closing or rearranging panels only alters layout — in-flight turns continue uninterrupted on the Host.
Visual styling follows DESIGN.md (macOS Tahoe two-layer model with opaque Astryx surfaces, tokenized CSS variables in frontend/src/styles/legacy/index.css).
All coding agents execute through crates/agents (AgentRuntime) under a two-tier integration policy (Dedicated Agent Engine First, ACP Secondary; ADR-0087, ADR-0010, ADR-0035, ADR-0060, docs/specs/agent-driver-engine.md):
- Tier 1 — Dedicated Agent Engine Adapters (Primary): Core Coding Agents bind directly to their official SDKs, native protocols (such as
app-serverJSON-RPC andclaude-native-driver.mjs), and native session/config/auth state. Dedicated engines preserve first-party control-plane fidelity (exact token & Prompt Cache TTL accounting, rate-limit reset timestamps, native steering, coordinated session/git rewind, subagent streams, and native status/quota visibility) and take precedence over generic ACP advertisements. - Tier 2 — ACP Compatibility Pipeline (Secondary Fallback): Built-in profiles without a dedicated native engine driver, dynamic entries from the ACP Official Registry, and user-declared
npx/uvx/binary distributions run through the shared Agent Client Protocol (ACP v1 baseline + v2 negotiated capabilities) pipeline. - 20 Built-in Agent Profiles (
BuiltInProfileCatalog::bundled()incrates/agents/src/profiles/mod.rs): Claude Code, Codex, Pi, OpenCode, Grok, Cursor, DeepSeek Harness, Google Antigravity, Cline, OpenClaw, Hermes, CodeBuddy, Kimi Code, Qoder, Kiro CLI, Auggie, TRAE CLI, Command Code, ZCode, and OMP. - User-Environment Installation: Agents install into and resolve from the user's own environment (
PATH, npm global prefix,uv tool,~/.local/bin), recorded via verifiableInstallationLockentries. - Unified Auth & Provider Presets (ADR-0063, ADR-0064, ADR-0085, ADR-0088): Each profile declares supported auth modes (
Official Subscription,Official API, orModel Provider Preset). Built-in provider presets live in the Host; plugins may append catalog templates. Secrets stay in Rust/native config files and never echo to the frontend. - Role of
crates/executors: Frozen to (1)ScriptRequestexecution for setup/cleanup/dev-server shell scripts, (2)BaseCodingAgent/ExecutorConfigprofile schemas, and (3) sharedNormalizedEntrylog structures. Coding agents never run throughcrates/executors.
Conversations persist both control-plane state and user-visible timeline projections in SQLite (ADR-0044, ADR-0089, ADR-0091):
- SQLite Dual-Pool Concurrency (
crates/db): Single-connectionWritePool(1)serializesBEGIN IMMEDIATEtransactions with zero write contention; concurrentReadPool(4)(read_only(true)+PRAGMA query_only = ON) serves readers without blocking;CommitVisibilityFenceguarantees post-commit WAL visibility for write-then-read sequences. - Single-Authority Event & Timeline Projection (
crates/conversations): Substantive streaming deltas persist intoconversation_eventsviaStreamingThrottleCoalescer(400ms Markdown boundary / 800ms idle / 64 KiB cap / non-delta barrier) andBatchConversationEvent(<= 64events,<= 1 MiB), updatingconversation_timeline_rowsincrementally viaDirtyRowMapand indexing row-levelconversation_fts. Legacy.jsonltranscripts backfill once viabackfill.rs(sessions.legacy_jsonl_migrated) andsession/loadreplay probes read SQLite directly. - Durable Control Plane: Tracks revisioned drafts, ordered queued inputs, delayed inputs, in-flight Turn Steering, interactive permission/question prompts, atomic checkpoint rewind, Session Fork (ADR-0005), and deterministic startup recovery (
Completed | Failed | Cancelled | Interrupted). - Cross-Agent Continuation & Deterministic Handoff (
docs/specs/cross-agent-continuation.md):conversation_agent_bindingstracks per-continuation_key(agent_id|provider_instance_id|working_dir) resume heads;conversation_handoffstracks durable delivery (planned → sending → delivered | uncertain | cancelled) using zero-LLMDeterministicHandoffServicedelta packing.
Collaboration Space is a built-in Host capability (Settings → General → Collaboration Space, enabled by default):
- Bot (
collaboration_members/member_id): A persistent collaborator identity configured with display name, optional persona/role seed, bound Agent profile, and workspace scope. UI copy labels it 助手 / Bot (memberin Rust/TS identifiers). - Hidden Seat Conversations: Users interact with bots and rooms rather than raw session IDs. Each bot owns a direct thread (
direct:<member_id>,kind: dm) plus one hidden seat conversation per group (space/kind: group), backed by an append-only room log (space_messages) and per-recipientDeliveryReceipttracking (queued → processing → replied | passed | timed_out | cancelled, with derivedfailed/limit_reached).
Typing &Agent in the Composer inserts a structured mention (ADR-0031, ADR-0065). The parent agent invokes delegate_to_agent via dimo-mcp to spin up an audited, bounded child DelegatedConversation, or create_conversation for a persistent peer SpawnedConversation.
- Pulse Event Engine (
crates/pulse,packages/pulse-sdk, ADR-0092,docs/specs/pulse-automation-engine.md): Normalizes GitHub, Jira, Feishu, Custom SDK, andTemporalSource(Cron + one-shot timer +InactivitySlaTracker) events intoEventEnvelope, verified byStandardWebhookGateway(HMAC + replay window + payload cap) and guarded by 3-layer anti-loop protection (actor.isSelf,hopCount,ChainRateBreaker) plusenforce_mandate_origin. Matched rules dispatch toSession,Bot,Group,User, orWorkflowtargets. - Dual-Primitive DAG Workflows (
crates/workflows,crates/dimo-mcp, ADR-0045):*.dimo-workflow.jsonsource artifacts compile and publish into immutableWorkflowDefinitionversions combining ephemeralSessionStepSpec, persistentBotStepSpec(withBotMailboxPolicy),GroupStageStepSpec,UserGateStepSpec,BoundedLoopStepSpec,WaitForEventStepSpec,OutboxActionStepSpec, andConditionBranchStepSpec, supporting incrementalWorkflowGraphPatch, breakpoints,needs_reviewsafety stops, and checkpoint-verified partial reruns (DerivedWorkflowRun). - Scheduled Automations (
crates/automation): Single-owner database lease triggers pinned to a Turn or exact published Workflow version, running in isolated Git worktrees by default with 30-day / 10 GiB retention.
Under Everything is a Plugin (ADR-0046, ADR-0047, ADR-0048, ADR-0069):
- Zero Official Privilege: Official plugins (
plugins/*anddimo-plugin.json) use the exact same public@dimoai/plugin-sdk(^2.0.0), manifest schema, Full-Trust execution model, and 23 contribution kinds (L0Content,L1Descriptor UI,L2Provider Seams,L3Custom Views across host descriptor, Module Federation2.0, and iframe App surface1.0tracks) as third-party authors — enforced in CI bypnpm run plugin:no-privilege. - Single-Layer Extension: Plugins target Host contribution points only; plugins never depend on or expose extension points to other plugins.
- Activation Generations & Dual Activation Semantics: Enabling or updating a plugin atomically publishes an immutable
ActivationGenerationafter verifyingRuntimeInstallationLockprobes. UI & Provider contributions take effect immediately; Agent contributions (Skills, MCP, Hooks) apply cleanly to newly created or rebound sessions.
| Crate / Binary | Responsibility |
|---|---|
crates/server (dimo-server) |
Unified Axum HTTP + WebSocket Host binary serving Remote Protocol v1, desktop sidecar mode (--desktop), Pulse webhooks (/api/pulse/*), static WebUI (web/), and host upgrade logic. |
crates/application |
Transport-agnostic ApplicationCore, HostRuntime, and HostCommandRegistry use-case facade. |
crates/remote-protocol |
Versioned Remote Protocol v1 DTOs, capability bitsets, pairing envelopes, durable attach frames, and OpenAPI/JSON Schema generator. |
crates/agents |
Unified AgentRuntime: dedicated native Agent engine drivers (primary) + ACP v1/v2 compatibility runtime (secondary), 20 built-in profiles, ACP Registry client, auth/provider projection, and plan/usage probes. |
crates/conversations |
SQLite single-authority Turn lifecycle, StreamingThrottleCoalescer, DirtyRowMap projections, durable input queue, Turn Steering, and deterministic cross-agent handoff. |
crates/delegation & crates/delegation-proto |
Broker, spawner, Collaboration Space message/receipt engine, and wire protocol for agent-to-agent delegation. |
crates/dimo-mcp (dimo-mcp) |
Unified Host-managed stdio/HTTP MCP companion (Dimo-superagent-mcp) exposing delegation, Collaboration Space, Pulse, workflow_* authoring/debug, and dimo.session-enhance tools to agent sessions. |
crates/pulse |
Event-driven automation engine: EventEnvelope bus, StandardWebhookGateway, source normalizers, bounded AST filters, 3-layer anti-loop & mandate guards, and TemporalSource. |
crates/workflows |
Immutable Dual-Primitive DAG WorkflowDefinition compiler, checkpointed WorkflowRun state machine, WorkflowGraphPatch, debug runs, and run subscriptions. |
crates/automation |
Single-owner lease scheduler, due-claim transactions, recovery reconciliation, and worktree/disk retention GC. |
crates/plugins |
Plugin Kernel v4: package inspector, marketplace/GitHub installer, runtime lock resolver, Full-Trust Node/Python/Rust worker supervisor, and contribution registry. |
crates/plugin-sdk |
Rust Worker SDK for authoring native Dimo v4 plugin workers. |
crates/tool-runtime |
Deterministic CLI/binary runtime resolution, SHA-256 verification, bounded health probing, and reference-counted installation locks. |
crates/artifacts |
File-backed artifact identity tracking and reference-counted ArtifactPreviewLease lifecycle. |
crates/browser-host |
Embedded browser tab lifecycle, cookie persistence, DOM element inspection, and ElectronNativeTabs preview bridge. |
crates/git |
Domain-split Git engine (worktrees, diffs, branches, remotes, 3-way conflict resolution, commit stats) over git2 + CLI fallback. |
crates/services |
Workspace orchestration, filesystem watcher, fuzzy file ranking, PR monitoring, chat channels, config, and approvals. |
crates/db |
SQLite persistence layer (WritePool(1) / ReadPool(4) / CommitVisibilityFence), SQLx migrations, and offline .sqlx query cache. |
crates/deployment & crates/local-deployment |
Core Deployment service trait and local process/PTY/worktree implementation. |
crates/executors |
Workspace lifecycle shell scripts (ScriptRequest), BaseCodingAgent identity/config schemas, and shared log normalization. |
crates/api-types & crates/utils |
Shared wire/API types (#[derive(TS)] → shared/types.ts) and cross-platform utilities. |
| Directory | Responsibility |
|---|---|
electron/ |
Thin Electron desktop shell (@dimo/electron), dimo-server --desktop sidecar supervisor, <webview> browser host bridge, custom protocols, and auto-updater. |
frontend/ |
React 19 + TypeScript + Vite workbench (Dockview IDE stage, @xyflow/react Spatial Canvas, BackendTransport, NormalizedConversation, Settings). |
shared/ |
Generated Rust→TS contracts (shared/types.ts) and unified Host command catalog (shared/hostCommands.ts). |
packages/ |
TypeScript toolchain & companion packages: @dimoai/plugin-sdk (plugin-sdk/), @dimoai/plugin-cli (plugin-cli/), @dimo/plugin-contract (plugin-contract/), and pulse-sdk/. |
sdk/python/ |
Python Worker SDK (dimo-plugin) for authoring v4 plugin workers in Python. |
plugins/ |
15 official full-trust v4 plugins (ayu-theme, browser, code-completion, computer-use, kanban-views, notes, office, plugin-development, prompt-enhancer, remote-ssh, science, session-enhance, tauri-ui-debugger, voice-input, workflow-creator). |
npx-cli/ |
dimoai npm CLI (dimo serve, dimo list/install, remote Host commands, and dimo plugin management). |
mobile/ios/ & mobile/android/ |
Native SwiftUI iOS (ADR-0084) and Kotlin/Jetpack Compose Android (ADR-0041) Companion apps over Remote Protocol v1. |