← Documentation Home

Agent Mesh - Home

Distributed Agent Coordination with Tailscale Integration and Zero-Trust Security

Version OSSA Compliant License

Overview

Agent Mesh is a production-grade distributed agent coordination layer that enables automatic agent discovery, intelligent task routing, secure communication, and load balancing across mesh networks. Built on Tailscale's MagicDNS for zero-configuration service discovery and leveraging zero-trust security principles.

Core Function: Coordinates autonomous agents across distributed networks, providing service discovery, task distribution, secure transport, and authentication without manual configuration.

Quick Start

# Install
npm install @bluefly/agent-buildkit

# Deploy agent to mesh
buildkit agent:mesh deploy \
  --agent-id worker-1 \
  --agent-name "Task Worker" \
  --agent-type worker \
  --namespace production \
  --capabilities "task-execution,data-processing"

# Check mesh status
buildkit agent:mesh status

# Execute task on mesh
buildkit agent:mesh execute \
  --task-id task-001 \
  --task-type data-processing \
  --payload '{"data": "example"}'

# Discover agents
buildkit agent:mesh discover --namespace production

Key Features

Wiki Navigation

Core Documentation

Advanced Topics

CLI Reference

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│                      Agent Mesh Network                      │
├─────────────────────────────────────────────────────────────┤
│                                                               │
│  ┌──────────────┐     ┌──────────────┐     ┌──────────────┐│
│  │ Orchestrator │────▶│ Coordinator  │────▶│   Workers    ││
│  │   Agent      │     │   Service    │     │  (Pool)      ││
│  └──────────────┘     └──────────────┘     └──────────────┘│
│         │                     │                    │         │
│         │                     │                    │         │
│  ┌──────▼──────┐     ┌───────▼──────┐     ┌──────▼──────┐ │
│  │  Discovery  │     │   Transport  │     │     Auth     │ │
│  │   Service   │     │   Service    │     │   Service    │ │
│  └─────────────┘     └──────────────┘     └──────────────┘ │
│         │                     │                    │         │
│  ┌──────▼─────────────────────▼────────────────────▼──────┐│
│  │            Tailscale MagicDNS Network Layer             ││
│  │      (Zero-Config Service Discovery + Encryption)       ││
│  └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘

Agent Types

Orchestrator

Worker

Monitor

Integrator

Governor

Critic

Core Services

Discovery Service

Automatic agent registration and discovery using Tailscale MagicDNS: - Agent registration with identity and capabilities - Namespace-based isolation - Health checking and heartbeat monitoring - Capability-based filtering

Coordinator Service

Intelligent task distribution and management: - Task queue management - Agent capability matching - Load balancing strategies (round-robin, least-loaded, capability-match, random) - Fault tolerance and retry logic - Task status tracking and result retrieval

Transport Service

Secure agent-to-agent communication: - HTTP/HTTPS over Tailscale encrypted network - Request/response patterns - Streaming support for large payloads - Broadcast messaging - Connection pooling and retry logic

Auth Service

Zero-trust authentication and authorization: - JWT-based agent authentication - ACL policies per agent type - Permission-based access control - Security audit logging - Token revocation

Performance Metrics

CLI Commands

Deploy Agent

buildkit agent:mesh deploy \
  --agent-id worker-1 \
  --agent-name "Task Worker" \
  --agent-type worker \
  --namespace production \
  --capabilities "task-execution,data-processing" \
  --port 3000

Check Status

buildkit agent:mesh status \
  --namespace production \
  --health healthy

Execute Task

buildkit agent:mesh execute \
  --task-id task-001 \
  --task-type data-processing \
  --payload '{"data": "example"}' \
  --priority high \
  --timeout 300000

Discover Agents

buildkit agent:mesh discover \
  --namespace production \
  --agent-type worker \
  --capability task-execution

Generate Auth Token

buildkit agent:mesh auth \
  --agent-id worker-1 \
  --agent-type worker \
  --namespace production \
  --capabilities "task-execution"

View Workload

buildkit agent:mesh workload --agent-id worker-1

Load Balancing Strategies

Round-Robin

Least-Loaded

Capability-Match

Random

Security Model

Network Layer

Application Layer

Default ACL Policies

Agent Type Allowed Actions Allowed Resources Denied Actions
Orchestrator * (all) * (all) None
Worker read, execute tasks, results admin
Monitor read * (all) write, execute, admin
Integrator read, write integrations, data admin
Governor read, write, admin policies, acl, audit None
Critic read, write reviews, feedback, metrics admin

Integration Examples

Python Agent

import requests
import json

# Agent registration
response = requests.post('http://agent-mesh:3000/mesh/register', json={
    'agentId': 'python-worker-1',
    'agentName': 'Python Data Processor',
    'agentType': 'worker',
    'namespace': 'production',
    'capabilities': ['python', 'data-processing', 'ml'],
    'port': 8080
})

# Task execution endpoint
@app.route('/mesh/rpc', methods=['POST'])
def execute_task():
    task = request.json
    result = process_task(task['payload'])
    return jsonify({'success': True, 'result': result})

Node.js Agent

import axios from 'axios';
import express from 'express';

// Agent registration
await axios.post('http://agent-mesh:3000/mesh/register', {
  agentId: 'node-worker-1',
  agentName: 'Node.js API Processor',
  agentType: 'worker',
  namespace: 'production',
  capabilities: ['nodejs', 'api-integration', 'json'],
  port: 8080
});

// Task execution endpoint
app.post('/mesh/rpc', async (req, res) => {
  const task = req.body;
  const result = await processTask(task.payload);
  res.json({ success: true, result });
});

Technology Stack

Support


Last Updated: 2025-11-02 Maintainer: LLM Platform Team License: MIT