Sandbox
@AgentsMesh/AgentsMesh

Self-hosted console for many coding agents

AgentsMesh gives you a control layer for running many AI coding agents on your own machines. It schedules pods onto runners, keeps each agent in its own worktree sandbox, and shows their output in web, desktop, and iOS consoles.

2,344 stars242 forksGoUpdated 1mo ago
AgentsMesh, an AI Agent Fleet Command Center.
Yanfu Zhu1.6k views • 5 months ago
Who it's for

Builders who want to direct a fleet of terminal coding agents from one place.

What it delivers

You can run, isolate, and monitor many agents at once without babysitting a pile of terminals.

What it does

Runner fleet

Install runners on any number of machines, set capacity, and schedule agent pods across the fleet.

Workspace isolation

Each pod gets its own Git worktree sandbox and private credentials so agents do not overwrite each other.

One console for many pods

Web, desktop, and iOS clients show terminal streams, pod lists, and workspace views in real time.

Autopilot

A control agent can watch a pod, send the next step when it goes idle, and hand control back to a human.

Mesh and channels

Bind pods together so they can communicate with @mentions and shared channel topology.

Supported agent runtimes

Works with Claude Code, Codex CLI, Gemini CLI, Aider, OpenCode, and other terminal-based agents.

How to get it

  1. 1The Runner is a lightweight daemon that runs on your machine and executes AI agents…
    curl -fsSL https://agentsmesh.ai/install.sh | sh
  2. 2Run
    agentsmesh-runner login
  3. 3This opens your browser to authenticate. For headless environments (SSH, remote server)
    agentsmesh-runner login --headless
  4. 4For self-hosted deployments, add --server
    agentsmesh-runner login --server https://your-server.com
  5. 5Run
    agentsmesh-runner run
  6. 6Or install as a system service for always-on operation
    agentsmesh-runner service install
    agentsmesh-runner service start

README

AgentsMesh

Where teams scale beyond headcount.

The AI Agent Workforce Platform.
Run a hundred AI agents across your own machines — and command them all from one console.

Website · Docs · Quick Start · Discord · X · X (founder) · LinkedIn

CI License Docker Hub

AgentsMesh Demo Video


The problem: one operator, a hundred agents

AI coding agents have made individual engineers wildly productive — but individual productivity has a ceiling. The next 10x isn't a smarter agent; it's running many agents at once, and directing them like a team.

That ambition breaks the moment you try it for real:

  • A hundred agents won't fit on one laptop.
  • Nobody can babysit a hundred terminals.
  • Each agent needs its own clean, isolated workspace — or they corrupt each other's state.
  • Long-running agents stall, get stuck, and silently die.
  • Agents working in isolation never compound into a team.

What's missing isn't the agent. It's the control layer that turns one operator into the director of an agent workforce — the layer that schedules agents onto machines, isolates them, keeps them alive, lets them collaborate, and puts all of it on one screen.

AgentsMesh is that layer.

From problem to platform

Every part of AgentsMesh exists to answer one question: how does a single person reliably run, watch, and steer a hundred agents? Each capability is the direct answer to a wall you hit when you scale.

The wall you hitWhat AgentsMesh gives you
100 agents won't run on one machineRunner fleet — install self-hosted runners across any number of machines. Each advertises its capacity (max_concurrent_pods), and agents are scheduled onto the runner you pick or an available one from the pool. Your code never leaves your infrastructure.
Every agent needs a clean, isolated environmentWorkspace isolation — each agent runs in its own pod with a dedicated Git worktree sandbox (sandboxes/{pod}/workspace/), private credentials, and its own branch. Concurrent agents never step on each other.
You can't watch a hundred terminalsOne console, every screen — Web, Desktop (Electron), and iOS (SwiftUI) clients, all driven by the same Rust core. Paginated pod sidebar, multi-pane workspace, and real-time terminal streaming let one person hold many agents in view.
Long-running agents stall and need babysittingAutopilot — a control agent watches a pod and sends the next instruction the moment it goes idle, with iteration caps, decision history, and human takeover/handback. Self-healing, unattended runs.
Agents working alone don't compoundMesh & Channels — bind pods together, let them talk over channels with @mentions, and watch the collaboration topology update in real time.

The rest is plumbing built so that chain holds up under load: a control-plane / data-plane split — orchestration over gRPC with mTLS, terminal bytes over a stateless Relay cluster — so the backend never bottlenecks on PTY traffic, no matter how many agents are streaming at once.

Core concepts

  • AgentPod — one agent's isolated execution environment: a PTY terminal, a Git worktree sandbox, and a real-time output stream.
  • Runner — a self-hosted daemon you install on your own machines. It connects to the backend over gRPC+mTLS and spawns pods. Register as many as you need; pods schedule across the fleet.
  • Workspace — the per-pod sandbox: an isolated Git worktree plus private credentials, so concurrent agents never collide and every run is recoverable.
  • Autopilot — autonomous, self-healing control of a pod by a control agent, with iteration limits, decision history, and human takeover at any point.
  • Mesh & Channel — the collaboration fabric: pods bound into a topology, communicating over channels with @mentions.
  • Ticket — a unit of work on a Kanban board, bindable to a pod with progress and MR/PR tracking.

Architecture

AgentsMesh separates the control plane from the data plane: orchestration commands travel over gRPC with mTLS, while terminal I/O streams through a stateless Relay cluster. The backend never touches a single PTY byte — which is what lets the fleet scale.

AgentsMesh Architecture

Server-side (Go)

ComponentRole
BackendAPI server (Gin + GORM) — auth, org/team/user, pod lifecycle, tickets, billing, and the PKI that issues runner certs
RelayWebSocket relay for the terminal data plane — low-latency pub/sub between runners and clients
RunnerSelf-hosted daemon — connects to the backend (gRPC+mTLS), spawns isolated PTY pods that run the actual agents

Client-side

ComponentRole
Rust CoreBusiness-logic SSOT — 10 crates compiled to WASM (web/desktop) and a native dylib via UniFFI (iOS). One cache, one set of services, every client.
WebNext.js console — terminal, Kanban, real-time mesh topology
DesktopElectron app — reuses the web UI, talks to a native Rust core over NAPI
iOSSwiftUI + TCA — the same Rust core via UniFFI bindings
Web-AdminInternal admin console — user/org/runner management, audit logs

Getting Started

The fastest way to use AgentsMesh is the hosted service at agentsmesh.ai — sign up, connect your Git provider, and start running agents in minutes. Bring your own AI API keys (BYOK): no usage caps, full cost control.

1. Install a Runner

The Runner is a lightweight daemon that runs on your machine and executes AI agents locally. Your code stays on your infrastructure. Install one per machine you want in the fleet.

curl -fsSL https://agentsmesh.ai/install.sh | sh

See the Runner README for more installation options (deb, rpm, Windows, etc.)

2. Login

agentsmesh-runner login

This opens your browser to authenticate. For headless environments (SSH, remote server):

agentsmesh-runner login --headless

For self-hosted deployments, add --server:

agentsmesh-runner login --server https://your-server.com

3. Run

agentsmesh-runner run

Or install as a system service for always-on operation:

agentsmesh-runner service install
agentsmesh-runner service start

Once the runner is online, create an AgentPod from any console (Web / Desktop / iOS) and start putting agents to work.

Quick Start

Run the whole stack locally with one command.

git clone https://github.com/AgentsMesh/AgentsMesh.git
cd AgentsMesh/deploy/dev
./dev.sh

This starts the full stack: PostgreSQL, Redis, MinIO, Backend, Relay, Traefik, and a local Next.js frontend with hot reload.

Access:

ServiceURL
Web Consolehttp://localhost:3000
APIhttp://localhost:80/api

Test Accounts:

RoleEmailPassword
Userdev@agentsmesh.localdevpass123
Adminadmin@agentsmesh.localadminpass123

Ports are dynamically allocated per worktree. Check deploy/dev/.env for actual values.

Manual Setup

Prerequisites: Go 1.24+, Node.js 20+, pnpm, Docker

# 1. Start infrastructure
cd deploy/dev && ./dev.sh

# 2. Backend (auto-starts in Docker with hot reload)
docker compose logs -f backend

# 3. Frontend (local with Turbopack)
cd clients/web && pnpm install && pnpm dev
Production Deployment

Docker images are published to Docker Hub on every push to main:

agentsmesh/backend:sha-xxxxxxx
agentsmesh/web:sha-xxxxxxx
agentsmesh/web-admin:sha-xxxxxxx
agentsmesh/relay:sha-xxxxxxx

Tagged releases (v*) get semver tags:

agentsmesh/backend:1.0.0
agentsmesh/backend:1.0

See deploy/selfhost/ for the self-hosted deployment guide.

Supported Agents

Any terminal-based agent works. The built-ins:

AgentProviderDescription
Claude CodeAnthropicAutonomous AI coding agent
Codex CLIOpenAIOpenAI's code generation CLI
Gemini CLIGoogleGoogle Gemini CLI
AiderOpen SourceAI pair programming in the terminal
OpenCodeOpen SourceOpen source AI coding tool
CustomAnyAny terminal-based agent

Tech Stack

LayerTechnology
BackendGo (Gin + GORM)
Client CoreRust → WASM (web/desktop) + UniFFI (iOS) — shared business logic
Web / DesktopNext.js (App Router) + TypeScript + Tailwind · Electron
iOSSwiftUI + TCA
DatabasePostgreSQL + Redis
StorageMinIO (S3-compatible)
APIREST + gRPC (bidirectional streaming)
SecuritymTLS for runner connections, JWT for web auth
Real-timegRPC streaming (Runner ↔ Backend), WebSocket (Relay ↔ Client)
Reverse ProxyTraefik

Project Structure

AgentsMesh/
├── backend/          # Go API server
├── relay/            # Terminal relay server (Go)
├── runner/           # Self-hosted runner daemon (Go)
├── clients/
│   ├── core/         # Rust business-logic SSOT (WASM + UniFFI)
│   ├── web/          # Next.js console
│   ├── web-admin/    # Admin console (Next.js)
│   ├── desktop/      # Electron desktop app
│   └── ios/          # SwiftUI + TCA iOS app
├── proto/            # Protocol Buffers definitions
├── deploy/
│   ├── dev/          # Docker Compose dev environment
│   └── selfhost/     # Self-hosted deployment guide
└── docs/             # Architecture docs and RFCs

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

Business Source License 1.1 (BSL-1.1)

  • Change Date: 2030-02-28
  • Change License: GPL-2.0-or-later

The BSL allows you to use, copy, and modify the software for non-production purposes. Production use requires a commercial license until the change date, after which the software becomes available under GPL-2.0-or-later. See LICENSE for the full terms and additional use grant.

Files in the repo

Repository payload47 top-level entries
  • .agents
  • .claude
  • .github
  • agentfile
  • agents
  • backend
  • build_defs
  • clients
  • deploy
  • design
  • docs
  • packages
  • proto
  • relay
  • runner
  • tests
  • third_party
  • tools
  • .bazelignore
  • .bazelrc
  • .bazelversion
  • .gitignore
  • .gitlab-ci.yml
  • .mcp.json
  • AGENTS.md
  • buf.amesh.gen.yaml
  • buf.gen.yaml
  • buf.yaml
  • BUILD.bazel
  • CHANGELOG.md
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • go.mod
  • go.sum
  • LICENSE
  • MODULE.bazel
  • MODULE.bazel.lock
  • multitool.lock.json
  • NOTICE
  • package.json
  • pnpm-lock.yaml
  • pnpm-workspace.yaml
  • README.md
  • SECURITY.md
  • SUPPORT.md
  • WORKSPACE.bazel

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k