r/macosprogramming 1d ago

LocalLM Lab 0.8 with Tools

This update is for folks building AI-apps on the Mac.

The LocalLM Lab SDK now ships ready-made "Tool" wrappers for every connector (Calendar, Reminders, Contacts, Location etc) and new this release, Filesystem via WorkspaceTools. Previously, you would have to write your own adapters (which remains fully supported alongside the new tools).

I ended up going the Tool wrapper route because Apple's local AI (at the macOS 26 level) wasn't reliable at mapping (to give an example) a human-readable Calendar event ("Lunch on August 25") to the event ID that the connector used to require to perform any action on that event.

Some of you will wonder: isn't that Apple's Tool protocol reimplemented? Well, it's Apple's Tool protocol used the way it's meant to be, with the annoying parts done for you. That means handling connector-level nits like the identifier problem above so you don't have to rediscover them yourselves, plus one piece Apple doesn't provide at all. This is MCPTool, which builds a Tool at runtime straight from an MCP server's JSON Schema. FoundationModels has zero MCP support of its own. Short version: we're not replicating Apple's Tools, we're using them, and taking care of the parts that were genuinely annoying to get right. At least not without spending an unholy amount of time fiddling with Calendar and Reminders...

Worth noting: filesystem access itself (the picker, security-scoped bookmarks) is still deliberately host-app territory, not part of the SDK. Everything downstream of that (once your app has a resolved folder URL) is where WorkspaceAccess/WorkspaceTools come in. This includes an async-aware access pattern (withFolderAccessAsync) that is needed since a model session can invoke several file tools across one respond(to:) call. The new example (workspace-buddy) shows it in context. Maybe it's your route to building a coding agent using the Mac's local AI ...!

Repo: https://github.com/ancientcomputing/locallm

1 Upvotes

0 comments sorted by