Your favourite AI agents, running entirely on your Mac
LocalEngine exposes an OpenAI-compatible REST API at
http://127.0.0.1:38680/v1. Point any
agent โ Codex, Claude Code, Aider, Continue, or your own tool โ at
that URL and every prompt stays on-device, private, and free.
Every prompt, every token, every completion stays on your Mac. No cloud, no telemetry, no logs on remote servers.
No rate limits
LocalEngine runs as fast as your Apple Silicon allows โ no token-per-minute caps, no API quotas, no throttling.
Zero cost inference
After the one-time App Store purchase, inference is free. No subscription, no per-token billing, no surprise charges.
Metal GPU acceleration
llama.cpp's Metal backend uses the full Apple Silicon GPU โ fast generation on M1 through M4 Max, even for large models.
Offline & air-gapped
Works without internet. Use agents on sensitive codebases in regulated environments or on planes โ no connection needed.
OpenAI-compatible API
Drop-in replacement for the OpenAI API. No custom SDK, no adapter layer โ just change the base URL and any agent works.
Integrations
Connect any agent in minutes
All it takes is one environment variable. Below are step-by-step
guides for the most popular AI coding agents.
OpenAI Codex CLI
Terminal-native AI coding agent
OpenAI-compatible
Codex CLI is OpenAI's open-source terminal agent that reads, writes, and executes code in a sandboxed environment. By pointing it to LocalEngine's OpenAI-compatible endpoint you get the full agentic loop โ file edits, shell commands, multi-step reasoning โ powered entirely by your local GGUF model.
Setup steps
Install Codex CLI: npm i -g @openai/codex
Set the environment variable to redirect API calls to LocalEngine
Specify any model name (LocalEngine uses whichever model is currently active)
Run codex and start coding โ every token stays on-device
OPENAI_BASE_URL=http://127.0.0.1:38680/v1
Example
# Point Codex at LocalEngine
export OPENAI_BASE_URL="http://127.0.0.1:38680/v1"
export OPENAI_API_KEY="local" # any non-empty string
# Launch Codex with your local model
codex --model local-model "Refactor this file to use async/await"
Claude Code
Anthropic's agentic coding assistant
OpenAI-compatible
Claude Code is Anthropic's agentic CLI that autonomously reads codebases, runs tests, writes code, and manages git โ all through conversation. With its OpenAI-compatible provider mode, you can redirect every call to LocalEngine so your codebase never touches a remote server.
Setup steps
Install Claude Code: npm i -g @anthropic-ai/claude-code
Configure the provider to point at LocalEngine's local endpoint
Set a dummy API key (LocalEngine doesn't require authentication)
Run claude in any project directory and work offline
ANTHROPIC_BASE_URL=http://127.0.0.1:38680/v1
Config: ~/.claude/settings.json
Example
# ~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:38680/v1",
"ANTHROPIC_API_KEY": "local"
},
"model": "local-model"
}
# Or via environment variables
export ANTHROPIC_BASE_URL="http://127.0.0.1:38680/v1"
export ANTHROPIC_API_KEY="local"
claude "Explain the architecture of this repo"
Pi (Inflection AI)
Personal AI assistant agent
OpenAI-compatible
Pi is a conversational personal assistant designed for natural dialogue and reasoning. Self-hosted Pi-compatible clients that speak the OpenAI chat API can connect directly to LocalEngine, giving you Pi-style interaction with full on-device privacy โ no subscription, no cloud, no data collection.
Setup steps
Choose any Pi-compatible client that supports custom API endpoints
Set the base URL to LocalEngine's local chat completions endpoint
Select a conversational model (e.g., Mistral, Llama 3, Phi-4)
Enjoy Pi-style dialogue entirely on your Mac โ offline and private
Open-source AI code assistant for VS Code & JetBrains
OpenAI-compatible
Continue is the leading open-source AI code assistant plugin for VS Code and JetBrains. It supports autocomplete, chat, and multi-file edits. Add LocalEngine as an OpenAI-compatible provider in your config.json and you get Copilot-level features running 100% offline on Apple Silicon.
Setup steps
Install the Continue extension in VS Code or JetBrains IDE
Open ~/.continue/config.json and add an OpenAI provider block
Point apiBase to LocalEngine and set any model name
Start autocomplete and chat โ fully offline, no usage limits
Aider is a powerful terminal-based AI pair programmer that automatically commits changes to git as you describe them in plain English. It works with any OpenAI-compatible endpoint โ swap in LocalEngine to make Aider fully offline, keeping every prompt, diff, and commit on your machine.
Setup steps
Install Aider: pip install aider-chat
Set OPENAI_API_BASE to LocalEngine's endpoint
Use --model openai/local-model to select your local model
Run Aider in your git repo โ commits are made locally, privately
OPENAI_API_BASE=http://127.0.0.1:38680/v1
Config: ~/.aider.conf.yml
Example
# ~/.aider.conf.yml
openai-api-base: http://127.0.0.1:38680/v1
openai-api-key: local
model: openai/local-model
# Or via CLI flags
aider \
--openai-api-base http://127.0.0.1:38680/v1 \
--openai-api-key local \
--model openai/local-model \
src/main.py
Hermes Agent
Open-source AI agent CLI with multi-provider support
OpenAI-compatible
Hermes Agent is an open-source AI agent CLI with built-in support for any OpenAI-compatible provider. Configure it once via ~/.hermes/config.yaml and you can run agentic tasks โ file operations, shell commands, multi-step reasoning โ entirely through LocalEngine's local endpoint.
Setup steps
Install Hermes Agent via the official installer or npm i -g hermes-agent
Run hermes model to open the interactive provider wizard
Select custom OpenAI-compatible endpoint and enter LocalEngine's URL
Or manually edit ~/.hermes/config.yaml to add the provider block below
Config: ~/.hermes/config.yaml
Example
# ~/.hermes/config.yaml
providers:
localengine:
base_url: http://127.0.0.1:38680/v1
api_key: local
# ~/.hermes/.env (keep secrets out of config.yaml)
LOCALENGINE_API_KEY=local
# CLI: set values directly
hermes config set providers.localengine.base_url http://127.0.0.1:38680/v1
hermes config set providers.localengine.api_key local
# Run Hermes with LocalEngine
hermes --provider localengine "Refactor the auth module"
OpenCode
Terminal AI coding agent by the SST team
OpenAI-compatible
OpenCode is a fast, keyboard-driven AI coding agent for the terminal, built by the SST team. It supports custom OpenAI-compatible providers via opencode.json. Drop in LocalEngine's address and all code edits, file reads, and shell commands run through your local model โ no internet required.
Setup steps
Install OpenCode: npm i -g opencode-ai
Create or edit ~/.config/opencode/opencode.json (global) or opencode.json in your project root
Add a custom provider block pointing to LocalEngine's endpoint
Run opencode in any project โ completions and edits stay fully on-device
curl ยท Python ยท Node ยท Swift โ just change the base URL
OpenAI-compatible
LocalEngine speaks the OpenAI REST protocol โ POST /v1/chat/completions, GET /v1/models, streaming via SSE โ so any library or tool that talks OpenAI works out of the box. Just change the base URL, set a dummy API key, and you're done.
Setup steps
Install the official OpenAI SDK for your language
Set base_url (or apiBase) to http://127.0.0.1:38680/v1
Pass any non-empty string as the API key
Use the same completion and streaming APIs โ no other changes needed
Example
# Python
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:38680/v1",
api_key="local",
)
stream = client.chat.completions.create(
model="local-model",
messages=[{"role": "user", "content": "Hello from LocalEngine!"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)
Architecture
How it works
1
Agent sends a requestCodex, Claude Code, or your script POSTs to http://127.0.0.1:38680/v1/chat/completions โ identical to the OpenAI API.
โ
2
LocalEngine receives it locallyThe macOS app intercepts the HTTP request. No data ever leaves your machine โ the network call never hits the internet.
โ
3
llama.cpp + Metal runs inferenceLlamaKit loads the active GGUF model and runs generation on the Apple Silicon GPU via the Metal backend. Tokens stream back in real time via SSE.
โ
4
Agent gets a streaming responseThe agent reads the streamed response just as if it came from api.openai.com โ it never knows the difference.
Get started today
One app. Unlimited local AI.
Download LocalEngine from the Mac App Store, open any GGUF model,
start the engine, and connect your agent in under two minutes.