# Your first chat and joining a circle

LUCID starts in **consume-only** mode by default: it never shares your GPU or uploads model files unless you explicitly turn sharing on. You can chat privately on your own models, join a friend's private circle with a one-time link, watch live routing in Activity Monitor, or plug in Open WebUI, Pi, OpenCode, and Hermes Agent.

> [!NOTE]
> Pinned `llama.cpp b12977`, the **MCP `2026-07-28`** dual-era engine, the **Web Browser auto-launcher** (Chrome, Edge, Brave, Vivaldi, Chromium), 1-click **managed portable Node.js `v24.23.0` LTS**, compact resizable **Activity Monitor** with Pin toggle, Multimodal Vision, offline Markdown/KaTeX/Mermaid/HTML rendering, opt-in local chat history, and slice hydration / wire-dedup telemetry are included in **`v0.2.0-rc42`**. See [Download & Release Notes](../releases.html#release-notes) to upgrade.

## Using the built-in Desktop Chat

1. Open **LUCID** and complete the brief welcome screen (click **Start Privately (Don't Share)** to stay consume-only).
2. On Client Mode devices (under 6 GB VRAM) and Tor / TailsOS sessions, LUCID opens straight into the clean **Chat-first Consumer UI** (Simple Mode) with zero provider screens. On provider devices, pick any **On Device** or **Circle** model and click **Chat**.
3. Type a message (or start with a slash skill like `/diagram`, `/research`, or `/concise`) and press Enter or **Send**. Replies stream live token by token (up to `4096` output tokens per Desktop Chat turn).

What the chat panel includes:

- **Unified full-window workspace & Chat Folders:** Both Providing / Power Mode (**Chat | Models** switcher) and Client Mode share the exact same full-window two-pane Chat interface—Chats &amp; Folders on the left, centered editorial Chat + Vision dropzone on the right. Create folders, pin threads, or drag any chat onto a folder to organize your saved history (hard-locked RAM-only in Tor / TailsOS mode).
- **Multimodal Vision (screenshot drag-and-drop & paste):** Models paired with a verified `mmproj` projector (LM Studio sibling `mmproj*.gguf` or Ollama vision layer) automatically display a **Vision** badge in Models and Chat. Drag a screenshot onto the chat window, paste directly from your clipboard (`Cmd+V` / `Ctrl+V`), or click **Image** to attach PNG, JPEG, WebP, or GIF images (up to 4 per message). Large screenshots automatically resize and compress client-side so they work both locally and across Trusted Circle peers over Noise. If you drop an image while on a text-only model, LUCID offers a 1-click banner to switch to an available Vision model.
- **Offline-first rich rendering:** Assistant replies render GFM **Markdown** (tables, headings, lists, links), offline **KaTeX LaTeX math** (`$$...$$`, `$...$`, `\[...\]`, `\(...\)`), syntax-highlighted code blocks with one-click **Copy**, lazy-loaded **Mermaid diagrams** (**Diagram / Source** toggle), air-gapped **sandboxed HTML & SVG previews** (`<iframe sandbox="">` with `default-src 'none'` CSP), and collapsible **`<think>`** reasoning traces. All HTML is sanitized with `DOMPurify` and external tracking `<img>` URLs are stripped.
- **Opt-in searchable local chat history:** History starts **off by default** (ephemeral / in-memory only). Click **History** in the Chat toolbar and turn on **Save chats locally** to persist threads privately (`0700`/`0600`) on this device only—never synced over P2P—with instant full-text search, match snippets, inline rename, delete, and **Clear All Saved Chats**. In Tor / TailsOS mode, history is automatically hard-locked to RAM-only.
- **Stop cancels immediately:** Clicking **Stop** cancels the in-flight request, closes the upstream HTTP stream to `lucidd` (and any remote peer stream), or immediately frees your spot if you were waiting in the Prompt Queue. Stopped replies stay visible as partial output and are excluded from future prompt context.
- **Copy:** One-click copy on any assistant reply, any code block, or the whole transcript.
- **Local Only toggle (Power Mode):** Sends `X-Lucid-Local-Only: true`. `lucidd` refuses remote peer routing *and* refuses local RPC-offloaded models when **Local Only** is checked.

## Built-in Tools, Skills, and Visual MCP (zero JSON editing)

Click **Tools & Skills** in the Chat toolbar to manage everything visually—no config files to edit by hand:

- **Built-In Tools (1-click toggles):**
  - **Date & Time** and **Calculator** (pure-Rust arithmetic evaluator; optional auto-approve).
  - **Web Search (DuckDuckGo)** and **Web Fetch**: zero API keys, SSRF-blocked against loopback and private LAN IPs. When **Tor / TailsOS mode** is active, both route fail-closed over `socks5h://` (remote DNS inside Tor) targeting **DuckDuckGo's official `.onion` service** and supporting `.onion` page fetches.
  - **Local Folder Reader**: pick approved folders with your native OS folder picker (canonicalized paths block `..` and symlink escapes).
- **Skills:** Toggle starter skills (`/concise`, `/diagram`, `/research`), create your own with **+ New Skill**, or click **Import `SKILL.md`…** to load Markdown skills with YAML frontmatter. Trigger any skill on demand by starting your prompt with `/<trigger>`.
- **Visual MCP Connector (MCP `2026-07-28` dual-era engine):** Click **+ Add Server** (persistent local stdio or Streamable HTTP) or **Import from Apps** (1-click discovery from Claude Desktop, Cursor, and Antigravity), click **Test & Discover** to probe tools (`server/discover` with automatic fallback to legacy `2025-11-25`..`2024-11-05` MCP servers), and check only the exact tools you want enabled. External MCP subprocesses and HTTP endpoints lock off automatically in Tor / TailsOS mode so third-party binaries cannot bypass `socks5h://`.
- **Web Browser Auto-Launcher (Chrome DevTools MCP):** Enable browser control in one click without hand-writing Chrome flags. LUCID auto-detects installed Chromium browsers (**Chrome, Microsoft Edge, Brave, Vivaldi, Chromium**, plus custom executable paths)—including chromeless auto-detect and automatic **Windows Microsoft Edge CDP auto-launch** on Windows systems where Chrome is not installed. Pick a tool level (`Slim`, `Basic`, `All`, `Custom`) and session mode (`Visible`, `Persistent`, `Attach`, `Headless`); see [Built-in MCP 2026-07-28 engine and Web Browser MCP](apps-and-agents.md#6-built-in-mcp-2026-07-28-engine-and-web-browser-mcp).
- **Managed Portable Node.js LTS (`v24.23.0`):** On machines without a system Node.js installation, Tools & Skills Hub offers a 1-click install of a private, portable **Node.js `v24.23.0` LTS** runtime to power `npx`-based MCP servers (such as Web Browser / Chrome DevTools). Downloads allow only `https://nodejs.org`, verify exact compile-time pinned SHA-256 hashes (zero runtime `index.json` TOFU), swap atomically with rollback, and stay disabled in Tor / TailsOS mode.
- **Receipt-verified approval cards:** `lucidd` only releases tool calls after the Ed25519 execution receipt verifies, and Desktop Chat shows an inline **Allow Once / Allow for This Chat / Deny** card with exact JSON arguments before executing web, file, browser, or MCP tools locally on your machine.

## Sharing smoothly with the Prompt Queue

When several friends or family members chat with the same GPU at the same time—or when a background coding agent is busy—LUCID does **not** drop requests or interrupt someone else's reply.

- Requests line up fairly in arrival order (FIFO) while one active GPU job runs at a time, preventing double-booked `llama-server` hangs.
- While waiting, Desktop Chat shows **`Waiting for an open slot (position N of M)`** and Activity Monitor displays the live queue badge and depth.
- Clicking **Stop** cancels your wait immediately and moves everyone behind you forward.
- Your own local prompts always keep reserved waiting slots so remote peers can never lock you out of your own machine.

See [Operator policy and safety controls](operator-policy.md#fair-prompt-queue-and-remote-concurrency) and [HTTP API reference](http-api.md#prompt-queue-and-busy-responses) for queue caps (`16` total, `4` local-reserved, `2` per peer, `120s` wait cap, `503 + Retry-After: 5`).

## Watching live traffic with Activity Monitor

Click **Monitor** in the top bar (or **Activity Monitor** in the menubar/tray helper—available in both Power Mode and Simple / Client Mode) to open the **compact, resizable floating Activity Monitor** HUD. Resize and tuck it into any screen corner, and click **Pin** (`Pin` / `Pinned`) in the monitor header to keep it floating on top of other windows while you work. It enforces **strictly metadata-only privacy**: it never captures or displays prompt text, reply text, PeerIds, or IP addresses.

Toggle between two live views at the top of the monitor window:

- **`Metrics` view:** Live request stream (including inbound `Circle · …` jobs served for enrolled circle devices), token throughput, loaded/resident models, Prompt Queue counters (active, queued, served, timed out), GPU slice distribution (`Helper 1 · 2 slices`, `This Device · <BACKEND>` slice count, and quorum badge such as `10 / 10 slices` or `7 / 10 slices · waiting`), slice hydration progress, `/phase/shard-rpc/2.0.0` wire-dedup byte savings, and per-helper encrypted RPC bandwidth when pooling GPUs.
- **`Flow` view:** Live **Status Topology Flowchart** (`Local Client` or `Circle Client → LUCID Coordinator → This Device · <BACKEND>` plus `Helper 1..N` or delegated `Remote Peer` nodes) with animated outbound/inbound connectors, live RTT-aware connection path badges (`LAN <ms>`, `WAN <ms>`, `DCUtR <ms>`, `Relay <ms>`, `Offline`), live slice badges (`Helper 1 · 2 slices`, `10 / 10 slices` quorum pill on the coordinator), and round-trip stage flow.

## Context window sizing and memory headroom

By default, LUCID runs local `llama.cpp` models with an **`8K` context window** (`8,192` tokens)—fast and lightweight for everyday chat. For coding agents or long documents, open **Settings & Safety → Context Window** and pick a larger preset:

| Preset | Best For | Memory / Headroom Guidance |
|---|---|---|
| **8K (Default)** | Everyday chat & quick Q&A | Minimal KV-cache overhead; works on almost any GPU or laptop. |
| **16K** | Medium conversations & short files | Low extra memory overhead. |
| **32K (Coding)** | **Recommended for coding agents** (Pi, OpenCode) | Comfortable room for repo context and multi-step tool calls. |
| **64K** | Long documents & large codebases | Moderate extra RAM/VRAM; check headroom on 16 GB GPUs. |
| **128K (High VRAM)** / **256K (Max VRAM)** | Very long transcripts & full-book analysis | **High memory:** FP16 KV cache at `128K`–`256K` uses ~`16`–`64+ GiB` extra RAM/VRAM and may OOM smaller cluster helpers. |

### Quantized KV Cache (`q8_0`) — opt-in

Right below **Context Window**, you can turn on **Quantized KV Cache (`q8_0`)** (**off by default**):

- **What it does:** Stores `llama-server`'s key/value cache in `q8_0` (`--cache-type-k q8_0 --cache-type-v q8_0`), cutting KV-cache RAM roughly in half—so much larger contexts (`32K`–`256K`) fit on your local GPU or across fewer cluster slices, at a small precision trade-off.
- **Safe restart & rollback:** Changing either **Context Window** or **Quantized KV Cache (`q8_0`)** restarts the local engine automatically (skipping GGUF re-hashing thanks to signed hash caching). Desktop tests the new setting *before* saving it to disk; if the engine fails to restart, LUCID automatically rolls back to your previous setting and restarts cleanly.
- **CLI flag:** Pass `--llama-ctx-size <TOKENS>` and `--llama-kv-cache-q8` when running `lucidd` directly.

## Reading trust badges

Every reply displays provenance badges derived directly from verified HTTP headers and terminal NDJSON evidence (the Desktop Rust backend rejects unearned badges):

| Badge (`X-Lucid-Trust-Label`) | Meaning |
|---|---|
| `local` | Executed entirely on your own machine. |
| `remote-pending` | Streaming from an invited peer; terminal Ed25519 receipt has not been checked yet. |
| `remote-receipt-verified` | Stream completed and the peer's Ed25519 `SignedReceipt` matched the job manifest, delivering `PeerId`, and replayed SHA-256 token commitment. |
| `remote-spot-checked` | Verified receipt **plus** a deterministic redundant spot-check peer returned an agreeing commitment. |
| `trusted-circle-sharded` | Executed across your own opted-in Tier-1 Trusted-Circle GPUs. |

> [!NOTE]
> A verified receipt proves *which peer* generated the exact tokens you received and that they were not modified in transit. It does not hide your prompt from the serving peer or prove the peer's hidden weight quantization. See [Cryptography, receipts and verification](cryptography-and-receipts.md).

## Joining a trusted circle

Serving nodes are **default-deny**: uninvited peers cannot run jobs on your GPU. Circle access works through single-use `lucid://join/...` invitations.

### On the sharing machine (create an invite)

- **Desktop app:** Click **Share Invite** to mint a one-time link (default 30-minute expiry, configurable up to 1 hour).
- **CLI:**
  ```bash
  lucidd invite --ttl-seconds 1800
  ```

Each invitation embeds a signed descriptor and an ephemeral delegation seed (which is never stored in the ledger or published to the DHT). Invitations are single-use and grant up to 24 hours of circle authorization by default.

### On your machine (accept an invite)

- **Click a link or `.lucidinvite` file:** LUCID Desktop registers the `lucid://` URL scheme and `.lucidinvite` file association on macOS, Linux, and Windows—clicking either opens the **Join Invite** dialog pre-filled.
- **Paste manually in Desktop:** Click **Join Invite** (the input field is masked like a password) and confirm.
- **CLI:**
  ```bash
  lucidd join "lucid://join/..."
  ```

Behind the scenes, your node publishes a doubly signed `EnrollmentRequest` to the issuer's DHT mailbox and polls for a signed `Approval` (typically completing in 3–6 seconds). Once approved, the issuer's models appear in your sidebar and `/api/tags`.

## Connecting Open WebUI, Pi, OpenCode, and other tools

Point any Ollama-compatible or OpenAI-compatible tool at LUCID's loopback HTTP address:

- **LUCID Desktop sidecar:** `http://127.0.0.1:11435` (click **Copy API Address** in the model detail pane, or click **Open WebUI ↗** after configuring its URL in Settings)
- **Standalone `lucidd` CLI:** `http://127.0.0.1:11434`

Ready-to-paste configs for **Open WebUI** (with native tool calling + Docker `host.docker.internal`), **`Pi 1.6.1`**, **`OpenCode 2.4.2`**, **Hermes Agent**, and LUCID Desktop's **MCP `2026-07-28` / Web Browser MCP** live in [Connect Open WebUI, Pi, OpenCode, Hermes & MCP](apps-and-agents.md).

Example streaming chat via `curl`:

```bash
curl -s http://127.0.0.1:11434/api/chat \
  -H "Content-Type: application/json" \
  -d '{
    "model": "my-model",
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'
```

Force local-only execution from any client by adding `-H "X-Lucid-Local-Only: true"`. See the complete [HTTP API reference](http-api.md) for all endpoints, parameters, and headers.
