Skip to main content

Setup Wizard and Onboarding Plan

Date: 2026-04-01 Status: Draft Milestones: v0.17.2 (first-run detection) -> v0.20.0 (system scanner, wizard UI) -> v0.24.0 (progressive install, guided task) Goal: First useful AI interaction in under 5 minutes from install.

1. Overview

GAIA targets three user personas with very different technical baselines: The setup wizard must satisfy all three. The primary success metric is time from first launch to first useful response — target is under 5 minutes on a broadband connection with an AMD Ryzen AI system.

Design Principles

  1. Never show a blank screen. Every state (loading, downloading, error) has visible feedback.
  2. Every step is skippable. Power users can bail out at any point.
  3. Resume, never restart. Interrupted downloads pick up where they left off.
  4. One shared state file. CLI and UI wizard read/write the same ~/.gaia/setup-state.json.
  5. Hardware-aware defaults. Model recommendations adapt to detected RAM, disk, and NPU.

2. First-Run Detection

Trigger Logic

State File: ~/.gaia/setup-state.json

CLI Behavior

Electron Behavior

On first Electron launch, the main window renders the onboarding wizard instead of the chat view. The wizard is a series of full-screen steps within the existing Electron shell. After completion, the window transitions to the normal chat UI. Related issues: #469 (first-run detection), #597 (Agent UI wizard)

3. System Scanner

The system scanner runs as Step 1 of the wizard and produces the system_scan block in the state file. It must complete in under 5 seconds.

Detection Matrix

Hardware Tier Classification

Based on scan results, classify the system into a hardware tier that drives model recommendations:

Scanner Output (CLI)

Related issues: #466 (system scanner)

4. Onboarding Wizard Flow

The wizard consists of 7 steps. Steps 5 and 6 are optional and can be skipped.

Step 1: Welcome

Purpose: Introduce GAIA and set expectations.
Skip behavior: Jumps to normal chat UI. Writes ~/.gaia/initialized with skipped: true so the user is never prompted again but can run gaia init manually.

Step 2: System Scan Results

Purpose: Show what was detected, flag any problems, build user confidence.
Error states handled here:

Step 3: Model Selection

Purpose: Let user choose what to download. Defaults are pre-selected based on hardware tier.
Profile-to-model mapping reuses the existing INIT_PROFILES dict from src/gaia/installer/init_command.py (lines 39-100). No duplication — the wizard reads the same profile definitions the CLI uses.

Step 4: Model Download

Purpose: Download models with clear progress and the ability to resume on failure.
Download implementation details:
  • Downloads use HTTP range requests for resume-on-failure.
  • Each model file is downloaded to ~/.gaia/downloads/ with a .part suffix, renamed on completion.
  • SHA256 checksum verification after each download.
  • Parallel downloads when bandwidth allows (configurable, default: 1 concurrent download).
  • Progress is written to setup-state.json after each chunk so resume works after crash or reboot.
  • If Lemonade Server is not running, it is started automatically after the first model finishes.
Error handling:

Step 5: Messaging Platform Setup (Optional, deferred to v0.24.0+)

Purpose: Connect GAIA to Discord, Slack, or Telegram for remote access. This step is skipped by default in the initial release. The wizard shows:
Related issues: Messaging integrations plan (docs/plans/messaging-integrations-plan.mdx)

Step 6: Persona Interview (Optional)

Purpose: Tailor the experience to the user’s goals. Feeds into system prompt and suggested first tasks.
The selections are stored in ~/.gaia/preferences.json and used to:
  1. Customize the guided first task (Step 7).
  2. Set a tailored system prompt for the default chat session.
  3. Pre-enable relevant MCP servers if applicable.
Related issues: #467 (onboarding agent / persona interview)

Step 7: Guided First Task

Purpose: Get the user to their first successful AI interaction immediately. Based on persona selections and profile, present a context-aware starter prompt:
The guided first task view transitions seamlessly into the normal chat UI. The message input is the same component used in regular chat — the user is already “in” the app. Related issues: #471 (guided first task)

5. Error States — Full Reference


6. Skip / Power-User Path

Every wizard step includes a skip option. Power users have three fast paths:

Path A: CLI Silent Mode

Runs the full init sequence non-interactively. Uses defaults for hardware tier. Prints progress to stdout. Returns exit code 0 on success.

Path B: Skip Button in UI

The “Skip — I know what I’m doing” button on the Welcome screen writes the ~/.gaia/initialized marker and jumps directly to the chat UI. The user can then configure everything manually through Settings.

Path C: Environment Variable

Permanently suppresses the onboarding prompt. Useful for CI, Docker containers, and automated testing.

7. Progressive Installation

Resume After Interruption

The setup-state.json file tracks progress at a granular level:

Rollback on Failure

If a step fails and cannot be recovered:
  1. The failed step is logged in setup-state.json.error_log.
  2. Previously completed steps are NOT rolled back (models already downloaded stay).
  3. The user is offered: [Retry This Step] or [Skip and Continue].
  4. If the failure is in Lemonade installation, the cleanup removes partially extracted files but preserves any existing working installation.

Parallel Downloads

When the user selects a profile that requires multiple models (e.g., chat needs both a language model and an embedding model):
  • Download the primary model first (it is needed to verify the setup works).
  • Queue secondary models to download in the background after the primary completes.
  • In future versions (v0.24.0+), allow true parallel downloads with bandwidth sharing.
Related issues: #468 (setup executor with resume, rollback, parallel downloads)

8. CLI vs UI Onboarding

Both CLI and UI onboarding share the same backend logic and the same state file.

Shared Components

CLI-Specific (gaia init)

  • Rich terminal output with progress bars (via rich library).
  • Interactive prompts for profile selection and confirmations.
  • --yes flag for non-interactive mode.
  • --profile flag to skip profile selection.
  • --skip-models and --skip-lemonade for partial setup.

UI-Specific (Electron wizard)

  • Full-screen wizard steps rendered in the Electron window.
  • API calls to a local onboarding endpoint (e.g., POST /api/setup/scan, POST /api/setup/download) that delegates to the same InitCommand backend.
  • Real-time progress via Server-Sent Events (SSE) or WebSocket.
  • Drag-and-drop for document upload in the guided first task.

Handoff Between CLI and UI

A user who starts setup via CLI and later opens the Electron app (or vice versa) should see consistent state:

9. Post-Onboarding

Guided First Task (Expanded)

After setup completes, the system offers context-aware starter prompts based on the persona interview and detected capabilities:

Settings Reminder

After the first session, show a non-intrusive banner:

Telemetry Opt-In (Optional, v0.24.0+)

After the first successful interaction, optionally ask:
Default is opt-out. Stored in ~/.gaia/preferences.json.

10. Cross-Platform Considerations

Windows (Primary)

  • Lemonade Server installed via MSI from GitHub releases.
  • gaia init handles MSI download and silent install.
  • PATH refresh uses Windows registry read (see init_command.py line 289-337).
  • NPU detection via AMD driver device enumeration.
  • Desktop installer via NSIS (docs/plans/desktop-installer.mdx). Related: #530.

Linux

  • Lemonade Server installed via ppa:lemonade-team/stable (Ubuntu 24.04+).
  • gaia init detects distro and uses appropriate package manager.
  • NPU detection via lspci and /sys/class/ device tree.
  • Desktop packaging via AppImage.

macOS

  • Lemonade Server installed via Homebrew or pip.
  • No NPU support (Apple Silicon uses Metal, not AMD NPU).
  • GPU detection via system_profiler.
  • Desktop packaging via DMG.
  • System scanner notes: “AMD NPU not available on macOS. Using CPU inference.”

Platform-Specific UI Differences


11. Implementation Phases

Phase 1: v0.17.2 — Foundation

  • First-run detection (~/.gaia/initialized check)
  • gaia init improvements: resume support, better progress output
  • State file (setup-state.json) read/write
  • Desktop installer (NSIS for Windows) — #530

Phase 2: v0.20.0 — Scanner and Wizard UI

  • System scanner module (src/gaia/installer/system_scanner.py) — #466
  • Hardware tier classification
  • Electron onboarding wizard (Steps 1-4, 7) — #470
  • API endpoints for setup operations (/api/setup/*)
  • Persona interview (Step 6) — #467

Phase 3: v0.24.0 — Progressive Install and Guided Tasks

  • Parallel model downloads with bandwidth management — #468
  • Full resume-on-failure with byte-level tracking — #468
  • Rollback on failure — #468
  • First-run auto-trigger on any gaia command — #469
  • Context-aware guided first task — #471
  • Messaging platform setup step (optional) — deferred

12. GitHub Issue Cross-References


13. Open Questions

  1. Model storage location. Should models live in ~/.gaia/models/ (GAIA-managed) or defer to Lemonade Server’s own model cache? Current: Lemonade manages its own cache. Wizard should show where models are stored regardless.
  2. Offline-first mode. For Enterprise Eric, the wizard should support a mode where model files are provided on a USB drive or network share instead of downloaded from the internet. Needs a “Load from file” option in Step 3.
  3. Multi-user systems. On shared Linux/macOS machines, each user has their own ~/.gaia/ directory. On Windows with multiple user profiles, same approach. But Lemonade Server is system-wide — how to handle version conflicts?
  4. Telemetry. The opt-in telemetry question (Section 9) needs legal review before shipping. Consider deferring to v0.24.0+.