Skip to content

API Reference

The complete API reference covers every public type, protocol, and API in the Swarm framework.

Complete Reference

The Complete API Reference is a single document covering all subsystems:

  1. Overview & Architecture — What Swarm is, layer diagram, platform requirements
  2. Quick Start — Minimal working example
  3. Agents — All agent types, AgentRuntime protocol, configuration
  4. Tools@Tool macro, FunctionTool, tool chaining, parallel execution
  5. Workflow — Fluent core API (step, parallel, route, repeatUntil, timeout) plus namespaced advanced APIs (workflow.advanced)
  6. HandoffsHandoffConfiguration and handoff coordination
  7. Memory — All memory types, sessions, backends, embeddings
  8. Guardrails — Input/output/tool guardrails, tripwire modes
  9. Resilience — Retry, circuit breaker, fallback, timeout
  10. Observability — Tracers, trace events, spans, metrics
  11. MCP Integration — Client and server
  12. Providers — LLM providers, MultiProvider, Foundation Models
  13. Macros@Tool, @Parameter, @AgentActor, @Traceable, #Prompt, @Builder
  14. Hive Runtime — DAG compilation, checkpointing, resume

By Topic

TopicDescription
AgentsAgent types, configuration, @AgentActor macro
Tools@Tool macro, FunctionTool, runtime toggling
WorkflowFluent workflow composition and execution
HandoffsAgent handoffs and routing between runtime agents
MemoryConversation, Vector, Summary, SwiftData backends
StreamingAgentEvent streaming, SwiftUI integration
GuardrailsInput/output validation, tripwires
ResilienceRetry, circuit breakers, fallback, timeouts
ObservabilityTracing, OSLogTracer, SwiftLogTracer, metrics
MCPModel Context Protocol client and server
ProvidersInference providers, MultiProvider routing
Hive Swarm HardeningNon-fork run control, checkpoint capability, deterministic transcript/state hashing

Released under the MIT License.