๐Ÿค– Agent Integrations

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.

Quick start export OPENAI_BASE_URL="http://127.0.0.1:38680/v1"

Zero data leakage

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

  1. Install Codex CLI: npm i -g @openai/codex
  2. Set the environment variable to redirect API calls to LocalEngine
  3. Specify any model name (LocalEngine uses whichever model is currently active)
  4. 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

  1. Install Claude Code: npm i -g @anthropic-ai/claude-code
  2. Configure the provider to point at LocalEngine's local endpoint
  3. Set a dummy API key (LocalEngine doesn't require authentication)
  4. 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

  1. Choose any Pi-compatible client that supports custom API endpoints
  2. Set the base URL to LocalEngine's local chat completions endpoint
  3. Select a conversational model (e.g., Mistral, Llama 3, Phi-4)
  4. Enjoy Pi-style dialogue entirely on your Mac โ€” offline and private
OPENAI_BASE_URL = http://127.0.0.1:38680/v1

Example

# Using any OpenAI-compatible client
curl http://127.0.0.1:38680/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer local" \
  -d '{
    "model": "local-model",
    "messages": [
      {"role": "user", "content": "Hi! Tell me something interesting."}
    ],
    "stream": true
  }'

Continue.dev

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

  1. Install the Continue extension in VS Code or JetBrains IDE
  2. Open ~/.continue/config.json and add an OpenAI provider block
  3. Point apiBase to LocalEngine and set any model name
  4. Start autocomplete and chat โ€” fully offline, no usage limits
Config: ~/.continue/config.json

Example

// ~/.continue/config.json
{
  "models": [
    {
      "title": "LocalEngine (local)",
      "provider": "openai",
      "model": "local-model",
      "apiBase": "http://127.0.0.1:38680/v1",
      "apiKey": "local"
    }
  ],
  "tabAutocompleteModel": {
    "title": "LocalEngine Autocomplete",
    "provider": "openai",
    "model": "local-model",
    "apiBase": "http://127.0.0.1:38680/v1",
    "apiKey": "local"
  }
}

Aider

AI pair programming in your terminal
OpenAI-compatible

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

  1. Install Aider: pip install aider-chat
  2. Set OPENAI_API_BASE to LocalEngine's endpoint
  3. Use --model openai/local-model to select your local model
  4. 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

  1. Install Hermes Agent via the official installer or npm i -g hermes-agent
  2. Run hermes model to open the interactive provider wizard
  3. Select custom OpenAI-compatible endpoint and enter LocalEngine's URL
  4. 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

  1. Install OpenCode: npm i -g opencode-ai
  2. Create or edit ~/.config/opencode/opencode.json (global) or opencode.json in your project root
  3. Add a custom provider block pointing to LocalEngine's endpoint
  4. Run opencode in any project โ€” completions and edits stay fully on-device
Config: ~/.config/opencode/opencode.json

Example

// ~/.config/opencode/opencode.json
{
  "provider": {
    "localengine": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "LocalEngine",
      "options": {
        "baseURL": "http://127.0.0.1:38680/v1",
        "apiKey": "local"
      },
      "models": {
        "local-model": {
          "name": "Local GGUF Model"
        }
      }
    }
  },
  "model": "localengine/local-model"
}

# Launch OpenCode
opencode

Any OpenAI SDK

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

  1. Install the official OpenAI SDK for your language
  2. Set base_url (or apiBase) to http://127.0.0.1:38680/v1
  3. Pass any non-empty string as the API key
  4. 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 request Codex, 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 locally The macOS app intercepts the HTTP request. No data ever leaves your machine โ€” the network call never hits the internet.
3
llama.cpp + Metal runs inference LlamaKit 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 response The 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.