Back to directory

SwiftAgent

A type-safe, declarative Swift framework for building AI agent pipelines out of composable steps, built on Apple's FoundationModels, with structured output, permission and sandbox guardrails, and MCP support.

SwiftAgent

SwiftAgent lets a developer build an AI agent pipeline declaratively, composing a sequence of steps in a body property the way SwiftUI composes views, with the framework auto-synthesizing how each step runs; each step's output becomes the next step's input, forming a compile-time type-checked pipeline, and steps needing more complex control flow can override the run method directly instead.

It is built on Apple's FoundationModels for native on-device AI, generates typed structured output, and includes permission, sandbox and guardrail systems as safety mechanisms alongside Model Context Protocol integration, participant runtimes and a skills system. An optional trait adds alternative model providers, including OpenAI, Claude and Ollama, in place of Apple's own models.

It is distributed as a Swift package, requires Swift 6.4 or later with iOS 26 or macOS 26 or later, and installs by adding it as a Swift Package Manager dependency.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.