Get the latest tech news

Show HN: SwiftAI – open-source library to easily build LLM features on iOS/macOS


Build beautiful and reliable LLM apps on iOS and MacOS - mi12labs/SwiftAI

🤖 Model Agnostic: Unified API across Apple's on-device models, OpenAI, Anthropic, and custom backends 🎯 Structured Output: Strongly-typed structured outputs with compile-time validation 🔧 Agent Tool Loop: First-class support for tool use 💬 Conversations: Stateful chat sessions with automatic context management 🏗️ Extensible: Plugin architecture for custom models and tools ⚡ Swift-Native: Built with async/await and modern Swift concurrency SystemLLM() creates Apple's on-device AI model reply(to:) sends your question and returns a String by default try await handles the asynchronous AI processing The response is wrapped in a response object - use.content to get the actual text reply() is stateless - each call is independent Chat is stateful - builds on previous conversation

Get the Android app

Or read this on Hacker News

Read more on:

Photo of iOS

iOS

Photo of LLM

LLM

Photo of macOS

macOS

Related news:

News photo

iOS 26: Remotely Control iPhone Camera With Your AirPods

News photo

iOS 26: Silence Wallet App Promo and Offer Notifications

News photo

iOS 26: Fine-Tune Podcast Playback Speeds