docs: Swarm — new wiki page covering multi-agent JAR composition
- New Swarm.md with the mechanism explained end-to-end:
ServiceLoader discovery, AgentProvider SPI, the three-step absorb
implementation (validation → wrap-as-tool → register + auto-enable),
runtime delegation diagram showing two-layer LLM dispatch, properties
preserved (personality, independence, two-layer observability,
no-type-erasure-trickery, single-JVM), multi-captain setups, and
documented constraints (String input only, single tool per sibling,
no cross-JAR static typing, no process isolation).
- _Sidebar.md adds the Swarm link under "LLM Integration".
- Agent-Deployment-Modes.md cross-references Swarm at the end of its
tradeoffs section as the natural multi-agent extension.
- API-Quick-Reference.md adds a Swarm section with the four
symbols (AgentProvider, Swarm.discover, Swarm.discover(loader),
Agent.absorb) in the same table format used elsewhere.
Refs: #984.
Add Agent Deployment Modes page
Same agent, three ways to ship it. Each mode is one line of glue away
from the next — a deliberate progression that lets agents earn their
way from embedded function to autonomous entity:
- Library — agent<IN, OUT>("...") { } in your JVM, in-process
- Hosted — + McpServer.from(agent).start() for an MCP endpoint
- Autonomous — fun main(args) = exitProcess(McpRunner.serve(...))
runs as its own process / JAR / Docker / native binary
The page covers all three with code, "best for" notes, an ASCII flow
diagram, and a 7-row tradeoff table (overhead, type safety, deploy
unit, scaling, isolation, language reach, ops cost). Closes with a
"progression" section explaining when to advance modes.
Sidebar and Home table updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>