afm

Launch a local macOS ML stack with an OpenAI-compatible API.

324|17|Updated Aug 8, 2025
One-click install
npx skills add https://github.com/scouzi1966/maclocal-api --skill afm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: afm
Source: https://github.com/scouzi1966/maclocal-api/tree/main/skills/afm
Command: npx skills add https://github.com/scouzi1966/maclocal-api --skill afm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AFM provides a local, OpenAI-compatible API server and CLI to host Apple Foundation Models, MLX backends, and Vision OCR, enabling on-device inference, API routing, and secure local workflows without cloud keys.

Core Features & Use Cases

  • Local on-device inference for Foundation and MLX models on macOS.
  • OpenAI-compatible endpoints for /v1/chat/completions and /v1/models with gateway/proxy capabilities.
  • Vision OCR, tool-calling, and streaming responses for offline or secure environments.

Quick Start

Build and run AFM locally to start serving via the afm CLI and connect a client to the local API.

Frequently Asked Questions about afm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run local ML inference on macOS with an OpenAI-compatible API?

You can run local ML inference on macOS with an OpenAI-compatible API by launching a local server that hosts Apple Foundation and MLX backends, exposing /v1/chat/completions endpoints for on-device model routing without cloud keys.

Can I use MLX models for offline OCR and tool-calling in secure environments?

Yes, MLX models support offline Vision OCR and tool-calling in secure environments by routing requests through a local API gateway, enabling streaming responses and on-device inference workflows without external network dependencies.

What's the best way to build an on-device inference pipeline for macOS Foundation Models?

The best way to build an on-device inference pipeline for macOS Foundation Models is deploying a local API gateway with a vendor patch workflow, supporting streaming responses and tool-calling directly through OpenAI-compatible endpoints.

Does macOS local ML support OpenAI API endpoints like /v1/models and /v1/chat/completions?

Yes, macOS local ML supports OpenAI API endpoints including /v1/models and /v1/chat/completions, allowing developers to connect existing OpenAI-compatible clients directly to local Foundation and MLX model backends.

Why use a local model gateway instead of cloud APIs for on-device inference?

Use a local model gateway instead of cloud APIs for on-device inference to eliminate cloud key dependencies, ensure secure offline operation, and apply vendor patch workflows for deploying MLX and Foundation models in restricted environments.