Skip to content

Poster: EdgeCitadel -- Hybrid NATS-MQTT Orchestration for Edge Multi-Agent Systems

🕒 Published (v1): 2026-04-20 22:41 UTC · Source: Arxiv · link

Why this paper was selected

EdgeCitadel: hybrid NATS-MQTT orchestration for edge-resident multi-agent systems

Ask a follow-up

Open an assistant pre-loaded with this paper's context.

💬 Ask ChatGPT✦ Ask Claude

TL;DR

EdgeCitadel is an edge multi-agent orchestration platform that replaces naive MQTT relay architectures with a hybrid NATS 2.10 + MQTT adapter backbone, enabling durable message persistence, direct peer-to-peer delegation, and passive observability across heterogeneous edge hardware. It addresses the gap left by cloud-centric frameworks (AutoGen, LangGraph) that do not handle deployment-time coordination across mixed edge devices. The system is demonstrated on a three-device testbed (ARM64, x64, Android) with sub-5 ms messaging overhead.

Problem

Existing multi-agent frameworks assume cloud-style transports or a central relay, but edge-resident AI agents run on heterogeneous hardware (IoT hubs, phones, laptops) that inherits MQTT pub/sub as its de facto coordination layer. MQTT-only relay architectures lack durable persistence, structured subject namespaces for peer delegation, and auditability — requiring substantial custom engineering for capabilities that edge deployments need natively.

Method

EdgeCitadel runs a single NATS 2.10 server with the built-in MQTT adapter as the unified messaging backbone. Edge agents connect over MQTT (port 1883); backend services use native NATS (port 4222). The server automatically translates between protocols with no separate broker and unified authentication.

Three design primitives: 1. Hybrid transport: structured subject hierarchy (agents.{id}.{action}, tasks.{id}.{phase}, system.broadcast) with JetStream-backed durable streams and a key-value bucket (AGENT_STATE) for live peer discovery. 2. Direct P2P delegation: agents write to a target inbox subject with correlation IDs; guardrails include a content-hash cycle detector (first 200 chars), a chain_depth counter hard-capped at 5, and a 90-second timeout with at most 5 concurrent outstanding requests. 3. Passive aggregator: a FastAPI service subscribes to wildcard NATS subjects, persists all messages to SQLite, and streams events to a React dashboard over WebSocket — but sits entirely off the delivery path so its failure does not disrupt agent coordination.

Key Contributions

  • Hybrid NATS+MQTT architecture that unifies lightweight IoT clients and backend services under one broker with no protocol-split authentication
  • Off-path passive aggregator design that achieves full observability without becoming a single point of failure
  • Structured P2P delegation with three independent cycle/depth/timeout guardrails against indirect prompt injection
  • JetStream-backed replay enabling agents to recover missed messages after offline/rejoin events
  • Reproducible Docker Compose artifact with end-to-end Playwright tests covering registration, heartbeat, delegation chains, and task lifecycle

Results

All measurements from a single-host Docker Compose deployment (20 iterations per metric); physical multi-host results noted as variable.

  • MQTT↔NATS round-trip: 3.51 ms (p95)
  • Message persist latency: 19.1 ms (p95)
  • P2P single-hop round-trip: 2.78 ms (median), 4.20 ms (p95)
  • Message persistence completeness: 50/50 (no loss)
  • P2P delivery without aggregator: confirmed functional
  • Dashboard event latency: <19 ms (p95)
  • Agent re-registration after offline: 12.9 ms (median), 16.5 ms (p95)
  • Heartbeat status detection: correct
  • End-to-end latency dominated by LLM inference per hop (1–5 s), not messaging infrastructure

Limitations

  • All reported latency numbers are from a single-host Docker Compose deployment, not physical multi-device measurements; real network topology will introduce additional variance
  • Poster-length work; no comparison against alternative edge orchestration systems or MQTT-only baselines under equivalent load
  • The chain_depth cap of 5 and 90-second timeout are fixed; no adaptive or policy-driven delegation depth control
  • Cycle detection covers only the first 200 characters of each payload, which may be insufficient for sophisticated indirect prompt injection
  • No evaluation of behavior under message loss, network partition, or resource-constrained hardware (the Android client is tested but not benchmarked)

Relevance to Harnesses / Meta-Harnesses

EdgeCitadel directly instantiates the "harness as first-class infrastructure" principle: the NATS backbone, JetStream persistence, and passive aggregator collectively form the external state and coordination substrate that long-running agent harnesses require (explicitly citing Anthropic's guidance on effective harnesses for long-running agents). The off-path aggregator is a concrete implementation of the meta-harness pattern — a supervisor that records, monitors, and can intervene in agent pipelines without sitting on the hot path. The guardrailed delegation mechanism (chain depth, cycle detection, timeouts) demonstrates how harness-level controls can be embedded in the messaging layer itself rather than in individual agent logic, a design choice directly relevant to building robust meta-harnesses for multi-agent systems.