Swift 6.0+ macOS 14+ · iOS 17+ Community

Strands Agents
Swift SDK

Build AI agents in Swift. A community implementation of the AWS Strands Agents framework with native Apple Silicon support.

What is Strands Agents?

Strands Agents is an open-source SDK by AWS for building AI agents. An agent combines a model, tools, and a system prompt inside a reasoning loop. The loop receives user input, calls the model, executes any tools the model requests, and repeats until it produces a final answer.

This Swift SDK supports the same core concepts as the official Python and TypeScript SDKs, with additional support for on-device inference via MLX and native Apple audio I/O for voice agents.

User Input Model Final Response
Tools (run concurrently, repeat until done)

Explore the Docs

Quick Example

main.swiftSwift
import StrandsAgents
import StrandsBedrockProvider

/// Count the number of words in a block of text.
@Tool
func wordCount(text: String) -> Int {
    text.split(whereSeparator: \.isWhitespace).count
}

let agent = Agent(
    model: try BedrockProvider(config: BedrockConfig(
        modelId: "us.anthropic.claude-sonnet-4-20250514-v1:0"
    )),
    tools: [wordCount]
)

let result = try await agent.run("How many words are in the Gettysburg Address?")
print(result.output)

Platform Support

FeaturemacOS 14+iOS 17+tvOS 17+
Core agent + tools
Cloud providers
MLX local inferenceApple SiliconN/AN/A
Voice agents (cloud)N/A
Voice agents (local)Apple SiliconN/AN/A