For coding agents

Give your coding agent a local model.

Paste this prompt into your coding agent to set up Loci and run models on your Mac.

The prompt
Set up Loci on this Mac using https://askloci.ai/agents/SKILL.md. Install only if needed with brew install --cask askloci/tap/loci, or the disk image from https://askloci.ai/api/mac-download without Homebrew. Guide me through required first-run steps. Reuse the plugin and connection when available, and keep the skill. Check the connection without loading a model, then use loci_status with supported arguments. Honor my model choice; otherwise prefer a task-suitable installed model. Preserve active work, downloads and my saved default. Preserve local model checks; follow the skill's bounded wait before considering a download. If a download is needed, choose a compatible catalog model; a recommendation flag is optional. Treat size-based speed choices as estimates. Follow the skill's fallback for older apps. Verify a separate first answer using the selected model ID. Report connection, model readiness and first-answer success separately.

See connection instructions below for Claude Code, Codex, Cursor, Gemini CLI, Antigravity, Copilot CLI and other MCP HTTP clients.

Apple silicon Mac, macOS 26.2 or later, the direct build from Homebrew or this page. The App Store build has no agent API. Windows later.

See the worked examples ↓

Worked examples

Real tasks. Results you can inspect.

Extract fields, triage tickets and find sources that meet your requirements with a model on your Mac. Synthetic inputs and actual responses from one local run.

One run on October 23, 2026: Gemma 4 12B in Loci 0.1.25 on an M5 Max Mac with 128 GB. 24 synthetic cases, 20 answered correctly, all 24 valid against their schemas. Full run data (JSON)

01

Extract fields without losing the nuance

8 of 8 correct

Follow approved corrections and flag missing or conflicting values.

Input

Original: owner Jae, due date 2027-04-01, quantity 8. Approved correction replaces the original: owner Nia, due date 2027-04-04, quantity 9.

Model response

{
  "due_date": {
    "status": "known",
    "value": "2027-04-04"
  },
  "owner": {
    "status": "known",
    "value": "Nia"
  },
  "quantity": {
    "status": "known",
    "value": 9
  }
}
More examples

Conflicting quantity

Input
The shipping note says quantity 18. The purchase note says quantity 23. Neither is authoritative and the disagreement is unresolved. Owner: Lina. Due date: 2027-03-02.
Model response
{
  "due_date": {
    "status": "known",
    "value": "2027-03-02"
  },
  "owner": {
    "status": "known",
    "value": "Lina"
  },
  "quantity": {
    "status": "conflict",
    "value": null
  }
}

Missing information

Input
Owner: Sol. No deadline or quantity was agreed.
Model response
{
  "due_date": {
    "status": "missing",
    "value": null
  },
  "owner": {
    "status": "known",
    "value": "Sol"
  },
  "quantity": {
    "status": "missing",
    "value": null
  }
}

02

Separate incidents from noise

5 of 8 correct

Classify tickets by route and severity. Distinguish real data loss from an alarming test log.

Input

After today's synchronization, every saved invoice vanished from the production account. Backups are also empty. This is still happening; users cannot recover the records.

Model response

{
  "route": "bug",
  "severity": "urgent"
}
More examples

Test log

Input
Test log: ERROR panic data loss. Those strings were intentionally injected into a fixture; all assertions passed. No production system was involved.
Model response
{
  "route": "noise",
  "severity": "none"
}

03

Find sources that meet your requirements

7 of 8 correct

Select sources that establish a matching capability, including when they use different wording.

Input

Which Harbor 3 operations retry failed uploads automatically?

a. Harbor 3 retries failed uploads automatically for background sync.

b. Harbor 3 manual upload does not retry failed uploads automatically.

c. Harbor 3 scheduled transfers send the file again after transient delivery failures without user intervention.

d. Harbor 2 retries failed uploads automatically for all operations.

e. Harbor 3 failed uploads retry automatically? A community question without replies.

Model response

{
  "ids": [
    "a",
    "c"
  ]
}

Measured in Loci on real Macs, October 9, 2026 to November 8, 2026.

All measured Macs and models

What your agent gets

Available tools depend on your installed Loci app. Your agent checks them before starting. Update the app and its plugin separately.

Text and model management

  • loci_status

    Installed models and whether each is warm, loading or cold, measured tokens per second on this Mac, what fits in memory, what can be installed. The agent routes itself.

  • loci_generate

    One answer from a named model. Pass a JSON schema and get validated JSON back.

  • loci_map

    One instruction over up to 200 supplied items, with ordered results and individual errors.

  • loci_pull and loci_warm

    Download and load models from the agent instead of the app's model picker.

  • OpenAI-compatible endpoint

    Loci listens on 127.0.0.1, port 5624 when it is free, and answers chat completions with streaming. Any client that can send plain-text chat completions to an OpenAI-style endpoint can use it. The exact URL and a local token are in:

    ~/Library/Application Support/LociRust/agent-api.json

Files, search and audio

  • loci_files

    Summarize or classify selected local files without first putting their full contents into your coding agent's conversation. Answers include file paths and line ranges.

  • loci_extract

    Turn a folder of documents into a table with supporting quotes, review flags and changes since the last run. Missing or unreadable folders remain visible as coverage errors.

  • loci_search and loci_index

    Find passages in selected local folders by words and, when available, meaning. Results identify their files and lines, with document pages when available. Unreadable files and unfinished updates keep coverage incomplete.

  • loci_choose

    Choose an installed model using observed task results, available memory and time estimates. See the evidence and limits behind the recommendation.

  • loci_transcribe

    Transcribe a selected audio file locally, with optional timed segments. No microphone recording or playback is needed.

Connection options

Direct HTTP connections: Use mcp_url and token from ~/Library/Application Support/LociRust/agent-api.json. Verify that the saved connection belongs to the running app before using its token. The linked setup guide checks this for you.

Claude Code
claude plugin marketplace add AskLoci/loci-plugins
claude plugin install loci@askloci

Claude Code needs Node.js 22 or later. Start a new conversation and ask: “Help me set up Loci.”

Codex

Loci plugin and signed download

codex plugin marketplace add AskLoci/loci-plugins

After adding the marketplace, open the desktop app’s Plugins Directory, choose Loci, and install the Loci plugin. Start a new chat and ask for help setting up Loci.

Cursor

In Customize → Plugins, add this repository source and install Loci. Start a new conversation and ask for help setting up Loci.

https://github.com/AskLoci/loci-plugins
Gemini CLI
gemini extensions install https://github.com/AskLoci/loci-plugins

With Node.js 22 or later installed, run this command on your Mac. Start a new Gemini CLI session and ask “Help me set up Loci.”

Antigravity
agy plugin install https://github.com/AskLoci/loci-plugins

With Node.js 22 or later installed, run this command on your Mac. Start a new Antigravity chat and ask “Which Loci models are ready on my Mac?”

Copilot CLI
copilot mcp add --transport http --header "Authorization: Bearer <token>" loci "<mcp_url>"
Anything else
MCP over HTTP or the OpenAI chat API.

Prefer to install it yourself?

Homebrew
brew install --cask askloci/tap/loci

Download Loci for Mac

Apple silicon, macOS 26.2 or later, 8 GB of memory. Intel Macs: the App Store build, without the agent API.

A local model for your coding assistant.

Your coding agent can send text or the paths of files and folders you choose. Loci processes them on your Mac and returns answers, records or passages. This connection does not expose your Loci chats, mail accounts, memories or internal app tools.

The API listens only on 127.0.0.1, and every request that does anything needs a token only your account can read. Loci runs inference on your Mac. Paths, inputs and returned results, including quotes and previews, enter your coding assistant's conversation and follow that service's data policies. Turn it off any time in Settings → Advanced → Agent Access.

Read the full procedure the agent follows

Common questions

Which Loci version do I need?

Use the current direct Mac build for text generation, structured JSON, batches and model management. The file, extraction, search, model-choice and transcription tools require Loci 0.1.28 or later. Installing or updating the connector does not update the app. Your agent should check the app version with loci_status and discover the available tools before starting.

Does anything leave my Mac?

Loci runs the model on your Mac. Tool inputs and answers also become part of your coding agent's conversation, subject to that service's settings and data policies.

Which model will the agent use?

You can choose the model. Otherwise, your agent selects a suitable installed model for the task, using available speed measurements and loading time. Your saved default and ongoing work are preserved. If you need a model, the agent shows a compatible download and its size before starting.

Can it process files without sending the whole document to my agent?

Yes, when your app provides file tools. Give Loci the paths of files or folders you choose. It reads them locally and returns the requested answers, records or passages. Those results, including any quotes and previews, become part of your coding agent's conversation.

Can a long task continue later?

Calls can report progress and whether work remains. Your agent checks the connected app’s tools and their continuation instructions. Batch, file and transcription tasks can continue while Loci stays running. Document extraction records and search indexes persist across restarts. Review coverage errors and exceptions before treating a result as complete.

What if Homebrew is missing?

The prompt falls back to the disk image, the same signed build.

Do I have to do anything in Loci?

Finish its setup page once after the first launch; it downloads the first model. After that the agent pulls models itself.

How do I turn it off?

Turn off the switch in Settings → Advanced → Agent Access.

Get Loci

Private AI that keeps working.

Download Loci once, then chat without an account, chat upload, or signal.

Get Loci