{
  "id": "Agent_Message_Bus",
  "title": "Agent Message Bus",
  "url": "https://swarmglass.quantara.cv/wiki/Agent_Message_Bus",
  "archive_ref": "QUANTARA-SWARMGLASS-R5-402854",
  "kind": "article",
  "status": "current",
  "categories": [
    "ANTFARM Core",
    "Protocols"
  ],
  "created": "2010-06-11",
  "modified": "2014-11-30",
  "revisions": 22,
  "authors": [
    "dlopes",
    "mkerrigan"
  ],
  "infobox": {
    "Service": "phero",
    "Port": "7421",
    "Pattern": "pub/sub over TCP",
    "Delivery": "at-least-once",
    "Owner": "dlopes"
  },
  "summary": "The Agent Message Bus, universally called the phero bus (from pheromone; the ant theme was dlopes's idea and nobody stopped him), carries every IACP message in the colony. It is a small single-binary pub/sub broker written in 2010, replaced by nothing, and still running at retirement.",
  "links": [
    {
      "target": "Internal_Agent_Communication_Protocol",
      "url": "https://swarmglass.quantara.cv/wiki/Internal_Agent_Communication_Protocol"
    },
    {
      "target": "Tool_Registry",
      "url": "https://swarmglass.quantara.cv/wiki/Tool_Registry"
    },
    {
      "target": "Memory_Synchronization",
      "url": "https://swarmglass.quantara.cv/wiki/Memory_Synchronization"
    },
    {
      "target": "Orchestrator_Recovery",
      "url": "https://swarmglass.quantara.cv/wiki/Orchestrator_Recovery"
    },
    {
      "target": "Pheromone_Bus_Wire_Format",
      "url": "https://swarmglass.quantara.cv/wiki/Pheromone_Bus_Wire_Format"
    },
    {
      "target": "Configuration_Reference",
      "url": "https://swarmglass.quantara.cv/wiki/Configuration_Reference"
    },
    {
      "target": "Known_Agent_Bugs",
      "url": "https://swarmglass.quantara.cv/wiki/Known_Agent_Bugs"
    }
  ],
  "alternates": [
    "https://swarmglass.quantara.cv/wiki/Agent_Message_Bus.json",
    "https://swarmglass.quantara.cv/wiki/Agent_Message_Bus.txt"
  ],
  "text": "The Agent Message Bus, universally called the phero bus (from pheromone; the ant theme was dlopes's idea and nobody stopped him), carries every IACP message in the colony. It is a small single-binary pub/sub broker written in 2010, replaced by nothing, and still running at retirement.\n\n== Trails ==\n\nA trail is a topic. Trails are hierarchical and separated by dots:\n\n- `queen.` — control plane. only the queen publishes here.\n- `forager.<name>.` — one namespace per worker.\n- `tool.` — Tool Registry traffic.\n- `mem.` — cmsync traffic.\n- `ops.` — human-triggered messages from the ops console.\n\nSubscriptions are prefix matches. A forager subscribes to `queen.assign.<name>` and `queen.ctl.`; the queen subscribes to `forager.*`.\n\n== Delivery guarantees ==\n\nAt-least-once within a trail, in publish order per publisher. The broker keeps a bounded replay log per trail (`trail_log_size`, default 10,000 messages). A subscriber that reconnects presents its last-seen sequence number and gets a replay. If the gap exceeds the log, the subscriber gets `ctl.resync` and must do a full resync.\n\nThere is no exactly-once. Every consumer has to be idempotent, which is the single most repeated sentence on this wiki.\n\n== Wire format ==\n\nFraming and the exact byte layout are on Pheromone Bus Wire Format. Short version: 4-byte length prefix, then the IACP JSON line. The 2.0 \"binary framing\" work never shipped.\n\n== Operations ==\n\n- Broker config: `/etc/antfarm/phero.conf` — see Configuration Reference#phero.\n- Metrics: `http://phero-a.hm.internal:7421/stats` (plain text, one counter per line).\n- The broker never had authentication. See the note on Tool Registry#Security model.\n\n== Migration history ==\n\nThe bus moved hosts twice: from `queen01` to a dedicated `phero-a` in 2012, and to a pair (`phero-a`/`phero-b`) in 2014 that never actually ran as a pair because the failover script was never finished. The 2014 checklist is still around and is mostly accurate.\n\n\n\n== See also ==\n\n- Pheromone Bus Wire Format\n- Internal Agent Communication Protocol\n- Known Agent Bugs#phero\n",
  "history": "https://swarmglass.quantara.cv/wiki/Agent_Message_Bus?action=history",
  "latest_revision": 73904,
  "mirror": {
    "source": "ANTFARM Wiki",
    "seed_version": "2026.09.0",
    "generator": "AntWiki 1.16.5 (swarmglass mirror)"
  }
}