# LocalLM Lab SDK > A free, Apache-2.0 Swift SDK for adding AI features to a macOS app: Apple's on-device model, open-weight models through MLX, and hosted models behind one API, with tools, MCP servers, a prompt cache and a security layer around every tool call. Current release: 3.0.0-GA (macOS 27 and Xcode 27 to build; Apple's on-device model also runs on macOS 26). The SDK's source is closed except Components and MCPAppsHost; you link its prebuilt frameworks. Read the docs below instead of recalling the API, and confirm names in api-surface.md before you write code. Rules that are easy to get wrong in 3.0: give every makeSession that has tools an authorizer (with none, anything that may change data is refused with a "DENIED" result and nothing throws); loading a model never downloads it, so check availability, validate, ask the user, then download; switch over the SDK's non-frozen enums with @unknown default; tools handed straight to Apple's LanguageModelSession(tools:) bypass the authorizer. AGENTS.md has the full list. ## Start here - [AGENTS.md](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/AGENTS.md): what a coding agent can't guess, in order of how often it goes wrong - [Quickstart](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/quickstart.md): a working SwiftUI chat in about 50 lines, and how to link the SDK - [API surface](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/api-surface.md): the generated list of every public name, signature and enum case. Confirm a name here before using it - [SDK guide](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/sdk-guide.md): the main developer guide: models and routes, sessions, connectors, tools, tool authorization, MCP, Components, App Sandbox and signing - [The tool authorizer](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/tool-authorizer.md): who decides whether a tool call runs, and the three ready-made authorizers - [Migrating to 3.0](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/migrating-to-3.0.md): what changed from 2.x, with the code to change ## Guides - [MCP client guide](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/mcp-guide.md): connecting to MCP servers, OAuth, tool results, trust, approval and changed tools - [Open-weight models with MLX](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/local-models-mlx.md): validate, download, pin and probe a model; the prompt cache - [Hosted models](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/remote-providers.md): GPT, Claude's online API, OpenRouter, any OpenAI-compatible server - [Decision models (Jev)](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/decision-models.md): typed questions with probabilities through lab.decide - [Security guide for host apps](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/security-guide-for-hosts.md): what the SDK does and what your app must do - [Security overview](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/security-overview.md): the short version - [Security model](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/security-model.md): threat model, controls and evidence, for reviewers - [MCP diagnostics](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/mcp-diagnostics.md): logging and the exportable buffer - [Glossary](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/glossary.md): every term in plain words - [Tested models](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/tested-models.md): a point-in-time snapshot; capabilityProbe is authoritative ## Examples - [Examples index](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/examples/README.md): which example to copy for which job - [Annotated examples](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/docs/annotated-examples.md): every reference app's source with the SDK's parts marked, and which authorizer each passes - [mcp-chat](https://github.com/ancientcomputing/locallm/tree/3.0.0-GA/examples/mcp-chat): a full SwiftUI chat with servers, tool-call rows and saved conversations - [plate-today-tools](https://github.com/ancientcomputing/locallm/tree/3.0.0-GA/examples/plate-today-tools): Calendar and Reminders with the ready-made tools ## Agent setup - [Skill: locallm-swift-app](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/skills/locallm-swift-app/SKILL.md): a skill for Claude Code and other agents, with a doc map and an example selector - [Build with an AI coding agent](https://thisbrain.ai/locallm/coding-agents.html): install steps and starter prompts ## Site pages - [MCP in your app](https://thisbrain.ai/locallm/mcp-sdk.html): the MCP client and the features around it - [MCP security in your app](https://thisbrain.ai/locallm/mcp-security.html): trust, approval, changed tools and what a server sends - [Choosing tools per turn](https://thisbrain.ai/locallm/tool-picker.html): how a chat with many tools picks the few each message needs - [The prompt cache](https://thisbrain.ai/locallm/prompt-cache.html): how follow-ups avoid rereading the conversation ## Optional - [CHANGELOG](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/CHANGELOG.md): every release, by module - [Roadmap](https://raw.githubusercontent.com/ancientcomputing/locallm/3.0.0-GA/ROADMAP.md) - [Repository](https://github.com/ancientcomputing/locallm/tree/3.0.0-GA): releases, docs and examples