On-Device AI Assistant (Experimental)

PinePaper’s AI / Code console has an Assistant that runs a language model entirely in your browser — no account, and nothing you type is sent to a server. Describe what you want, and it builds it on the canvas in one step.

Experimental. On-device models are small, so results vary. For higher-fidelity generation, use the Cloud tab (account) or an external agent via the MCP server.

Where to find it

  1. In the editor toolbar, click </> AI / Code.
  2. The console opens with three tabs: Code · Assistant · Cloud.
  3. Click Assistant (the no-account tab).

If the Assistant tab isn’t visible, your browser doesn’t have a supported on-device engine available — see Requirements.

Using it

  1. Type a prompt, e.g. “a pulsing red star on a dark background.”
  2. Click Generate (or press ⌘/Ctrl + Enter).
  3. The scene is built directly on the canvas — there’s no copy/paste or separate Run step. The panel shows a per-operation summary (e.g. ✓ create star, ✓ execute_generator drawSunburst).
  4. Not happy with it? Press Undo (⌘/Ctrl + Z) to revert and try a different prompt.

Because the model’s output is constrained to PinePaper’s real tools, it can’t produce invalid commands — at worst it makes an odd-but-valid choice (a circle where you wanted a star), never broken code.

Choosing an engine

Use the Engine toggle at the top of the Assistant panel:

Option What it uses Notes
Auto Best available Prefers Browser AI, falls back to PinePaper AI. Default.
Browser AI Chrome’s built-in Gemini Nano Zero download from us — the model ships with Chrome. Fastest to start.
PinePaper AI WebLLM running Qwen2.5-1.5B-Instruct Downloads a ~1.1 GB model on first use (~1.25 GB on disk once cached), then runs offline. Works in any WebGPU browser.

🧠 Models & sources. PinePaper AI runs the open-weight Qwen2.5-1.5B-Instruct (Apache-2.0), served as the WebGPU build Qwen2.5-1.5B-Instruct-q4f16_1-MLC — the ~1.1 GB 4-bit quantization actually downloaded to your browser cache. Browser AI uses Chrome’s built-in Gemini Nano. Open each model card for capabilities, license, and known limitations.

Switching engines re-prepares the model; the first time you pick PinePaper AI, watch the progress bar while the ~1.1 GB model downloads. After that it’s cached on your device and runs offline.

Languages

If your editor language isn’t English, your prompt is translated to English on-device (via the browser’s built-in translator, when available) before the model runs — the small models understand English best. The generated scene is the same regardless of prompt language.

Co-creating on top of hand-drawn sketches

Sketch first with the Drawing Tools (pencil, ink, charcoal, watercolor, oil, gouache, cutout paper, or embroidery stitch), or circle a spot with the AI Guide brush (pp:GuideRegion). PinePaper automatically passes artContext — your dominant brush medium, active palette colors, stroke weights, symmetry mode, and guide prompts — inside the shared canvas knowledge graph so the Assistant or Cloud chat continues in the same visual medium via pinepaper_paint_stroke / PinePaper.paintStroke(...). Both pp:GuideRegion guides and pp:Underdrawing construction layers stay excluded from exports.

Clicking “Ask Agent Now”

After drawing an AI Guide region and entering what you want created inside it, click Ask Agent Now in the guide popover:

  • When on-device AI is available (WebGPU / Chrome Prompt API): The AI / Code drawer opens straight to the Assistant tab with the guide prompt, region coordinates, and canvas medium summary pre-filled and ready to generate.
  • When on-device AI is unavailable: The AI / Code drawer opens to the AI Guide Handoff view displaying your saved prompt and canvas artContext with one-click actions to Copy Prompt + Context, Copy MCP Snippet, open Cloud Agent (with a one-click return to Handoff if offline), or switch to the Code tab with a pre-filled PinePaper.paintStroke(...) starter script.

Privacy

Everything happens on your device:

  • Your prompt is not sent to any server.
  • The model runs locally (Chrome’s built-in model, or one cached in your browser).
  • No account is required.

Requirements

  • Browser AI (Gemini Nano): Chrome on desktop (Windows 10/11, macOS 13+, Linux) with built-in AI enabled. If the Assistant says no provider is available, enable “Prompt API for Gemini Nano” at chrome://flags, relaunch, and confirm the model is downloaded at chrome://on-device-internals.
  • PinePaper AI (WebLLM): any browser with WebGPU (Chrome/Edge 113+, Safari 18+) and ~1.25 GB of free browser storage for the model cache (a one-time download).
  • Translation needs Chrome’s built-in Translator/Language Detector (desktop Chrome).