Workspace IndexKnowledge Notes › Local agentic AI on the Mac is a config change, not a rewrite — MLX puts an OpenAI-compatible server between any agent and Apple Silicon

#96PoC2026-09-19chat

Local agentic AI on the Mac is a config change, not a rewrite — MLX puts an OpenAI-compatible server between any agent and Apple Silicon

Apple Developer published a WWDC26 session, "Run local agentic AI on the Mac using MLX" (YouTube), walking through how to run a full agentic coding loop — model, tool calls, and the agent itself — entirely on Apple Silicon, with no cloud call and no API key (00:07, 00:13). The talk lays out a four-layer stack: MLX, the open-source array framework Apple built for Apple Silicon (02:52); mlx-lm, a CLI and Python API on top of it for loading, quantizing, and LoRA-fine-tuning models from Hugging Face (03:08); an mlx-lm HTTP server that speaks the OpenAI Chat Completions format, including structured tool calling and reasoning models (03:29); and, on top of that, any agent that already speaks that format — Xcode, Open Code, or a custom script — connected with no code changes (03:50). Three demos back this up: a local model reading a GitHub PR diff via the `gh` CLI and summarizing the change (01:37), the same model scaffolding an iPad drawing app in SwiftUI from a prompt, building it with `xcodebuild`, and fixing its own compile errors until the simulator runs (09:30, 10:01), and the model wired into Xcode itself as an Intelligence provider at `localhost:8080` to diagnose and patch a bug inside the IDE (11:46, 12:24).

For Jayverse this is the useful framing more than the specific demo: because the interface at every layer is the same OpenAI-compatible surface Rabbit, Verex, and any other tool already call, moving a workload from a hosted model to a local one is a base-URL change, not a rewrite — which is exactly what makes "local" a real option for data that should never leave the machine.

Why

The reason this needs its own hardware story, instead of just running any model that fits in RAM, is what an agent loop actually does to a prompt. A chat turn sends a few hundred tokens and gets a few hundred back. An agent turn re-reads the entire tool-call history — file contents, command output, diffs — every single time it decides what to do next, so a session that runs for a few minutes can push hundreds of thousands of tokens through the model (05:46, 06:09). Generating new tokens (decode) was never the bottleneck; reading that accumulated context back in (prefill) is, and prefill is compute-bound in a way decode is not. That is the honest cost of local agentic AI on a laptop-class chip, and it is why all three of the talk's accelerations target prefill and batching rather than raw model size.

How it works

The four-layer stack (02:40)

MLX provides Metal-accelerated array operations and unified memory management, so the CPU and GPU share the same memory pool without copies (02:52). mlx-lm sits on top as the model layer: load a Hugging Face model, quantize it to fit in memory, fine-tune it with LoRA, or start it as a server (03:08). The server layer adds the OpenAI-compatible HTTP API, tool calling, and reasoning-model support (03:29). The agent layer is deliberately generic — anything built against OpenAI's Chat Completions spec works unmodified once it points at localhost instead of a hosted endpoint (03:50).

Three accelerations, all aimed at prefill

  • M5 neural accelerators. The talk claims matrix multiplication throughput roughly 4x over M4, paired with MLX-specific attention kernels, for about a 4x improvement in prompt processing (06:18) — this is where the hundreds of thousands of re-read tokens get chewed through.
  • Continuous batching. An agentic workflow often runs several subagents at once — one exploring docs, one searching code, one writing tests. Continuous batching lets the GPU dynamically group their requests instead of queuing them one at a time (07:05, 07:25).
  • Thunderbolt RDMA distributed inference. A model too large for one Mac's memory can be split across several Macs connected by Thunderbolt or Ethernet (08:09). Starting in macOS 26.2, RDMA over Thunderbolt gives high-bandwidth, very-low-latency node-to-node transfer, which the talk claims yields up to roughly 3x at four nodes (08:46, 09:03).

The demos are the integration story, not the model story

None of the three demos — PR summarization, zero-to-simulator app scaffolding, in-IDE bug patching — depend on a new model capability; they depend on the OpenAI-compatible surface being wired into tools jay already uses (gh, xcodebuild, Xcode's own Intelligence settings).

Where it lands in Jayverse

  • Dark Horse: a local open-weight agent over the alice corpus. This is Level 1 of the Obsidian item (obsidian-three-levels-llm-wiki) made concrete — an mlx-lm server plus any OpenAI-compatible agent, running against alice's docs on jay's own Mac, no API key, no data leaving the machine.
  • Rabbit: mandates and key material are the MNPI case for local-only. Session-key mandates and signing material must never reach a third-party API; a local model via mlx-lm server is the only model class allowed near that data at all.
  • CI: local PR summaries, same shape as the demo. The gh-CLI-reads-a-diff demo (01:37) is a direct template for a pre-review summary step that never sends the diff to a hosted model.
  • Theory: quantization, unified memory, and batching as one topic. mlx-lm's quantize/LoRA path, MLX's unified memory model, and continuous batching are three entries in the same performance-engineering thread.
  • Eng: prefill vs. decode is an interview question. Being able to explain why agent workloads are prefill-bound and chat workloads are decode-bound is the kind of distinction a team-lead interview probes.

Verified and unverified

Verified on 2026-09-19: MLX is Apple's real open-source array framework for Apple Silicon with unified memory; mlx-lm is a real project providing model loading, quantization, LoRA fine-tuning, and an OpenAI-compatible server on top of MLX; Xcode does support adding local or OpenAI-compatible model providers for its Intelligence features. Taken from the summary and not independently checked: the M5-vs-M4 4x matmul and ~4x prompt-processing figures, the "macOS 26.2" Thunderbolt RDMA support claim, the 4-node/~3x distributed-inference figure, and all the timestamps.

Sources: YouTube — Apple Developer, "Run local agentic AI on the Mac using MLX" · related items: Tech #96 (Homa — Thunderbolt RDMA is the same low-latency interconnect story at desk scale), Life 1304 (ng-tasks-not-jobs-context-advantage), Tech #97, Tech #62 (agentic engineering writes the boundaries).

Key expressions

Words and phrases from this page worth keeping, with the Korean meaning and the sentence they come from.

Expression뜻 · 쓰이는 자리
MLXMachine Learning eXchange(Apple의 Apple Silicon용 오픈소스 어레이 프레임워크) · 스택의 최하단 계층. "MLX, the open-source array framework Apple built for Apple Silicon"
mlx-lmMLX 위의 언어모델 CLI·Python API(로드·양자화·LoRA 파인튜닝·서버 실행) · 스택의 모델 계층. "mlx-lm, a CLI and Python API on top of it"
CLICommand-Line Interface(명령줄 인터페이스) · mlx-lm과 gh, xcodebuild를 부르는 방식. "a CLI and Python API on top of it"
APIApplication Programming Interface(응용 프로그램 프로그래밍 인터페이스) · Python API, OpenAI Chat Completions API 모두 이 뜻. "a CLI and Python API"
HTTPHyperText Transfer Protocol(하이퍼텍스트 전송 프로토콜) · mlx-lm 서버가 여는 프로토콜. "an mlx-lm HTTP server"
OpenAI-compatibleOpenAI Chat Completions 규격과 호환됨 · 에이전트를 무수정으로 붙일 수 있게 하는 핵심 표면. "any agent that already speaks that format"
tool calling툴 콜(모델이 외부 함수·명령을 호출하도록 구조화된 출력을 내는 방식) · 에이전트 루프의 핵심 기능. "structured tool calling and reasoning models"
reasoning model추론 모델(중간 사고 과정을 거치는 모델 부류) · mlx-lm 서버가 지원하는 모델 종류. "structured tool calling and reasoning models"
LoRALow-Rank Adaptation(저순위 적응, 가벼운 파인튜닝 기법) · mlx-lm이 지원하는 파인튜닝 방식. "quantizing, and LoRA-fine-tuning models"
quantization양자화(모델 가중치를 더 적은 비트로 압축해 메모리를 줄이는 기법) · 로컬에서 큰 모델을 돌리기 위한 전제조건. "quantize it to fit in memory"
unified memory통합 메모리(CPU와 GPU가 복사 없이 공유하는 메모리 풀) · MLX·Apple Silicon의 핵심 이점. "unified memory management"
prefill프리필(프롬프트 전체를 모델에 통과시켜 컨텍스트를 읽어들이는 연산 단계) · 에이전트 워크로드의 실제 병목. "reading that accumulated context back in (prefill)"
decode디코드(새 토큰을 한 개씩 생성하는 단계) · prefill과 대비되는 개념, 채팅 워크로드의 병목. "Generating new tokens (decode) was never the bottleneck"
GPUGraphics Processing Unit(그래픽 처리 장치) · MLX의 Metal 가속과 continuous batching이 겨냥하는 하드웨어. "the GPU dynamically group their requests"
continuous batching연속 배칭(여러 요청을 대기열 없이 GPU에서 동적으로 묶어 처리하는 서빙 기법) · 가속 셋의 두 번째 항목. "Continuous batching lets the GPU dynamically group their requests"
RDMARemote Direct Memory Access(원격 직접 메모리 접근, 커널을 거치지 않는 고속·저지연 전송) · Thunderbolt로 여러 Mac을 묶는 분산 추론의 기반. "RDMA over Thunderbolt"
node노드(분산 시스템을 구성하는 개별 머신) · 4노드/3배 수치의 단위. "up to roughly 3x at four nodes"
PRPull Request(코드 변경 병합 요청) · 첫 번째 데모의 대상. "reading a GitHub PR diff via the gh CLI"
IDEIntegrated Development Environment(통합 개발 환경) · Xcode를 가리키는 일반 용어, 세 번째 데모의 무대. "to diagnose and patch a bug inside the IDE"
MNPIMaterial Non-Public Information(중요 비공개 정보) · Rabbit 랜딩에서 로컬 전용이어야 하는 데이터의 성격을 빗댄 표현. "mandates and key material are the MNPI case for local-only"
base URL베이스 URL(API 호출이 향하는 엔드포인트 주소) · 호스티드 모델에서 로컬 모델로 바꿀 때 실제로 바뀌는 유일한 것. "a base-URL change, not a rewrite"

← All Knowledge Notes · Workspace Index · Top ↑

Mac에서 로컬 에이전틱 AI는 재작성이 아니라 설정 변경이다 — MLX가 어떤 에이전트와 Apple Silicon 사이에 OpenAI 호환 서버를 둔다

Apple Developer가 WWDC26 세션 "Run local agentic AI on the Mac using MLX"(YouTube)를 공개했다. 클라우드 호출도, API 키도 없이 모델·툴 콜·에이전트까지 전체 에이전틱 코딩 루프를 Apple Silicon에서만 돌리는 법을 다룬다(00:07, 00:13). 강연은 4계층 스택을 제시한다. Apple이 Apple Silicon용으로 만든 오픈소스 어레이 프레임워크 MLX(02:52), 그 위에서 Hugging Face 모델을 로드·양자화·LoRA 파인튜닝하는 CLI와 Python API인 mlx-lm(03:08), 구조화된 tool calling과 추론 모델까지 지원하며 OpenAI Chat Completions 형식을 말하는 mlx-lm HTTP 서버(03:29), 그리고 그 위에서 이미 그 형식을 쓰는 모든 에이전트 — Xcode, Open Code, 커스텀 스크립트 — 를 코드 수정 없이 연결하는 에이전트 계층(03:50)이다. 데모 세 가지가 이를 뒷받침한다. `gh` CLI로 GitHub PR diff를 읽고 변경을 요약하는 로컬 모델(01:37), 같은 모델이 프롬프트만으로 SwiftUI iPad 드로잉 앱 구조를 짜고 `xcodebuild`로 빌드하며 컴파일 에러를 스스로 고쳐 시뮬레이터를 띄우는 과정(09:30, 10:01), 그리고 그 모델을 Xcode의 Intelligence 설정에 `localhost:8080` 공급자로 등록해 IDE 안에서 버그를 진단·패치하는 것(11:46, 12:24)이다.

Jayverse 입장에서 중요한 건 특정 데모보다 이 틀 자체다. 모든 계층의 인터페이스가 Rabbit, Verex 등 이미 호출하고 있는 것과 같은 OpenAI 호환 표면이기 때문에, 호스티드 모델에서 로컬 모델로 워크로드를 옮기는 일은 재작성이 아니라 base URL 하나 바꾸는 일이 된다 — 그래서 머신을 벗어나면 안 되는 데이터에 "로컬"이 실제 선택지가 된다.

RAM에 들어가는 아무 모델이나 돌리면 되는 게 아니라 이 일에 별도의 하드웨어 이야기가 필요한 이유는, 에이전트 루프가 프롬프트에 실제로 하는 일 때문이다. 채팅 한 턴은 수백 토큰을 보내고 수백 토큰을 받는다. 에이전트 한 턴은 다음에 뭘 할지 결정할 때마다 파일 내용·명령 출력·diff를 포함한 전체 툴 콜 이력을 다시 읽으므로, 몇 분짜리 세션 하나가 수십만 토큰을 모델에 통과시킬 수 있다(05:46, 06:09). 새 토큰을 생성하는 일(decode)이 병목이었던 적은 없고, 누적된 컨텍스트를 다시 읽어들이는 일(prefill)이 병목이며, prefill은 decode와 달리 연산 집약적이다. 이것이 노트북급 칩에서 로컬 에이전틱 AI가 치러야 하는 정직한 비용이고, 강연의 가속 세 가지가 모두 모델 크기가 아니라 prefill과 배칭을 겨냥하는 이유다.

동작 방식

4계층 스택 (02:40)

MLX는 Metal 가속 배열 연산과 통합 메모리 관리를 제공해, CPU와 GPU가 복사 없이 같은 메모리 풀을 공유한다(02:52). mlx-lm은 그 위의 모델 계층으로, Hugging Face 모델을 로드하고 메모리에 맞게 양자화하고 LoRA로 파인튜닝하거나 서버로 띄운다(03:08). 서버 계층은 OpenAI 호환 HTTP API, tool calling, 추론 모델 지원을 더한다(03:29). 에이전트 계층은 의도적으로 일반적이다 — OpenAI Chat Completions 규격으로 만들어진 것이라면 호스티드 엔드포인트 대신 localhost를 가리키기만 하면 무수정으로 동작한다(03:50).

모두 prefill을 겨냥한 가속 셋

  • M5 neural accelerators. 강연은 행렬 곱셈 처리량이 M4 대비 약 4배라 주장하며, MLX 전용 어텐션 커널과 결합해 프롬프트 처리가 약 4배 향상된다고 한다(06:18) — 다시 읽어야 하는 수십만 토큰이 여기서 처리된다.
  • Continuous batching. 에이전틱 워크플로는 흔히 서브 에이전트 여러 개를 동시에 돌린다 — 문서를 탐색하는 것, 코드를 검색하는 것, 테스트를 작성하는 것. Continuous batching은 이들의 요청을 순서대로 큐에 세우는 대신 GPU에서 동적으로 묶는다(07:05, 07:25).
  • Thunderbolt RDMA 분산 추론. 한 Mac의 메모리보다 큰 모델은 Thunderbolt나 이더넷으로 연결된 여러 Mac에 나눠 올릴 수 있다(08:09). macOS 26.2부터 Thunderbolt 위의 RDMA가 고대역폭·초저지연 노드 간 전송을 제공하며, 강연은 4노드 기준 최대 약 3배라 주장한다(08:46, 09:03).

데모는 모델 이야기가 아니라 통합 이야기다

PR 요약, 제로베이스 앱 스캐폴딩, IDE 내 버그 패치 — 세 데모 모두 새로운 모델 능력이 아니라, OpenAI 호환 표면이 jay가 이미 쓰는 도구(gh, xcodebuild, Xcode의 Intelligence 설정)에 연결되어 있다는 사실에 의존한다.

Jayverse에서의 위치

  • Dark Horse: alice 코퍼스 위의 로컬 오픈웨이트 에이전트. Obsidian 항목(obsidian-three-levels-llm-wiki)의 레벨 1을 구체화한 것 — mlx-lm 서버와 아무 OpenAI 호환 에이전트를 jay 자신의 Mac에서 alice 문서 위에 돌리는 것, API 키 없이, 데이터가 머신을 떠나지 않고.
  • Rabbit: 만다이트와 키 자재가 로컬 전용이어야 하는 MNPI급 사례. 세션 키 만다이트와 서명 자재는 절대 제3자 API에 닿으면 안 된다. mlx-lm 서버를 통한 로컬 모델만이 그 데이터 근처에 허용되는 유일한 모델 부류다.
  • CI: 데모와 같은 모양의 로컬 PR 요약. gh CLI가 diff를 읽는 데모(01:37)는 diff를 호스티드 모델에 전혀 보내지 않는 리뷰 전 요약 단계의 직접적인 템플릿이다.
  • Theory: 양자화·통합 메모리·배칭은 한 주제다. mlx-lm의 양자화/LoRA 경로, MLX의 통합 메모리 모델, continuous batching은 같은 성능 엔지니어링 스레드의 세 항목이다.
  • Eng: prefill 대 decode는 면접 질문이다. 에이전트 워크로드가 왜 prefill 바운드이고 채팅 워크로드가 왜 decode 바운드인지 설명할 수 있는 것은 팀 리드 면접이 찔러보는 종류의 구분이다.

확인된 것과 미확인

2026-09-19 확인: MLX는 통합 메모리를 갖춘 Apple의 실제 Apple Silicon용 오픈소스 어레이 프레임워크이고, mlx-lm은 모델 로딩·양자화·LoRA 파인튜닝과 MLX 위의 OpenAI 호환 서버를 제공하는 실제 프로젝트이며, Xcode는 Intelligence 기능에 로컬/OpenAI 호환 모델 공급자를 추가하는 기능을 실제로 지원한다. 강연 요약에서 가져왔고 독립 확인하지 않은 것: M5 대 M4 행렬 곱셈 4배와 프롬프트 처리 약 4배 수치, "macOS 26.2" Thunderbolt RDMA 지원 주장, 4노드/약 3배 분산 추론 수치, 모든 타임스탬프.

출처: YouTube — Apple Developer, "Run local agentic AI on the Mac using MLX" · 관련 항목: Tech #96(Homa — Thunderbolt RDMA는 책상 규모의 같은 저지연 인터커넥트 이야기), Life 1304(ng-tasks-not-jobs-context-advantage), Tech #97, Tech #62(에이전틱 엔지니어링은 경계를 쓴다).

핵심 표현

이 페이지의 영어 본문에서 배울 만한 단어와 표현, 뜻과 나온 자리.

Expression뜻 · 쓰이는 자리
MLXMachine Learning eXchange(Apple의 Apple Silicon용 오픈소스 어레이 프레임워크) · 스택의 최하단 계층. "MLX, the open-source array framework Apple built for Apple Silicon"
mlx-lmMLX 위의 언어모델 CLI·Python API(로드·양자화·LoRA 파인튜닝·서버 실행) · 스택의 모델 계층. "mlx-lm, a CLI and Python API on top of it"
CLICommand-Line Interface(명령줄 인터페이스) · mlx-lm과 gh, xcodebuild를 부르는 방식. "a CLI and Python API on top of it"
APIApplication Programming Interface(응용 프로그램 프로그래밍 인터페이스) · Python API, OpenAI Chat Completions API 모두 이 뜻. "a CLI and Python API"
HTTPHyperText Transfer Protocol(하이퍼텍스트 전송 프로토콜) · mlx-lm 서버가 여는 프로토콜. "an mlx-lm HTTP server"
OpenAI-compatibleOpenAI Chat Completions 규격과 호환됨 · 에이전트를 무수정으로 붙일 수 있게 하는 핵심 표면. "any agent that already speaks that format"
tool calling툴 콜(모델이 외부 함수·명령을 호출하도록 구조화된 출력을 내는 방식) · 에이전트 루프의 핵심 기능. "structured tool calling and reasoning models"
reasoning model추론 모델(중간 사고 과정을 거치는 모델 부류) · mlx-lm 서버가 지원하는 모델 종류. "structured tool calling and reasoning models"
LoRALow-Rank Adaptation(저순위 적응, 가벼운 파인튜닝 기법) · mlx-lm이 지원하는 파인튜닝 방식. "quantizing, and LoRA-fine-tuning models"
quantization양자화(모델 가중치를 더 적은 비트로 압축해 메모리를 줄이는 기법) · 로컬에서 큰 모델을 돌리기 위한 전제조건. "quantize it to fit in memory"
unified memory통합 메모리(CPU와 GPU가 복사 없이 공유하는 메모리 풀) · MLX·Apple Silicon의 핵심 이점. "unified memory management"
prefill프리필(프롬프트 전체를 모델에 통과시켜 컨텍스트를 읽어들이는 연산 단계) · 에이전트 워크로드의 실제 병목. "reading that accumulated context back in (prefill)"
decode디코드(새 토큰을 한 개씩 생성하는 단계) · prefill과 대비되는 개념, 채팅 워크로드의 병목. "Generating new tokens (decode) was never the bottleneck"
GPUGraphics Processing Unit(그래픽 처리 장치) · MLX의 Metal 가속과 continuous batching이 겨냥하는 하드웨어. "the GPU dynamically group their requests"
continuous batching연속 배칭(여러 요청을 대기열 없이 GPU에서 동적으로 묶어 처리하는 서빙 기법) · 가속 셋의 두 번째 항목. "Continuous batching lets the GPU dynamically group their requests"
RDMARemote Direct Memory Access(원격 직접 메모리 접근, 커널을 거치지 않는 고속·저지연 전송) · Thunderbolt로 여러 Mac을 묶는 분산 추론의 기반. "RDMA over Thunderbolt"
node노드(분산 시스템을 구성하는 개별 머신) · 4노드/3배 수치의 단위. "up to roughly 3x at four nodes"
PRPull Request(코드 변경 병합 요청) · 첫 번째 데모의 대상. "reading a GitHub PR diff via the gh CLI"
IDEIntegrated Development Environment(통합 개발 환경) · Xcode를 가리키는 일반 용어, 세 번째 데모의 무대. "to diagnose and patch a bug inside the IDE"
MNPIMaterial Non-Public Information(중요 비공개 정보) · Rabbit 랜딩에서 로컬 전용이어야 하는 데이터의 성격을 빗댄 표현. "mandates and key material are the MNPI case for local-only"
base URL베이스 URL(API 호출이 향하는 엔드포인트 주소) · 호스티드 모델에서 로컬 모델로 바꿀 때 실제로 바뀌는 유일한 것. "a base-URL change, not a rewrite"

← 전체 기술 노트 · 워크스페이스 인덱스 · 맨 위 ↑