LOCUStechnical wiki

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

Tool by tool

ToolModels listedLoad, unload, contextGet a modelPicturesStarted by Locus
LM StudioYesYesHugging Face GGUF, into LM Studio's models folderModels LM Studio marks as vision modelsNo (on Windows, Locus tries to start LM Studio's server when it does not answer)
OllamaYesYesHugging Face, or a name from the Ollama library; Ollama downloads itModels with Ollama's "vision" capabilityNo
llama.cpp, KoboldCpp started by LocusYes: Locus's own models folderYes: Load starts the tool, Unload stops itHugging Face GGUF, into Locus's models folderA model downloaded with its image readerYes, once Locus has found the tool running, or after locus manage (not KoboldCpp on Linux)
Your own llama.cpp server or KoboldCppThe model it servesIn the tool itselfYes, into Locus's models folder: Load then moves this chat to Locus's own copyThe server's answer tellsNo: Locus never starts or stops it
JanThe models it servesIn JanNo: in JanThe server's answer tellsNo
StrataYesStrata's own model list, load and unload: on the developer's computer only for nowStrata's own installer: on the developer's computer only for nowWhen Strata runs with its picture readerNo
Any OpenAI-compatible serverThe models it servesIn the tool itselfNoThe server's answer tellsNo

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

  1. 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.
  2. 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

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

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.