AI tools in depth
Each chat's own tool, what Locus can do with each tool, and the tools it finds and starts itself
Each chat has its own AI tool, shown under AI tool for this chat in Models. Use for this chat moves only the chat you are in, from any paired phone. New chats get the computer's default, which locus use sets on the computer, or Make default on a phone that may add or remove devices. More in Each chat's AI tool.
Each chat's AI tool
- Use for this chat under "AI tool for this chat" moves only that chat, from any paired phone; it asks
nothing, because nothing else moves. Two chats, on one phone or on two, can answer from two tools at the same
time.
/tooland a name in a chat does the same. - The default is the tool new chats get (and apps through /v1). Change it
with
locus useon the computer, or Make default on this chat's tool. Only a phone that may add or remove devices sees Make default and Other… (which adds an address for this chat). Changing the default moves no chat and stops no tool. - Also in memory on this PC lists the models the other tools hold, with Unload after a question. While a tool answers a chat it says so, and nothing is unloaded.
- One model loads at a time on the whole computer, whatever the tool, and one model downloads at a time. An answer in one tool never blocks another tool. Before a load unloads a model that another chat used in the last 10 minutes, the phone asks, in plain words that never name a chat or a device.
- When a chat's tool is not running, the line above the message box says so, with Choose another; your message waits in the box.
- The list of tools shows at once, even while a tool is busy: a tool writing an answer keeps its row and says so
("answering a chat"), and a tool that does not answer in time is listed as "Not answering yet".
locus lsandlocus statusdo not wait on a busy tool either. - A chat made before this version has no tool yet: it shows the default and keeps the tool of its first answer.
Tool by tool
| Tool | Models listed | Load, unload, context | Get a model | Pictures | Started by Locus |
|---|---|---|---|---|---|
| LM Studio | Yes | Yes | Hugging Face GGUF, into LM Studio's models folder | Models LM Studio marks as vision models | No (on Windows, Locus tries to start LM Studio's server when it does not answer) |
| Ollama | Yes | Yes | Hugging Face, or a name from the Ollama library; Ollama downloads it | Models with Ollama's "vision" capability | No |
| llama.cpp, KoboldCpp started by Locus | Yes: Locus's own models folder | Yes: Load starts the tool, Unload stops it | Hugging Face GGUF, into Locus's models folder | A model downloaded with its image reader | Yes, once Locus has found the tool running, or after locus manage (not KoboldCpp on Linux) |
| Your own llama.cpp server or KoboldCpp | The model it serves | In the tool itself | Yes, into Locus's models folder: Load then moves this chat to Locus's own copy | The server's answer tells | No: Locus never starts or stops it |
| Jan | The models it serves | In Jan | No: in Jan | The server's answer tells | No |
| Strata | Yes | Strata's own model list, load and unload: on the developer's computer only for now | Strata's own installer: on the developer's computer only for now | When Strata runs with its picture reader | No |
| Any OpenAI-compatible server | The models it serves | In the tool itself | No | The server's answer tells | No |
- An OpenAI-compatible server cannot say which model is loaded, so Locus counts every model it lists as ready. Models whose name says "embed" are not offered in a chat.
- Ollama: embedding models and Ollama's cloud models are never offered in a chat (a cloud model would take the chat off your computer). A model without Ollama's "tools" capability cannot be used with shared folders or Web: Locus says so before it asks.
- Before a download, each model says whether it fits this computer's memory ("fits", "fits after unloading …", "does not fit this PC", with what it needs against what the computer has). Any size can still be downloaded.
A tool that asks for an access key
Some servers (Jan with an API key, for example) ask for a key. Give it once: in the address field under
Other… in Models, or with locus use <name or address> --key on the computer. Locus keeps it
on the computer and sends it only to that tool. When the tool refuses a key, Locus says so in its own words and never
passes on the tool's answer, which could repeat the key.
The tools Locus starts itself
Locus can start and stop llama.cpp's llama-server and KoboldCpp. You install the tool and start it once
yourself; Locus finds it and registers it by itself. The phone then picks a model, Locus starts its own copy of the
tool with it and stops it when the model is unloaded. LM Studio and Ollama keep working as before.
Set it up
- Install the tool. Windows: llama.cpp's WinGet package, or a release from github.com/ggml-org/llama.cpp (the
build for your graphics card: CUDA, Vulkan, or CPU only). macOS:
brew install llama.cpp, the easiest, because macOS does not block Homebrew's copy. Linux: a release, or your own build. - Start it once yourself, as usual, from your desktop. Locus finds it running and registers it by itself; a notification on the computer says so ("Locus found llama.cpp …"). No command and no restart are needed.
How Locus finds it. Locus looks at the usual ports (8080 and 9931 for llama.cpp, 5001 for KoboldCpp) when it
starts, at any port where the phone's list of tools hears one of them answer, and at every port on 127.0.0.1 where a
program of your own account named llama-server* or koboldcpp* listens. Only the operating
system decides: Locus asks it which program listens there and checks that it runs under your own account. A copy
started with "Run as administrator", or by a service, a remote shell, a scheduled task or another account, is not
taken: Locus says which, and asks you to start it again the usual way. Another app's own copy (Ollama, Jan and LM
Studio run their own llama-server) is never taken. The checks are those of locus manage. Then
locus manage, locus status and locus doctor say "registered by Locus itself".
On macOS and Linux this finding was tested against stand-ins only so far.
By hand, if you like. locus manage llamacpp --exe <path of llama-server>
(options) registers a program you name; a running Locus takes it in at
once, without a restart. On Windows the command is "%LOCALAPPDATA%\Locus\run\locus.cmd".
locus manage <tool> --off says no: Locus remembers that program and does not register it again by
itself, also after a restart or an update; --auto takes the no back.
KoboldCpp. On Windows, Locus never runs KoboldCpp's one-file koboldcpp.exe itself: it prepares
it once instead, by itself when it finds your KoboldCpp running, or with
locus manage koboldcpp --exe <path of koboldcpp.exe>. It unpacks a private copy into
%LOCALAPPDATA%\Programs\Locus (about a minute, no window; it needs about 2.5 GB free and the result is
about 1 GB), checks and registers its koboldcpp-launcher.exe, and leaves your own running KoboldCpp
untouched. Meanwhile the phone says "Locus is preparing KoboldCpp for its first start". If your
koboldcpp.exe is in a folder other accounts may change, Locus takes it only while your own KoboldCpp runs
from it. On a Mac, register koboldcpp-mac-arm64 as you downloaded it: it unpacks about 140 MB at every
start, so a load takes a few seconds more. On Linux, Locus does not start KoboldCpp yet: use llama.cpp. Running
KoboldCpp from its Python source is not supported. --backend auto|cuda|vulkan|cpu chooses where it runs
(on a Mac, auto or cpu).
On the phone
- One row per tool. "llama.cpp" stands for a llama-server you started yourself and Locus's own copy together (the same for KoboldCpp); its line says which one this chat uses ("This chat: …"). Its Use for this chat goes to your own running copy first, else to Locus's.
- Get a model searches Hugging Face and downloads GGUF files into Locus's models folder. Load starts the tool with the model and a context you choose, up to the model's own maximum; the phone shows "Starting" until it answers. Unload stops the tool.
- Beside your own copy. While a llama.cpp server or KoboldCpp you started yourself is in use, Get a model works there too. Locus knows the tool by what it says about itself, or else by its usual port (8080 or 9931 for llama.cpp, 5001 for KoboldCpp); what a tool says about itself only names it and never makes Locus start a program. The models are listed under "In Locus's models folder on the PC", each with Load, and never offered in the chat's model list while your own copy is in use: your own copy cannot run them.
- Load on one of them asks once ("Load <model> in Locus's llama.cpp?"), then Locus starts its own copy
with that model and uses it for this chat; other chats and the default keep their tool. Your own copy keeps
running, with its memory: close it yourself to free that memory. Locus's own copy is the one it registered when it
found yours running (the Load waits up to 10 seconds for that), or the one you set up with
locus manage. Everything is checked before anything changes; if a check fails, the phone says why and your own copy stays in use. - Only a phone that may add or remove devices can do this Load for now. Other phones are told so and nothing changes.
- Back to your own copy: "Your own copy on this PC" appears in Models while this chat uses Locus's copy; its Use moves this chat back to yours. Locus's own copy keeps its model in memory until you Unload it (another chat may still use it).
Downloads
Every download into Locus's models folder keeps a free-space reserve on the disk (10 GB or 5 % of it, whichever is more), takes the exact version pinned on Hugging Face, checks each file against Hugging Face's checksum, and runs one at a time for all the tools. A model can come with its image reader. Models that need a Hugging Face access token are not supported. A download goes on whichever tool a chat uses, and resumes by itself after a restart.
The models folder
Both tools share one folder: models in Locus's data folder (on Windows
%LOCALAPPDATA%\Locus\data\models, on C:), or the one you gave with --models. Each model sits
in <models folder>\<publisher>\<repository>\; Locus keeps its list in
locus-models.json there and lists only the models it downloaded itself. List and remove them with
locus models; a phone cannot remove a model.
Limits
- One model at a time. Each tool Locus starts runs one model: loading another model stops the one that runs; the phone asks first.
- After you update the tool. Locus checks the program again with every rule and pins it again by itself at
the next Load. If a check fails, the Load is refused in plain words, and
locus manage <tool> --repinsays why. - The memory check counts ordinary memory (RAM) only. Before a start, Locus works out what the model and its context need and refuses when that does not fit in the free RAM at that moment, which already counts what your own copy holds. It does not count the graphics card's memory: a model can fit the RAM and still not fit the card, and the tool then stops with an out-of-memory error. Choose a smaller context or model, or fewer GPU layers. On a Mac with Apple silicon the graphics share the RAM, so the check covers both; there "free" means what macOS can give back at once, less than Activity Monitor shows, on purpose, and Locus also keeps 1.5 GB of working space and 2 GB for the system: on a busy 16 GB Mac, close other programs before loading a model.
- Start limit. Locus starts a tool at most 10 times in 10 minutes. After 3 starts in 10 minutes that fail
(or a tool that stops by itself), it waits 5 minutes and tells the phone when to try again.
locus restartclears the limit. - No automatic restart. A tool that stops by itself (usually memory or the graphics driver) stays stopped until a model is loaded again.
- After a restart of Locus. If a model was loaded when Locus stopped cleanly (
locus restart,locus stopthenlocus start, an update), Locus loads it again with the same tool and context, through the same checks. Not if it was unloaded, not if the tool stopped by itself or failed to start, and not if Locus did not stop cleanly (a crash, a freeze, a power cut): the model may have been the cause, so it is never retried at every start. - macOS may block a program downloaded from the internet;
locus doctorwarns about it. Homebrew's llama.cpp does not have this problem. - Not in this version: removing models from the phone, more than one model at a time, LoRA or draft models, KoboldCpp's image and speech models, models from LM Studio's or Ollama's folders, Hugging Face models that need a token, and Locus downloading the tools themselves.
- Tried so far: on the developer's own computers, llama.cpp started by Locus (Windows and macOS), Locus finding llama.cpp and KoboldCpp running and preparing KoboldCpp's one-file program (Windows), and each chat's own tool (Windows and macOS). A model loaded in KoboldCpp started by Locus has not been tried on a real computer yet. Tested against stand-ins only, not yet with real phones: two phones answering from two tools at once, the questions about shared memory, and Load beside your own copy. Nothing has been tried on a real Linux machine yet.
The tool's own output goes to llamacpp.log or koboldcpp.log in Locus's logs folder, on
the computer only. A phone cannot read it, nor reach the tool's own web page.
Strata
Strata keeps its own row under AI tool for this chat and its own list of models, never Get a model into Locus's folder, even on llama.cpp's port 8080.
- On your computer, Locus does not run Strata's programs yet: it will ask on the computer first, and that
comes with a next version (the phone says so). Chatting with a Strata you started yourself works: Use for this
chat in Models, or
locus use stratafor new chats. - On the developer's own computer, Locus finds Strata by itself, keeps it in the list while it is off, and shows Strata's own models: Download (through Strata's own installer, with Cancel and Resume), Load and Unload, for a phone that may add or remove devices. These were tested against stand-ins only, not yet from a real phone.
- A Strata started without its picture reader answers text questions in a chat that holds older pictures (they become a note); a new picture gets a plain refusal.
- Locus does not find Strata on macOS or Linux yet.