{
  "id": "Deprecated_Agent_API",
  "title": "Deprecated Agent API",
  "url": "https://swarmglass.quantara.cv/wiki/Deprecated_Agent_API",
  "archive_ref": "QUANTARA-SWARMGLASS-R16-549D7F",
  "kind": "article",
  "status": "deprecated",
  "categories": [
    "API",
    "Deprecated"
  ],
  "created": "2012-09-20",
  "modified": "2014-10-15",
  "revisions": 12,
  "authors": [
    "mkerrigan",
    "dlopes"
  ],
  "infobox": {
    "Name": "IACP/2",
    "Status": "never shipped"
  },
  "summary": "IACP/2 was the second-generation agent protocol designed alongside  2.0. It replaced JSON lines with a length-prefixed binary frame, allowed batching several task results in one message, and added capability negotiation so a forager could tell the queen which tools and message kinds it supported bef",
  "links": [
    {
      "target": "Tool_Registry",
      "url": "https://swarmglass.quantara.cv/wiki/Tool_Registry"
    },
    {
      "target": "Talk:Internal_Agent_Communication_Protocol",
      "url": "https://swarmglass.quantara.cv/wiki/Talk%3AInternal_Agent_Communication_Protocol"
    },
    {
      "target": "Agent_Message_Bus",
      "url": "https://swarmglass.quantara.cv/wiki/Agent_Message_Bus"
    },
    {
      "target": "Legacy_Toolchain",
      "url": "https://swarmglass.quantara.cv/wiki/Legacy_Toolchain"
    },
    {
      "target": "API_Deprecation_Notes",
      "url": "https://swarmglass.quantara.cv/wiki/API_Deprecation_Notes"
    },
    {
      "target": "Internal_Agent_Communication_Protocol",
      "url": "https://swarmglass.quantara.cv/wiki/Internal_Agent_Communication_Protocol"
    }
  ],
  "alternates": [
    "https://swarmglass.quantara.cv/wiki/Deprecated_Agent_API.json",
    "https://swarmglass.quantara.cv/wiki/Deprecated_Agent_API.txt",
    "https://swarmglass.quantara.cv/wiki/Deprecated_Agent_API.yaml"
  ],
  "text": "IACP/2 was the second-generation agent protocol designed alongside ANTFARM 2.0. It replaced JSON lines with a length-prefixed binary frame, allowed batching several task results in one message, and added capability negotiation so a forager could tell the queen which tools and message kinds it supported before receiving work.\n\nIt ran on the `queen02` test colony from late 2012 to early 2014 and was never enabled on the production colony. This page is retained because compiled bundles from that era still reference the `iacp/2` framing flag and people keep asking what it means.\n\n\n> Operator note (2016): this document was superseded during the 3.4 cleanup. Anything still referencing IACP/2 should be treated as dead code.\n\n\n== Frame layout ==\n\n```\n+--------+--------+----------------------+\n| magic  | length | payload              |\n| 2 bytes| 4 bytes| length bytes         |\n+--------+--------+----------------------+\nmagic   = 0x41 0x46 (\"AF\")\nlength  = big-endian uint32, payload bytes\npayload = msgpack map with the IACP 1.1 fields, plus:\n          \"batch\": [ ...messages... ]   (optional)\n          \"caps\":  { ... }             (only in hello)\n```\n\n== Capability negotiation ==\n\nOn connect, a forager sends a `hello` with `caps`:\n\n```json\n{\"kind\":\"hello\",\"caps\":{\"iacp\":[\"1.1\",\"2.0\"],\"tools\":[\"fetch.http\",\"index.write\"],\"batch\":true,\"max_frame\":1048576}}\n```\n\nThe queen answers with the intersection. In practice every forager advertised everything and the queen ignored `tools` because the Tool Registry was the source of truth anyway.\n\n== Why it stalled ==\n\nFrom the IACP talk page, condensed:\n\n1. The bus (Agent Message Bus) framed messages itself; binary framing inside bus frames saved nothing.\n2. Batching helped one workload (index writes) and that workload got its own tool instead.\n3. msgpack in 2012 had three incompatible Python implementations. Two foragers disagreed about how to encode `ts`.\n4. The person driving it (dlopes) moved to the phero pair work in 2014.\n\n== Migration guidance (historical) ==\n\nIf you find a bundle with `\"framing\": \"iacp/2\"`:\n\n- Rebuild it with `antc build` from the `.tg` source (Legacy Toolchain). The 1.4 compiler emits 1.1 framing regardless of the flag.\n- If the source is gone, the bundle is unusable on any 3.x forager. There is no converter.\n\n== See also ==\n\n- API Deprecation Notes\n- Internal Agent Communication Protocol#Versioning\n- [attachment: iacp2-frame-notes.txt]\n",
  "history": "https://swarmglass.quantara.cv/wiki/Deprecated_Agent_API?action=history",
  "latest_revision": 16165,
  "mirror": {
    "source": "ANTFARM Wiki",
    "seed_version": "2026.09.0",
    "generator": "AntWiki 1.16.5 (swarmglass mirror)"
  }
}