---
title: "Swift SDK Code Agent SDK"
source: https://docs.autohand.ai/agent-sdk/swift
---

# Swift SDK

The Swift SDK is the native option in this set: provider-first, async by default, and built for Apple platform apps that want direct control over tools and loop behavior.

## Add the package

## Create a first agent

## Stream events

\`Runner.runStream()\` yields structured events as an async stream.

## Use a permission manager

## Loop strategies

-   \`.react\` for the default tool-using loop.
-   \`.planAndExecute\` for multi-step task planning.
-   \`.parallel\` for independent tasks that can fan out.

## Notes

-   The Swift SDK is not a CLI wrapper in the same way as TypeScript, Python, and Go. Provider configuration is passed directly in code.
-   Built-in tools, hook managers, and permission managers are native Swift types, which makes the SDK a good fit for desktop app integration.

## Next steps

-   Open \[Swift API\](/docs/agent-sdk/swift-api.html) for the reference surface.
-   Open \[Handle approvals and user input\](/docs/agent-sdk/io/approvals.html) for the review loop.