Skip to content

Architecture ​

OpenWeights is a Tauri 2 app: a Rust core, a React frontend, and a Rust workspace split into one crate per concern.

src/                  React frontend (screens, components, i18n pt-BR/en)
src-tauri/src/        The Tauri app itself (commands, state, telemetry)
src-tauri/crates/     The core, one crate per concern
site/                 This documentation site (VitePress)

The crates ​

CrateWhat it owns
typesTypes shared across crates, serialized to the frontend in camelCase
storeLocal SQLite: chats, messages, presets, settings and the configuration comparisons
engineInference engines. The main one is llama.cpp's llama-server in Router mode: one process that loads, unloads and swaps models according to the model field of each request
runtimePicks the right llama.cpp build for the machine, downloads it from a pinned GitHub release, verifies and extracts it
hwHardware detection at startup, plus live telemetry at 1–2 Hz
modelsHugging Face Hub client for GGUF files, and the download manager
advisorEstimates the memory each GGUF file needs and grades it against your hardware — the green/yellow/grey verdict
clusterllama.cpp RPC cluster: one host and one worker on the local network
providersLLM providers: the remote catalogue (OpenRouter) and endpoint resolution
ninerouterInstalls, supervises and removes 9router in isolation
agenticowAgenticOw, our fork of the DeepSeek Harness: installs its prebuilt runtime against the sha256 pins built into the app, supervises the Host through a JSON-lines control protocol and pushes the model catalogue to it (details in docs/agenticow.md)
ptyThe embedded terminals: pseudoterminal sessions with the system environment, a ring buffer replayed by byte offset, flow control and per-session shutdown (details in docs/owcli.md)
owcliThe OwCLI agent's runtime, our fork of Codex CLI: the sha256 pins built into the app, the verified install (size, sha256, runtime.json and an owcli --version on this machine) and pruning old versions (details in docs/owcli.md)
owgwThe OwCLI gateway: one loopback address with a token, routing by the model's source prefix and adding each source's key, so keys never leave the app
gatewaySingle entry point (a local Traefik) for the LLM providers
nodejsPortable Node.js runtime, isolated from the system's Node
procLong-lived child process supervision: process tree, Job Object and free port
fetchDownloads, verifies by SHA256 and extracts release packages in an atomic install

Router mode ​

The engine is a single llama-server process that loads and unloads models on demand, driven by the model field of each request. That is what lets the chat and the local API share one engine instead of spawning a process per model — and what makes "concurrent models" a real setting instead of a wish.

The frontend ​

React 19 + Vite + Tailwind 4, with i18next for pt-BR/en. npm run dev runs the UI in a browser with mocked data, no Rust involved — that is where most UI work happens.

The screens map to the crates above: Discover (models + advisor), My Models, Chat (engine), OwCLI (pty + owgw + owcli), Local Server (engine), Model sources (providers), Settings.