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.

View on GitHub ↗
Stars
★ 126
Last commit
29 Nov 2026
Maintenance
Active
Licence
BSD-3-Clause
Category
On-device AI SDKs
GitHub
john-rocky/coreai-kit

Overview

CoreAIKit (the repo is coreai-kit) picks the right build of a model for your device, downloads it from Hugging Face, caches it and runs it. The README describes Core AI as Apple's on-device ML runtime in iOS 27 and macOS 27, and the successor to Core ML. The package is a community project, not affiliated with Apple.

Most tasks take one line through the CoreAIOps module, for example CoreAI.transcribe, CoreAI.summarize, CoreAI.detect and CoreAI.speak. For more control there are ChatSession, KitLanguageModel, KitVisionModel and GraphModel. Every catalogue entry uses a fixed Hugging Face revision, and the author says each was compared with the original model on fixed inputs and run on real hardware before it was added.

coreai-kit is licensed under the BSD 3-Clause licence. Models have their own licences, shown on each catalogue entry.

Features

  • A catalogue of 80 models (as of release 0.8.0) for chat, vision, OCR, speech to text, text to speech, detection, depth, embeddings and more.
  • One-line task calls, including extract, translate and redact as well as the four above.
  • KitLanguageModel plugs a compatible Core AI chat bundle into the system LanguageModelSession, adding tool calling and guided generation. KitVisionModel adds image input.
  • Typed decisions: CoreAI.decide returns the probability of each answer without generating text. A systemone command-line tool serves them over HTTP (install with brew install john-rocky/tap/systemone).
  • A SwiftUI components library, a text-embeddings library for on-device retrieval, and a coreai-doctor tool that shows what an app will download.
  • Dozens of example apps (the README says 35), including chat, document reading, speech, detection and tool calling.
  • A security page that explains the trust boundary: the catalogue is fetched from GitHub and the model bundles from Hugging Face.

Requirements

  • Xcode 27, and macOS 27 or iOS 27 to run models. The README says to use a real device, because the Core AI framework is not in the iOS Simulator SDK.
  • Apps can deploy to macOS 26 or iOS 26 and check #available(macOS 27, iOS 27, *) before using it.
  • The first run downloads Qwen3 0.6B (about 352 MB on a Mac, 456 MB on an iPhone), so keep about 1 GB of disk free.
  • A sandboxed macOS app needs the Outgoing Connections entitlement.

Install

  1. In Xcode, choose File > Add Package Dependencies and paste https://github.com/john-rocky/coreai-kit, with Exact Version 0.8.0.

  2. Add the CoreAIOps product for the one-line calls (it includes CoreAIKit), or just CoreAIKit for ChatSession.

  3. To try it on a Mac without a project, clone the repo at tag 0.8.0, set DEVELOPER_DIR to Xcode 27, and run swift run -c release --package-path Examples/ChatDemo chat-cli --model qwen3-0.6b --prompt "What is the capital of Japan?".

Example

Import CoreAIOps and call try await CoreAI.transcribe(voiceMemoURL), then try await CoreAI.summarize(text). For a chat that keeps its history, create a ChatSession with the qwen3-0.6b model and stream its response. The README says a typed decision on its catalogue's laya model took about 70 ms on an iPhone 17 Pro (the author's own measurement).

Works with

Not stated by the source

Listed in

Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.

Report a correction

More in this category