DEV Community

Cover image for Fleetlayer: Multi-Machine Agent Orchestration and the Missing Primitives
mech.app
mech.app

Posted on Originally published at mech.app

Fleetlayer: Multi-Machine Agent Orchestration and the Missing Primitives

Running one Claude Code session on your laptop is straightforward. Running ten agents across three machines, each signed into different accounts, is where the plumbing breaks. Fleetlayer is a framework that addresses the infrastructure gap when you scale agent execution beyond a single host. It provides primitives for cross-machine messaging, shared browser session access, distributed artifact hosting, and account-level usage tracking.

The core problem: agents on different machines cannot coordinate without custom glue. An agent on your VPS cannot message one on your laptop. A server-side agent cannot control the Chrome instance on your Mac. Artifacts created in one Claude account return "access denied" when another session tries to read them. Fleetlayer exposes these as first-class operations.

Architecture: Fleet Topology and Message Routing

Fleetlayer organizes agents into a fleet, a named collection of machines running the Fleetlayer daemon. Each machine hosts one or more agents, identified by a handle like api@laptop or triage@mail. The daemon maintains a persistent connection to a central coordination service (the architecture suggests a hub-and-spoke model, not peer-to-peer gossip).

Message routing works through explicit addressing:

fleetlayer msg send --to api@laptop "staging deploy is done"
Enter fullscreen mode Exit fullscreen mode

This delivers a text payload to the api@laptop agent, which is a Claude Code session running on the laptop machine. The daemon on laptop injects the message into the agent's context, likely as a system message or tool call result.

State persistence is handled per-agent. Each agent's session state (conversation history, tool call results, file references) lives on its host machine. The framework does not replicate state across machines. If a machine goes offline, its agents become unreachable until the daemon reconnects. There is no automatic failover or state migration.

Resource limits are enforced at the account level, not the fleet level. Fleetlayer tracks usage for each Claude account across all machines. When an account hits its rate limit, all agents using that account stop, regardless of which machine they run on. This is visible in the fleet status output:

laptop (macbook, online)
  api@laptop claude working
  docs@laptop codex idle
mail (home-server, online)
  triage@mail claude idle
Enter fullscreen mode Exit fullscreen mode

Browser Session Sharing via Playwright MCP

One of the more interesting primitives is shared browser access. An agent running on a headless VPS can control the Chrome instance on your Mac, signed in with your credentials. This is implemented using the Playwright MCP server.

The flow:

  1. Your Mac runs a Playwright MCP server that controls the local Chrome instance.
  2. The Fleetlayer daemon on the VPS connects to the MCP server over the network.
  3. When the VPS agent calls a browser tool, the request is forwarded to the Mac's MCP server.
  4. The Mac's Chrome executes the action (navigate, click, screenshot) and returns the result.

This solves the "artifacts say access denied" problem. If an agent creates a Claude artifact while signed into account A, another agent can view it by controlling a browser session already signed into account A, even if that browser runs on a different machine.

Security boundary: The MCP server must be network-accessible, which means exposing it over a tunnel (WireGuard, Tailscale) or opening a port. Fleetlayer does not document authentication for the MCP connection. You are responsible for securing the tunnel.

Artifact Hosting: Pages and Apps

Fleetlayer provides a local web server for hosting agent-generated artifacts. Agents write HTML, CSS, and JavaScript into a folder structure. The daemon serves these as static sites, accessible at http://localhost:<port>/<artifact-name>.

Cross-account access is handled by a single sign-in. You authenticate once to the Fleetlayer web UI, and all artifacts from all agents become accessible. This avoids the "sign in and out of the Claude extension" problem.

Deployment shape: The web server runs on the same machine as the daemon. If you want artifacts accessible from outside your local network, you need a reverse proxy (Caddy, nginx) or a tunnel. The framework does not include built-in TLS or domain management.

Observability: Fleet Status and Usage Tracking

The fleetlayer fleet command shows the current state of all machines and agents:

  • Machine status (online, offline)
  • Agent status (working, idle)
  • Current task summary (if available)

Usage tracking is per-account, not per-agent. If you have three agents using the same Claude account, their combined usage counts against the account's limit. The framework surfaces this in the fleet status, so you know when an account is close to exhaustion before a task fails.

Distributed tracing is not mentioned. There is no indication of structured logs, trace IDs, or span propagation across machines. If an agent on machine A sends a message that triggers work on machine B, you will need to correlate logs manually.

Failure Modes and Recovery

Failure Scenario Behavior Recovery Mechanism
Machine goes offline Agents on that machine become unreachable Manual restart of daemon
Account hits rate limit All agents using that account stop Wait for limit reset, visible in fleet status
Message delivery fails No retry or dead-letter queue mentioned Likely lost, manual resend required
Browser session expires Agent cannot complete browser-based tasks Manual re-authentication in Chrome
Daemon crash All agents on that machine stop Systemd or manual restart, no state recovery

The framework does not provide automatic retries, circuit breakers, or graceful degradation. If a machine loses network connectivity, its agents are unavailable until the daemon reconnects. If the central coordination service goes down, the entire fleet stops.

Code Example: Sending a Cross-Machine Message

import subprocess

def notify_agent(target_agent: str, message: str):
    """Send a message to an agent on another machine."""
    result = subprocess.run(
        ["fleetlayer", "msg", "send", "--to", target_agent, message],
        capture_output=True,
        text=True
    )
    if result.returncode != 0:
        raise RuntimeError(f"Message delivery failed: {result.stderr}")
    return result.stdout

# Example: notify the API agent on the laptop that staging is ready
notify_agent("api@laptop", "staging deploy complete, run smoke tests")
Enter fullscreen mode Exit fullscreen mode

This is a thin wrapper around the CLI. The framework does not expose a Python SDK or gRPC API. All orchestration happens through shell commands.

Deployment Considerations

Installation: Each machine runs the Fleetlayer daemon as a background service. You configure it with a list of agents (name, type, account) and connection details for the central coordination service.

Account management: You sign into each Claude account once per machine. The daemon stores session tokens and refreshes them automatically. If a token expires, you must re-authenticate manually.

Network topology: The daemon requires outbound connectivity to the coordination service. If you run agents on a home server behind NAT, you need a tunnel or port forwarding. The framework does not include NAT traversal.

Cost model: Fleetlayer is source-available. The coordination service is hosted by the Fleetlayer team. Pricing is not documented on the site. You are responsible for the cost of Claude API usage across all accounts.

When to Use Fleetlayer

Good fit:

  • You run agents on multiple machines (laptop, VPS, home server) and need them to coordinate.
  • You manage multiple Claude accounts and want unified usage tracking.
  • You need agents on headless servers to control a browser session on your desktop.
  • You want a simple CLI-based orchestration layer without writing custom message queues.

Poor fit:

  • You need automatic failover or state replication across machines.
  • You require sub-second latency for agent-to-agent communication.
  • You want structured observability (distributed tracing, metrics, alerting).
  • You need fine-grained resource limits (per-agent CPU, memory, API quotas).
  • You are running agents in a zero-trust environment and need mTLS or credential rotation.

Technical Verdict

Fleetlayer solves a real coordination problem: making agents on different machines and accounts work together without custom infrastructure. The messaging primitive is useful, and shared browser access is clever. But the framework is early. There is no retry logic, no distributed state management, and no observability beyond a status command. If a machine goes down, you lose all agents on it. If the coordination service goes down, the entire fleet stops.

Use it if you are already running agents on multiple machines and spending time on SSH tunnels and manual message passing. Avoid it if you need production-grade reliability, automatic recovery, or fine-grained resource control. The plumbing is functional but minimal.

Source Links

Top comments (0)