Swarm
Like
LangGraph for Swift — build stateful AI agent workflows natively on Apple/Linux platforms.
Cost / License
- Free
- Open Source (MIT)
Platforms
- Apple Swift

Swarm
Like
Features
- SwiftUI App
- Model Context Protocol (MCP) Support
- Swift App
- Crash recovery
- Agentic AI
Swarm information
No comments or reviews, maybe you want to be first?
What is Swarm?
A Swift framework for building agents and multi-agent workflows.
Chain LLMs, tools, and memory into production workflows -- with compile-time safety, crash recovery, and on-device inference.
Why Swarm?
- Swift concurrency is part of the surface. Swift 6.2 StrictConcurrency is enabled across the package.
- Tools stay type-safe. The @Tool macro generates JSON schemas from Swift structs.
- Workflows can survive crashes. Durable workflow checkpointing lets you resume from an explicit checkpoint ID.
- Cloud and on-device models use the same abstractions. Foundation Models, Anthropic, OpenAI, Ollama, Gemini, MiniMax, OpenRouter, and MLX all fit the same shape.
- It is written in Swift all the way down. AsyncThrowingStream, actors, result builders, and macros are first-class here.
Highlights:
- Compose Workflows Fluently: Build sequential, parallel, and routed workflows with Workflow().step(...).parallel(...).route(...).
- Data Races Are Compile Errors: Swift 6.2 StrictConcurrency on every target. Non-Sendable types crossing actor boundaries won't build.
- Workflows Survive Crashes: Advanced workflows can checkpoint and resume with explicit checkpoint stores and deterministic IDs.
- Semantic Memory -- On-Device: VectorMemory uses Accelerate SIMD for cosine similarity. No cloud API. No network call. Just fast local retrieval.
- Any LLM, Same Code: Foundation Models, Anthropic, OpenAI, Ollama, Gemini, MLX. Swap providers with inferenceProvider: at init.
- Production Resilience: Retry with 7 backoff strategies, circuit breakers, fallback agents, rate limiting, and per-step timeouts.
