Self-hosted visual multi-agent AI pipelines — MCP-native, bring your own keys, monitor everything in real-time.
Build multi-agent AI pipelines visually, run them against any MCP server, and watch every decision, tool call, and handoff happen in real-time — on infrastructure you own.
| Capability | AgentMesh | LangSmith | Gumloop | n8n |
|---|---|---|---|---|
| Visual pipeline builder | ✅ | ❌ | ✅ | ✅ |
| Real-time agent monitoring | ✅ | ✅ | ❌ | ❌ |
| MCP-native (any MCP server) | ✅ | ❌ | ❌ | ❌ |
| Self-hosted / open-source | ✅ | ❌ | ❌ | ✅ |
| Per-user encrypted key storage | ✅ | ❌ | ❌ | ❌ |
| Free to use | ✅ | ❌ | ✅ |
git clone https://github.com/yourusername/agentmesh.git
cd agentmeshThere are two separate env files — one for each process:
Backend — create .env at the repo root:
cp .env.example .env
# Fill in the backend blockFrontend — create frontend/.env.local:
# Copy just the frontend block from .env.exampleSee .env.example — it's annotated with every variable, what it does, and how to generate it. Minimum required:
| Variable | File | How to get it |
|---|---|---|
GEMINI_API_KEY |
.env |
aistudio.google.com |
DATABASE_CONN |
.env |
Your PostgreSQL connection string |
ENCRYPTION_KEY |
.env |
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" |
AUTH_SECRET |
frontend/.env.local |
openssl rand -base64 32 |
GOOGLE_CLIENT_ID/SECRET |
frontend/.env.local |
Google Cloud Console → OAuth 2.0 |
NEXTAUTH_URL |
frontend/.env.local |
http://localhost:3000 for local dev |
FASTAPI_URL |
frontend/.env.local |
http://localhost:8000 for local dev |
uv sync
uv run alembic upgrade head
cd frontend && npm install# Activate the virtual environment first
source .venv/Scripts/activate # Windows (bash)
source .venv/bin/activate # macOS / Linux
make dev| URL | What you get |
|---|---|
http://localhost:3000 |
Landing page |
http://localhost:3000/dashboard |
Pipeline builder + Mission Control |
http://localhost:3000/settings |
API keys + MCP server config |
http://localhost:8000/docs |
FastAPI interactive docs |
- Open
/dashboard— make sure you're in Build mode - Drag nodes from the left palette onto the canvas
- Connect them by drawing edges between node handles
- Configure each node in the right inspector (model, system prompt, temperature)
- Click Validate to check for DAG errors
- Click Run pipeline, enter a task, and watch Mission Control
| Node | Purpose |
|---|---|
Input |
Pipeline entry point |
LLM Agent |
AI reasoning agent — model, system prompt, temperature |
Tool |
Calls a registered MCP server tool |
Router |
Conditional branch based on agent output |
Memory |
Context / vector store pass-through |
Transform |
JSON parse, extract, format |
Parallel |
Fan-out to multiple agents simultaneously |
Output |
Collects final result |
Click Templates in the pipeline header to load:
- Research Synthesis — search → extract → analyze → write
- GitHub Code Review — fetch branch → review → security scan → summary (requires
GITHUB_TOKEN)
agentmesh/
├── backend/
│ ├── agents/ # Agent base class, registry
│ ├── api/
│ │ ├── routes.py # All FastAPI endpoints + app factory
│ │ ├── websocket.py # WebSocket event handler
│ │ └── keys.py # API key CRUD
│ ├── crypto.py # Fernet AES-256 per-user key encryption
│ ├── db/ # SQLAlchemy async + Alembic migrations
│ ├── events/ # EventBus: 100-event circular buffer, WS broadcast
│ ├── llm/ # Gemini, Groq, OpenAI + MultiProvider router
│ ├── mcp/ # FastMCP client wrapper + MCPRegistry
│ ├── orchestrator/ # WorkflowOrchestrator: sequential + parallel execution
│ └── pipelines/ # DAG validator, pipeline→workflow converter, templates
├── frontend/
│ ├── app/ # Next.js App Router: landing, dashboard, settings, auth
│ ├── components/
│ │ ├── dashboard/ # DashboardLayout, AgentSidebar, MessageStream, ToolCallInspector
│ │ ├── pipeline/ # PipelineCanvas (React Flow), NodePalette, NodeConfigInspector
│ │ └── ui/ # Primitive components
│ ├── hooks/ # useAgentMeshEvents, useWebSocket (auto-reconnect)
│ ├── stores/ # Zustand: pipelineStore, eventStore
│ └── types/ # TypeScript: nodes, edges, events
└── tests/ # pytest: orchestrator, routing, validator, MCP registry
Browser → Next.js BFF proxy → FastAPI → WorkflowOrchestrator
│
┌───────────────┼───────────────┐
Agent 1 Agent 2 Agent N
└───────────────┴───────────────┘
│
EventBus (WebSocket)
│
useAgentMeshEvents
│
┌─────────────────────┼─────────────────────┐
AgentSidebar MessageStream ToolCallInspector
Backend on Render
- Build command:
uv sync && uv run alembic upgrade head - Start command:
.venv/bin/uvicorn backend.api.routes:app --host 0.0.0.0 --port $PORT - Add all backend env vars in the Render dashboard
Frontend on Vercel
- Root directory:
frontend - Add frontend env vars; set
FASTAPI_URLto your Render service URL
Database: Neon free PostgreSQL — paste the connection string into DATABASE_CONN.
Render's free tier spins down after 15 min of inactivity. Use UptimeRobot to keep it warm for demos.
npm i -g @railway/cli
railway login && railway init
railway upAdd a PostgreSQL plugin from the Railway dashboard and set env vars via railway variables set KEY=value.
cp .env.example .env # fill in values
docker-compose up -dMinimum spec: 1 vCPU / 1 GB RAM. Add Nginx + Let's Encrypt for HTTPS.
| Layer | Technology |
|---|---|
| Backend | FastAPI + uvicorn |
| Orchestration | Custom WorkflowOrchestrator state machine |
| MCP | FastMCP (stdio + HTTP) |
| LLM providers | Gemini, Groq, OpenAI via MultiProvider |
| Real-time | WebSocket + EventBus (100-event circular buffer) |
| Database | PostgreSQL + SQLAlchemy async + Alembic |
| Encryption | Fernet (AES-256) |
| Auth | NextAuth v5 + Google OAuth |
| Frontend | Next.js 15 (App Router) + React 19 |
| Canvas | @xyflow/react (React Flow) |
| State | Zustand 5 |
| Styling | Tailwind CSS v4 |
| Testing | pytest + pytest-asyncio |
See CONTRIBUTING.md for dev setup, project conventions, and how to open a pull request.
MIT — use it, fork it, build on it.