GitHub - leapmux/leapmux: AI Coding Agent Multiplexer
Service

GitHub - leapmux/leapmux: AI Coding Agent Multiplexer

leapmux
2026.02.26
·GitHub·by 네루
#AI Coding Agent#Claude Code#Go#Multiplexer#Web Interface

Key Points

  • 1LeapMux is an AI coding agent multiplexer designed to run and manage multiple Claude Code instances concurrently through a centralized web interface.
  • 2Its architecture consists of a SolidJS frontend, a central Go Hub for orchestration and data storage, and Go Workers that wrap Claude Code and provide system access.
  • 3The platform facilitates multi-agent workspaces, terminal access, file browsing, and workspace sharing, enabling efficient management of remote development backends.

LeapMux is an AI coding agent multiplexer designed to facilitate the simultaneous operation and centralized management of multiple Claude Code instances via a unified web interface. It addresses the need for developers to run multiple AI coding agents across various workspaces and remote development backends, enabling collaboration and efficient interaction.

The platform's core methodology is based on a robust three-tier architecture comprising a Frontend, a central Hub service, and multiple Workers.

  1. Frontend: Built with SolidJS, the web application serves as the user interface. It communicates with the Hub using ConnectRPC for remote procedure calls (RPCs) and WebSocket for real-time event streaming. This layer is responsible for managing UI state related to workspaces, agents, terminals, and file browsing, as well as handling real-time message streaming and chat interactions.
  1. Hub: Implemented in Go, the Hub acts as the central orchestration service. It is the sole intermediary for all communication between the Frontend and the Workers, ensuring no direct Frontend-Worker interaction. The Hub manages user authentication, workspace configuration, and worker registration, storing persistent data in an SQLite database. Its responsibilities include routing traffic, handling bidirectional streaming for real-time events, and managing crucial components like agent message routing (agentmgr), session-based authentication (auth), database migrations and queries (db), workspace tiling layout (layout), and a persistent worker notification queue (notifier) for reliable message delivery with retries.
  1. Worker: Also written in Go, each Worker wraps and manages multiple Claude Code instances. Workers provide direct system access, including interactive PTY (pseudo-terminal) sessions for real-time I/O streaming and file system browsing capabilities. A key technical aspect is that Workers initiate outbound gRPC connections with bidirectional streaming to the Hub (over TCP or Unix domain sockets), allowing them to operate behind network address translators (NATs) without requiring inbound port access. The Worker includes modules for Claude Code process management (agent), file system access (filebrowser), Git repository utilities (gitutil), and PTY session management (terminal).

Communication protocols are strictly defined:

  • Frontend to Hub: ConnectRPC (a gRPC-compatible RPC framework) for standard requests and WebSocket for continuous event streaming.
  • Worker to Hub: Standard gRPC with bidirectional streaming, enabling continuous message exchange and real-time control.
All messages are formatted using Protocol Buffers, ensuring efficient and type-safe data serialization.

LeapMux offers flexible deployment modes: it can run as a standalone binary (leapmux) encompassing both Hub and Worker functionalities, or its components can be run independently (leapmux hub and leapmux worker) to support distributed deployments where Workers connect to a remote Hub.

The project leverages a comprehensive technology stack: SolidJS, Bun, ConnectRPC, and Vite-based Vinxi for the Frontend; Go, SQLite, Goose (database migrations), and gRPC for the Hub and Worker; and Protocol Buffers for inter-service communication. Development is supported by tools like buf for Protocol Buffer tooling, Task for build orchestration with checksum-based caching, golangci-lint for Go code quality, and mprocs for multi-process development. Automated code generation for Protocol Buffers and type-safe SQL (using sqlc) is integral to the development workflow, ensuring consistency and reducing manual errors.