On-device AI SDKs for Swift and Apple developers

Swift packages, models, sample code and local servers for running AI on Apple hardware, mostly on device with Apple's Foundation Models framework, MLX or Core ML. They cover language models, speech, audio processing and vector search, plus command-line tools and OpenAI- or Ollama-compatible servers for Apple's on-device model. Packages that can also call cloud models are marked.

Works with
Maintenance
Sort
A growing collection, each with stars, licence and maintenance status
On-device AI SDKs

apfel

Command-line tool, chat mode and local OpenAI-compatible server for the on-device model in Apple's FoundationModels framework. Needs macOS 26 and Apple silicon.

★ 6.6k Active24 Nov 2026
On-device AI SDKs

Argmax OSS Swift (WhisperKit)

Argmax's open-source on-device speech toolkit for Apple silicon, and the home of WhisperKit.

★ 6.5k Active11 Oct 2026
On-device AI SDKs

MLX Swift Examples

Example apps and code showing how to use MLX Swift.

★ 2.7k Active9 Nov 2026
On-device AI SDKs

MLX Swift

Apple's Swift API for MLX, the array and machine-learning framework for Apple silicon.

★ 2.1k Active30 Nov 2026
On-device AI SDKs

CoreML-Models

Collection of models converted to Core ML packages, ready to use in iOS and macOS apps.

★ 1.9k Active19 Nov 2026
On-device AI SDKs

swift-transformers

Hugging Face's Swift package for tokenisers, model downloads and running models in Swift apps.

★ 1.4k Active6 Nov 2026
On-device AI SDKs

speech-swift

Speech toolkit for Apple silicon built on MLX: speech recognition, text-to-speech, voice activity detection and diarisation.

★ 1.3k Active4 Dec 2026
On-device AI SDKs

Foundation Models Framework Lab

Sample app and lab for building, testing and evaluating features with Apple's Foundation Models framework.

★ 1.2k Active28 Nov 2026
On-device AI SDKsCloud-capable

AnyLanguageModel

Hugging Face's drop-in replacement for Apple's Foundation Models API that also works with other local and cloud model providers.

★ 994 Active1 Dec 2026
On-device AI SDKs

MLX Swift LM

Run large language and vision-language models on device with MLX Swift.

★ 886 Active4 Dec 2026
On-device AI SDKs

MLX Audio Swift

Modular Swift SDK for audio processing with MLX on Apple silicon.

★ 826 Active20 Nov 2026
On-device AI SDKs

SwiftLM

A native Swift inference server for MLX models on Apple silicon, with an OpenAI-compatible HTTP API, SSD expert streaming for large MoE models, KV cache compression, and companion SwiftBuddy apps.

★ 805 Active4 Dec 2026
On-device AI SDKs

Foundation Models Utilities

Apple's repo of experimental patterns for building with the Foundation Models framework.

★ 589 Active2 Nov 2026
On-device AI SDKsCloud-capable

Xybrid

A cross-platform on-device AI toolkit, with a Swift package for iOS, that runs speech, language and vision models locally and can optionally fall back to cloud models.

★ 536 Active4 Dec 2026
On-device AI SDKsCloud-capable

Claude for Foundation Models

Anthropic's Swift package that plugs Claude into Apple's Foundation Models API, so the same session, streaming and tool-calling code can use Claude.

★ 379 Active7 Oct 2026
On-device AI SDKs

maclocal-api (afm)

The 'afm' CLI and local server that exposes Apple's Foundation Models (and MLX models) through an API.

★ 354 Active25 Oct 2026
On-device AI SDKs

SVDB

On-device vector database written in Swift, for semantic search inside apps.

★ 223 Slowing7 Dec 2025
On-device AI SDKs

CoreML-LLM

A Swift package for running converted large language models on the Apple Neural Engine with Core ML, including Gemma 4, Qwen and other bundles, with text, image, video and audio paths.

★ 210 Active19 Nov 2026
On-device AI SDKs

afm-Server

Menu bar app that serves Apple's on-device Foundation Models as an OpenAI-compatible local API.

★ 196 Slowing2 Jun 2026
On-device AI SDKs

olleh

Ollama-compatible command-line tool for Apple's Foundation Models.

★ 193 Active25 Nov 2026
On-device AI SDKsCloud-capable

swift-ai-sdk

A Swift port of the Vercel AI SDK. One API for text generation, streaming, structured output and tool calling across dozens of providers, with MCP tool support and middleware. Mostly cloud providers, not on-device.

★ 159 Active29 Nov 2026
On-device AI SDKsCloud-capable

System One for Apple Foundation Models

Swift package that plugs System One decision models into Apple's Foundation Models framework, so you get typed answers with confidence scores for @Generable types, either on device through Core ML or from hosted backends.

★ 131 Active29 Nov 2026
On-device AI SDKs

coreai-kit

A Swift package that downloads a Core AI model from a catalogue the author says is tested, caches it and runs it in your app. It has one-line calls for transcribe, summarise, detect and speak, plus chat and a FoundationModels integration. A community package that needs Xcode 27.

★ 126 Active29 Nov 2026
On-device AI SDKs

kokoro-coreml

A Swift package that runs the Kokoro-82M text-to-speech model on Core ML, across the Neural Engine, GPU and CPU, with a command-line demo and a Swift API. Speed figures are the author's own, and there are no tagged releases yet.

★ 81 Active4 Dec 2026
On-device AI SDKsCloud-capable

AnyDecisionModel

A Swift package by Mattt for getting typed decisions from a model, such as a probability, a choice or a score, instead of generated text. One interface covers several backends, including MLX, Core AI, Ollama, llama.cpp and Gemini.

★ 63 Active25 Nov 2026
On-device AI SDKs

preowned

A local HTTP server that puts the models built into macOS behind the OpenAI API, so any OpenAI client can use Foundation Models, Image Playground, NaturalLanguage embeddings, Speech and the system voices on your Mac.

★ 58 Active25 Nov 2026
On-device AI SDKs

GLiNER2Swift

A Swift package that runs the GLiNER2 and GLiNER2.5 information-extraction models on-device with MLX, covering named entities, classification, structured extraction and relations on Apple silicon.

★ 43 Active2 Dec 2026
On-device AI SDKs

swift-litert-lm

A Swift package for running Gemma 4 and other LiteRT-LM models on iPhone and Mac, with in-app download, Metal GPU inference, and an optional Apple Foundation Models backend on iOS 27.

★ 31 Active11 Nov 2026
On-device AI SDKsCloud-capable

Swift Language Models

A Swift package that plugs other providers' models into Apple's Foundation Models API, so OpenRouter and OpenAI models run in the same LanguageModelSession as Apple's on-device model.

★ 24 Active2 Dec 2026
On-device AI SDKs

Intents

A native macOS workbench for testing Apple's Foundation Models, with repeatable evaluation suites, execution traces, run comparisons, regression cases, resumable batches and an MCP server for coding agents.

★ 19 Active4 Dec 2026
On-device AI SDKs

ManifoldKit

A Swift package for adding an AI chat product to iOS and macOS apps: a SwiftUI chat view, a turn loop, SwiftData persistence, and local or cloud backends behind one protocol.

★ 11 Active21 Nov 2026
On-device AI SDKs

OpenJevSwift

A native Swift implementation of OpenJev: a Jev-compatible local HTTP server and Swift libraries for typed decisions on Apple Silicon, with a triage demo app. It is an early release (0.1.0) and is not affiliated with TypeSafe, Google or NVIDIA.

★ 10 Active18 Nov 2026
On-device AI SDKs

basalt

A pure Swift local LLM server for Apple silicon. It runs MLX models on Metal and serves OpenAI-compatible and Anthropic-compatible HTTP APIs plus MCP stdio, so Claude Code and other agents can use your Mac's GPU.

★ 9 Active5 Dec 2026
On-device AI SDKsCloud-capable

InferKit

An Objective-C inference toolkit, usable from Swift, that puts Core ML, MLX, Apple's Foundation Models or a remote endpoint behind one protocol, with optional serving to other machines on the network.

★ 4 Active4 Dec 2026