Local Liquid desktop facilitator
Purpose
Ships and runs a small local Liquid LFM2.5 model on Linux x86_64 CPU as a desktop model option, with a private llama.cpp backend owned by the core and installed by the installer.
Requirements
Requirement: Private provider configuration
The system SHALL add the Liquid provider only to the core's private temporary OpenCode configuration and MUST NOT add it to the global user configuration. Full text: section Runtime ownership.
Scenario: Provider added
- WHEN the core configures the Liquid provider
- THEN it appears only in the private temporary OpenCode configuration, never the global user configuration
Requirement: Inference process lifetime
The inference process SHALL start only when Liquid is selected, SHALL close with the runtime, and SHALL terminate through Linux parent-death signalling if its owning core disappears. Full text: section Runtime ownership.
Scenario: Core disappears
- WHEN the owning core disappears
- THEN the inference process terminates
Requirement: Backend isolation and credential
The backend SHALL listen on a random loopback port with a random secret in a mode-0600 temporary file; the credential MUST NOT reach the renderer, and the backend SHALL inherit no desktop socket, profile environment, session bus or provider secrets. Full text: section Runtime ownership.
Scenario: Backend starts
- WHEN the backend starts
- THEN it uses a random loopback port and a mode-0600 secret file and inherits no desktop socket, profile environment, session bus or provider secrets
Requirement: No remote fallback
The system SHALL NOT fall back automatically to a remote model if local inference fails. Full text: section Install and select.
Scenario: Local inference fails
- WHEN local inference fails
- THEN there is no automatic remote fallback; free OpenCode and authenticated ChatGPT plan models remain available
Requirement: Atomic verified install
The installer SHALL verify downloads and publish them atomically in runtime/liquid after an executable smoke check, SHALL preserve and report a damaged or different existing installation, and SHALL fail explicitly on unsupported platforms. Full text: section Install and select.
Scenario: Damaged installation
- WHEN an existing installation is damaged or different
- THEN it is preserved and reported
Requirement: Selection is preserved
Installing Liquid for a configured checkout SHALL NOT edit the profile or restart processes; profiles without a saved selection default to the local model when the package is installed (a source-only checkout without the package retains big-pickle) and existing choices remain intact. Full text: section Install and select.
Scenario: Existing choice
- WHEN a profile has a saved model selection
- THEN a new core keeps that choice
Requirement: Background memory learning with Liquid
With Liquid selected, automatic background memory learning SHALL default off; recall and explicit notes stay available and stored memory is preserved. Full text: section Runtime ownership.
Scenario: Liquid selected
- WHEN Liquid is the selected model
- THEN automatic background memory learning defaults off while recall and explicit notes remain available
Requirement: Compaction override only for Liquid
The explicit compaction system instruction listing the required Markdown headings SHALL apply only to Liquid and SHALL keep compaction enabled, the selected model and the saved history. Full text: section Runtime ownership.
Scenario: Other models
- WHEN a model other than Liquid is selected
- THEN the Liquid compaction override does not apply
Requirement: Synthetic tests do not run real inference
Synthetic tests SHALL use testEnvironment, which sets AGENT_NATIVE_TEST_DISABLE_LOCAL_MODEL=1 to prevent incidental real inference. Full text: section Runtime ownership.
Scenario: Synthetic test
- WHEN a synthetic test runs under testEnvironment
- THEN real local inference is disabled unless a deliberate probe overrides the variable with 0
Requirement: Portuguese reliability is not inferred
Portuguese reliability of the 1.2B model MUST NOT be inferred from successful English tool calls and SHALL need separate validation. Full text: section Runtime ownership.
Scenario: English probe passes
- WHEN English tool calls succeed
- THEN Portuguese reliability is still not considered proven
Requirement: Revert needs an existing model
Before reverting to a core without the local provider, the user SHALL select an existing model through the protected selector, because old cores do not understand a saved local model ID. Full text: section Runtime ownership.
Scenario: Revert
- WHEN a core without the local provider is about to run
- THEN an existing model is selected first through the protected selector
Status
Doc status: current contract. Installer and core backend exist (scripts/liquid-model.json); checked against AGENTS.md section Local inference. Checked 2026-11-10.
Introduction
The installer includes LiquidAI LFM2.5-1.2B-Instruct Q4_K_M GGUF
(730,895,168 bytes) and llama.cpp b11960 for Linux x86_64 CPU. Exact URLs,
revision and SHA-256 values are in scripts/liquid-model.json. The model uses
LFM Open License, not Apache 2.0. The backend uses 32,768 context tokens, one
slot and at most four CPU threads. No GPU drivers, Ollama or root are required.
Install and select
The normal scripts/install.sh --source-root ... flow
installs Liquid before registering next-login routing. Build preparation remains
a prerequisite. Downloads are cached in
${XDG_CACHE_HOME:-$HOME/.cache}/agent-native-os/liquid, verified and published
atomically in runtime/liquid/ after an executable smoke check. Repeated installs
verify and reuse the package. A damaged or different existing installation is
preserved and reported. Unsupported platforms fail explicitly.
A release of scripts/build-release.py holds a link to one shared copy in ~/.local/share/agent-native-os/liquid/, made from the copy of the checkout (openspec/specs/immutable-base/spec.md).
For an already configured checkout:
python3 scripts/install-liquid.py --root /absolute/path/to/active-checkout
This does not edit the profile or restart processes. A new core offers
local/lfm2.5-1.2b-instruct in the model selector. Profiles without a saved
selection default to it; existing choices remain intact. A source-only checkout
without the package retains big-pickle. There is no automatic remote fallback
if local inference fails. Free OpenCode and authenticated ChatGPT plan models
remain available.
Runtime ownership
The provider is added only to the core's private temporary OpenCode 2.1.4 configuration, never the global user configuration. Shell, title, compaction and memory agents use the selected model. With Liquid, automatic background memory learning defaults off because consolidation would block its single CPU slot; recall and explicit notes stay available, and stored memory is preserved. The inference process starts only when Liquid is selected, closes with the runtime, and uses Linux parent-death signalling to terminate if its owning core disappears. It listens on a random loopback port with a random secret in a mode-0600 temporary file. This internal credential never reaches the renderer and is not a paid provider key. The backend inherits no desktop socket, profile environment, session bus or provider secrets.
Liquid's compaction agent has a short, explicit system instruction listing the
required Markdown headings. OpenCode 2.1.4 validates summary structure: the
default instructions allowed this model to use bold titles instead, which
reproduced Compaction summary did not match the required template even without
voice enabled. The override applies only to Liquid and keeps compaction enabled,
the selected model and the saved history. It improves formatting compliance;
summary accuracy remains subject to the small model's limitations. Runtime
configuration changes take effect after the core starts again, normally at the
next login, rather than a renderer reload.
Synthetic tests use testEnvironment, which sets
AGENT_NATIVE_TEST_DISABLE_LOCAL_MODEL=1 to prevent incidental real inference.
Deliberate real-model probes can override this fixture variable with 0.
test/local-model.test.js covers references, pricing, authentication, isolation,
failure and cleanup. scripts/test/test_install_liquid.py covers installation,
offline repeat, checksum rejection and preservation of corrupt installations.
A short direct CPU probe on Ryzen 5 5600X produced a syntactically valid tool call in about 1.7 seconds, approximately 37 generated tokens/s. This is not a benchmark of the complete desktop prompt or proof of correct executable selection. Memory, latency and reliability depend on prompt and history size. An isolated OpenCode 2.1.4 probe with the full shell prompt and b11960 reached a synthetic desktop_state tool. The older b8200 backend failed to parse the native LFM2.5 tool format, so it is not used. The 1.2B model does not list Portuguese among its officially supported languages; Portuguese reliability needs separate validation and must not be inferred from successful English tool calls.
Sources: official model and license, official GGUF, versioned llama.cpp server, and OpenCode V2 providers. Provider fields were also checked against the installed OpenCode 2.1.4 schema.
Run the deliberate model probe with node web-shell/scripts/test-local-model.js.
It starts a private OpenCode and a synthetic MCP desktop, checks English and
Portuguese tool round trips and manual compaction with voice metadata off/on,
and never launches real applications or touches a
live compositor. The model and OpenCode executable must already be installed.
The complete isolated English and Portuguese probe passed on the Ryzen 5 5600X: about 29.6 seconds for the first tool round trip with the full shell prompt, then 4.1 seconds for the next turn with a warm context. The backend RSS was about 1.8 GiB. This proves only the two synthetic requests, not general Portuguese reliability or the complete real desktop tool catalog.
Before reverting to a core without the local provider, select an existing model through the protected selector. A saved local model ID is not understood by old cores. Model files can stay in runtime/liquid; no profile or history migration is needed.
Task instructions
The desktop uses a compact base prompt and loads specialized instructions and tools per turn. See desktop task skills. This applies to all selected models and does not change the installed Liquid model or its quality limitations.