Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.
Python agent-orchestrationaiai-agentschatopsdiscordlangchainmcpmicrosoft-teamsmulti-agentopen-sourceopenaiself-hostedslack
Architecture Overview
All paths are relative to apps/switch-console-desktop/.
Process Model
src/main/: Electron main process — app lifecycle, RPC controllers, domain services, database, SDK host orchestration, updatersrc/preload/: Electron preload bridge — exposes typedinvoke,eventSend,eventOnto renderersrc/renderer/: React UI — app shell (app/), feature areas (features/), shared infrastructure (lib/), typed RPC clientsrc/shared/: Agent provider registry, IPC primitives (RPC + events), shared domain types undersrc/shared/core/packages/agent-providers/src/host/: The persistent SDK host keeps local and remote sessions running while Console is closed — seeremote-execution.md.
Boot Sequence
src/main/index.ts → app lifecycle → IPC/RPC registration → window creation → renderer
index.ts— Loads.env, normalizes PATH, initializes database, registers all RPC controllers viasrc/main/rpc.ts, creates the main window.src/main/rpc.ts— Assembles the typed RPC router from domain controllers (src/main/core/*/controller.ts).src/preload/index.ts— Exposeswindow.electronAPI(invoke,eventSend,eventOn) viacontextBridge.src/renderer/lib/ipc.ts— Creates the typed RPC client and event emitter used throughout the renderer.
Build Tooling
electron.vite.config.ts— electron-vite config for main, preload, and renderer builds.vitest.config.ts— Vitest config with five test projects:node,main-db,fixtures,migrations, andbrowser(Playwright-backed renderer tests).- Single
tsconfig.json(inapps/switch-console-desktop/) for all app targets.
Read Next
- Main process details:
main-process.md - Renderer details:
renderer.md - Shared modules and provider registry:
shared.md - Remote hosts, reachability, and the sidecar:
remote-execution.md - Switch rooms and session binding:
switch-rooms.md