Noureddine RAMDI / AgentsMesh: a self-hosted AI agent orchestration platform with control plane/data plane separation

Created Mon, 04 May 2026 10:23:02 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

AgentsMesh/AgentsMesh

AgentsMesh addresses a common complexity in AI agent orchestration: managing the separation between control commands and the data they act upon, especially in self-hosted environments where security, latency, and scalability matter.

What AgentsMesh does

AgentsMesh is a self-hostable platform designed to orchestrate AI agents on user infrastructure. It separates the control plane (managing orchestration commands and state) from the data plane (handling runtime execution and terminal I/O), using a microservices architecture.

Under the hood, the backend is written in Go, using Gin for HTTP REST endpoints and GORM for database access. It manages organizational hierarchies, team and pod lifecycle, task orchestration, and multi-tenant row-level isolation. Communication between services leverages REST and gRPC with mutual TLS for secure and authenticated traffic.

A Relay cluster handles real-time bidirectional WebSocket pub/sub messaging, primarily for streaming terminal input/output between users’ browsers and the runner processes executing the AI agents.

The Runner is a lightweight Go daemon running on user machines that executes AI agents like Claude Code, Codex CLI, Gemini CLI, and Aider inside isolated pseudo-terminal (PTY) sandboxes. This ensures that agents run securely on the user’s infrastructure, with isolated environments for multi-agent workflows.

The platform supports SSO and RBAC for enterprise-grade multi-tenant deployments, including air-gapped environments where outbound internet access is restricted.

Architecturally, the repo is split into several microservices: Backend, Web (Next.js frontend), Relay, Runner, and Web-Admin, each with clear responsibilities enhancing maintainability and scaling.

Architecture and technical strengths

What stands out in AgentsMesh is the explicit separation of control and data planes, a design pattern common in distributed systems but less so in AI agent orchestration. The control plane runs on the backend, coordinating tasks, managing state, and handling authentication. The data plane is the Runner, executing agents locally and streaming terminal I/O back and forth via the Relay cluster.

This separation offers several advantages:

  • Security: By isolating execution on user infrastructure, sensitive code and data never leave the user’s environment.

  • Scalability: Control commands and state management scale differently than streaming terminal I/O, so splitting them allows independent optimization.

  • Real-time collaboration: The Relay cluster’s use of WebSocket pub/sub supports low-latency, bidirectional streaming, essential for live terminal sessions and agent collaboration visualization.

The use of gRPC with mutual TLS for backend communication ensures secure and efficient transport of orchestration commands. Bidirectional streaming over gRPC supports real-time status updates and task management.

The Runner’s PTY sandboxing is a practical choice for running CLI-oriented AI agents in isolated environments, minimizing interference and security risks. This model supports multiple agents running simultaneously in separate pods.

Code quality is reasonably high, with clear service boundaries and idiomatic Go code using Gin and GORM. The microservice approach aids maintainability but introduces operational complexity, especially in self-hosted setups.

Tradeoffs include the complexity of managing multiple services and the need for infrastructure components like PostgreSQL, Redis, and MinIO. While the Docker-based dev environment simplifies local testing, production deployments require more careful orchestration.

Quick start using the official commands

The repo includes a one-command setup for development using Docker, spinning up all dependencies and services:

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

This launches PostgreSQL, Redis, MinIO, Backend, Relay, Traefik proxy, and a local Next.js frontend with hot reload.

Access the web console at http://localhost:3000 and the API at http://localhost:80/api.

Test accounts are provided:

RoleEmailPassword
Userdev@agentsmesh.localdevpass123
Adminadmin@agentsmesh.localadminpass123

To run the Runner on your machine, install it with:

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

Log in interactively or headless:

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

Run the Runner interactively:

agentsmesh-runner run

Or install as a system service for persistent operation:

agentsmesh-runner service install
agentsmesh-runner service start

Once the Runner is online, you can create AgentPods from the web console and start executing AI agents.

Verdict

AgentsMesh is a solid platform for teams or individuals wanting to run AI agents on their own infrastructure with strong isolation and security guarantees. Its microservice architecture and clean control/data plane split reflect a mature distributed system design.

The tradeoff is operational complexity: self-hosting requires managing databases, caches, proxies, and multiple services. The Runner’s PTY sandboxing approach fits CLI-based AI agents well but might need extension for more diverse workloads.

The platform’s support for multi-tenancy, RBAC, and air-gapped deployments makes it suitable for enterprise or privacy-conscious users.

If you want a self-hosted AI agent orchestration system that prioritizes security, real-time collaboration, and clear architectural separation, AgentsMesh is worth exploring. For simpler setups or those new to AI agents, the learning curve and infrastructure overhead might be a barrier.

Overall, the code is clean, the architecture well thought out, and the project actively maintained — a strong foundation for building multi-agent workflows with control and data plane concerns neatly separated.


→ GitHub Repo: AgentsMesh/AgentsMesh ⭐ 1,902 · Go