Swarm
View on GitHubType-safe tools, on-device inference, multi-agent workflows, memory, and guardrails, in one Swift-native runtime
Swift-native agent runtime for building AI agents with type-safe @Tool macros, Apple Foundation Models on-device inference, composable sequential/parallel/routed workflows, memory, guardrails, streaming, MCP bridging, and OpenTelemetry tracing. Ships as a Swift Package for iOS, macOS, and Linux.
Use Cases
Build on-device AI agents for iOS and macOSCompose sequential, parallel, and routed multi-agent workflowsDefine type-safe tool schemas with the @Tool macroAdd conversation, sliding-window, vector, or hybrid memoryValidate agent inputs, outputs, and tool arguments with guardrailsStream agent lifecycle, thinking, and tool eventsBridge and discover MCP tools from Swift agentsCheckpoint and resume durable agent executionTrace agents with OpenTelemetry or Swift loggingRun local LLMs via Ollama or LM StudioShip a small CLI agent such as a code reviewerWeb-search chat agents with durable memory
Built With
- Language
- Swift
- Frameworks
- Swift Package Manager · Swift 6.2 Strict Concurrency · SwiftUI · SwiftData · swift-syntax · swift-log · OpenTelemetry · MCP Swift SDK · Apple Foundation Models · Ollama · LM Studio · OpenAI-compatible API
Tags
swift · agents · multi-agent · on-device-inference · foundation-models · mcp · memory · guardrails · streaming · workflows · type-safe-tools · ios · macos · linux · observability · offline-first