Skip to content

Repository files navigation

Nano — Local AI · Private Intelligence

On-device Gemini Nano chatbot. Offline, private, no servers. Runs entirely in Chrome Canary / Dev using the built-in Prompt API (window.ai).

status platform license


Why Nano?

Nano is a tiny, fast web app that proves you can have a useful AI assistant without sending data to the cloud. Everything runs locally:

  • Private by design — prompts never leave your browser
  • Offline first — works after the model downloads once
  • Lightweight — ~5 files, no build step, no npm dependencies at runtime

Features

Core

  • Streaming responses from Gemini Nano (on-device)
  • Abort/stop generation mid-stream
  • Automatic session recovery if Chrome evicts the model
  • Context window management (~1,200 tokens sliding window)

UX

  • Clean chat UI with markdown (**bold**, *italic*, code, links)
  • Edit & resend — double-click any user message to modify
  • Typing indicator and live token speed (⚡ tok/s)
  • Dark mode (follows system, manual toggle 🌓)
  • Mobile-friendly auto-growing textarea
  • ARIA roles for screen readers

Controls

  • Temperature slider (0 – 1.5)
  • Top-K slider (1 – 100)
  • Custom system prompt
  • Output language: English, Spanish, French, German, Japanese

Data

  • Auto-save to localStorage
  • Multi-session management (create, switch, delete, rename)
  • Export chat as JSON or Markdown
  • Import previous conversations
  • Smart quota handling — prunes oldest session automatically when storage is full
  • Factory reset

Quick Start

1. Requirements

  • Chrome Canary or Chrome Dev ≥ 128

  • Enable the Prompt API:

    1. Go to chrome://flags/#prompt-api-for-gemini-nano
    2. Set to Enabled
    3. Also enable chrome://flags/#optimization-guide-on-device-model
    4. Relaunch
  • Download the model: chrome://components → "Optimization Guide On Device Model" → Check for update

2. Run locally

python -m http.server 5500
# then open http://localhost:5500

About

a private chatbot that uses gemni nano to make a free but limited model. still working on it

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages