Local Code is a free, open-source AI agent for the Mac that runs DeepSeek 4.1 Flash entirely on the device. Python, Node.js and a shell are built into the app, so the agent can analyze data, write documents and slide decks, and build software without sending a prompt to a cloud provider.
Draw Things, the team behind the image and video generation app of the same name, released Local Code on October 28 and published the source code on GitHub under the GPL-3.0 license. The download is a direct DMG from the Local Code site, and a Mac App Store release is coming soon.
The Top Model Wants 64GB of Memory and a 376GB Download
Local Code downloads its own quantized builds of each model and suggests one during setup based on the Mac’s memory. DeepSeek 4.1 Flash 1017 is the top pick from 64GB, DeepSeek 4 Flash 0731 from 48GB, and Qwen 3.8 27B below that. Qwen 3.8 27B starts at 16GB, while both DeepSeek models have a 32GB minimum.
The 2-bit version of DeepSeek 4.1 Flash 1017 is a 376GB download, and the 3-bit version is 412GB. The model has 763 billion parameters, far more than the memory of most Macs, so Local Code keeps the most-used experts in memory, never more than the Mac’s total memory minus 32GB, and streams the rest from the SSD.
DeepSeek 4 Flash 0731 is a text-only model at 89.4GB. Qwen 3.8 27B reads images and ranges from 9.6GB to 29.2GB depending on the quantization.
Other local agents ask for similar hardware. Junie Local needs an M5 Mac with 64GB, and Perplexity Computer recommends 36GB or more for its fully local mode.
In Draw Things’ own tests, DeepSeek 4.1 Flash 1017 runs at 346 tokens per second of prompt processing and 18.7 tokens per second of generation on an M5 Max with 128GB, with 8K of context already in use. On an M5 Ultra with 256GB the same model reaches 4,600 and 58.9. The 2-bit build scores 93.4 percent on GPQA Diamond and 30 of 30 on AIME 2026 in the same tests.
Prefill, the step where the model reads the conversation and any files before it answers, is often the longest wait in agent work. At 8K of context the M5 Ultra processes 4,600 tokens per second in Local Code, against 1,900 in MLX-Serve and 1,653 in oMLX, and at 128K it holds 3,840 against 1,087 and 1,335. Those engines ran 2.5-bit and 3-bit checkpoints that sit closer to the original model than Local Code’s 2-bit build, and the Local Code readings come from a second pass in the same session.
Running models on the device costs nothing per token. Cloud models from Anthropic, OpenAI, OpenRouter or any OpenAI-compatible server work with your own API keys at no markup, or with cloud credit that starts at $9.99 and needs no subscription. Choosing one sends prompts, file contents and tool output to that provider.
Local Code’s Agent Stays Inside Apple’s App Sandbox
The shell, the Python and Node.js runtimes and the command-line tools are compiled into the app and run in its own process under Apple’s App Sandbox and Hardened Runtime. The agent can read and write only in the workspace folder you choose, cannot see the rest of the disk, and cannot launch other apps. Web search, curl and ssh still reach the network when the agent runs them.
The built-in tools include Python 3.14 with NumPy, pandas and Matplotlib, Node.js 24, FFmpeg and LibreOffice, which creates, edits and converts Word, Excel, PowerPoint and PDF files. A WebKit browser lets the agent use sites that need a sign-in. The Draw Things command-line tool generates images and videos locally, and built-in skills handle charts, motion-graphics video made from HTML, and publishing a static site to a temporary public URL.
The agent can read and edit Calendar events and find, import, edit and organize Photos. On a Mac it can also read Notes, Mail and Messages, but it cannot change or send anything in them, and each of these needs your permission first.
Tasks and threads are saved, so you can close the app and resume later, and an interrupted reply picks up where it stopped. You can send a message mid-task to steer the agent, and the model’s context is cached to disk so a long conversation is not read again from the start.
The Source Is Open, but the Mac App Cannot Be Built Yet
Local Code’s source includes the app, its command-line tools and the libraries behind them, and it is synced from Draw Things’ private development repository. The Mac app is a Mac Catalyst build that needs a patched version of Bazel that has not been published, so it cannot be built from source yet.
LocalCodeCLI runs the same agents on a Mac without signing. The iPhone and iPad version builds with Bazel and Xcode once you add your own provisioning profile.
