Modules
The SDK is split into focused modules. Add only what you need. Each module has its own dependency footprint.
Core
| Module | What it provides | Dependencies |
|---|---|---|
StrandsAgents |
Agent, tools, hooks, multi-agent (Graph, Swarm, A2A), session, MCP, @Tool macro, @StructuredOutput macro |
Foundation only |
StrandsAgentsMacros |
Compiler plugin backing @Tool and @StructuredOutput |
SwiftSyntax |
Model Providers
| Module | What it provides | Dependencies |
|---|---|---|
StrandsBedrockProvider |
AWS Bedrock ConverseStream (Claude, Titan, Llama, Mistral, and more) | aws-sdk-swift |
StrandsAnthropicProvider |
Anthropic Messages API direct integration | None |
StrandsOpenAIProvider |
OpenAI Chat Completions; also works with Groq, Together AI, and any compatible endpoint | None |
StrandsGeminiProvider |
Google Gemini API | None |
StrandsMLXProvider |
On-device LLM inference on Apple Silicon via MLX Swift LM | mlx-swift-lm |
Voice and Streaming
| Module | What it provides | Dependencies |
|---|---|---|
StrandsBidiStreaming |
Bidirectional voice agents: OpenAI Realtime, AWS Nova Sonic, Google Gemini Live | aws-sdk-swift |
StrandsMLXBidiProvider |
Fully on-device voice pipeline: STT + LLM + TTS on Apple Silicon | mlx-audio-swift |
Observability
| Module | What it provides | Dependencies |
|---|---|---|
StrandsOTelObservability |
OpenTelemetry tracing using gen_ai semantic conventions. Exports to Datadog, Jaeger, AWS X-Ray, or any OTLP backend. |
opentelemetry-swift |
Minimal Setups
Cloud agent
Package.swift: Cloud agentSwift
.target(
name: "MyApp",
dependencies: [
.product(name: "StrandsAgents", package: "strands-agents-swift"),
.product(name: "StrandsAnthropicProvider", package: "strands-agents-swift"),
]
)
Local inference agent
Package.swift: Local agent (Apple Silicon)Swift
.target(
name: "MyApp",
dependencies: [
.product(name: "StrandsAgents", package: "strands-agents-swift"),
.product(name: "StrandsMLXProvider", package: "strands-agents-swift"),
]
)
Full stack (Bedrock + observability + voice)
Package.swift: Full stackSwift
.target(
name: "MyApp",
dependencies: [
.product(name: "StrandsAgents", package: "strands-agents-swift"),
.product(name: "StrandsBedrockProvider", package: "strands-agents-swift"),
.product(name: "StrandsOTelObservability",package: "strands-agents-swift"),
.product(name: "StrandsBidiStreaming", package: "strands-agents-swift"),
]
)