DRAKULIS.AIDOCUMENTATION / DEVELOPMENT PREVIEWWebsite ↗
LOCAL FIRST. EVIDENCE DRIVEN.

Offline mode

There is no cloud account, license check, hosted DRAKULIS API or mandatory remote service in local mode. Provision Python dependencies, frontend dependencies/build artifacts, an Ollama runtime and a tool-capable model while connected. Then keep the model service, database, worker, API and dashboard on the same machine.

Online provisioning (from the repository root):

python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
npm --prefix apps/studio ci --no-audit --no-fund
npm --prefix apps/studio run build
ollama pull qwen3:0.6b

Start Ollama with cloud features disabled. In one terminal:

OLLAMA_NO_CLOUD=1 OLLAMA_HOST=127.0.0.1:11434 ollama serve

In another terminal:

DRAKULIS_MODEL=qwen3:0.6b .venv/bin/python scripts/local_stack.py

The dashboard is http://127.0.0.1:5173. The supervisor creates private, random, distinct operator/worker tokens in .data/local-settings.json with mode 0600. Enter the operator token in Studio; never share or commit this file. Stop the supervisor with Ctrl-C. It terminates its own API, worker and frontend processes. The Ollama service is managed independently.

Native CLI (no dashboard or DRAKULIS server required):

DRAKULIS_MODEL=qwen3:0.6b .venv/bin/drakulis 'Use the calculator to calculate (128+64)*3'
DRAKULIS_MODEL=qwen3:0.6b .venv/bin/drakulis --allow-read 'List workspace files'

--allow-read is an explicit session-wide read approval for the native CLI only. Dashboard read tools request approval per call. The default workspace is .data/workspace.

Smoke tests:

sh scripts/offline_smoke.sh
DRAKULIS_MODEL=qwen3:0.6b .venv/bin/python -m scripts.real_model_check

The unit smoke blocks every attempted network connection and DNS lookup while using a model fixture. The real-model check uses actual local Ollama, blocks non-loopback Python sockets/DNS, requires a successful calculator call, streamed text, persisted history and a correct follow-up. The Python socket guard does not itself sandbox the separate Ollama process; OLLAMA_NO_CLOUD=1 and an OS/container egress policy remain necessary to establish stronger offline isolation. The Compose worker/model network is internal by default.

For a disconnected installation, prepare a wheelhouse on the same OS/architecture and Python version: python -m pip wheel '.[dev]' --wheel-dir wheelhouse. Transfer the repository, wheelhouse and frontend dist/ plus a preprovisioned Ollama model store and runtime. Install with pip install --no-index --find-links wheelhouse .. A production frontend container can serve the transferred build without npm. For Compose, transfer saved container images and the model volume; do not expect image pulls, npm installs or model downloads to work offline. Optional integrations and remote research are unavailable offline.

A stronger smoke starts actual Ollama and the Python runtime together in a non-root, resource-limited container with --network none, read-only model assets and no external interfaces:

# .data/ollama-runtime must contain bin/ollama and lib/ollama from the official archive.
# .data/models must contain a provisioned model store.
sh scripts/offline_container_smoke.sh
# Or use rootless Podman locally:
CONTAINER_ENGINE=podman sh scripts/offline_container_smoke.sh

The image build is an online provisioning step. The subsequent run has no external network. This smoke asserts actual streaming inference, persisted SQLite state and deterministic calculator dispatch; autonomous model selection is intentionally checked separately by scripts/real_model_check.py. The small model's automatic tool selection is not consistently reliable across prompts. A failed tool-choice check is a real integration/quality failure, not an offline networking failure.

DRAKULIS_MODEL_PROTOCOL=openai preserves the original OpenAI-compatible integration. DRAKULIS_MODEL_PROTOCOL=ollama selects the optional native NDJSON adapter, including think:false, normalized tool-call history and token usage. Native adapter protocol fixtures pass; model compatibility must be checked with the selected model before changing the deployment default. See the official Ollama chat API and tool-calling contract.