Skip to content
anisayariPublic

About

πŸ”’ Your private AI assistant, 100% local on Windows: chat, vision, documents (RAG), web search, images, videos with sound, voice, code projects, MCP tools β€” one-line install, models picked for your PC.

Topics

Resources

Stars

61 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

25 Commits

Folders and files

Repository files navigation

Sparky

Sparky

Your private AI assistant. 100% local.
Chat, see images, generate pictures and videos with sound, build apps, ask your documents, dictate and listen β€”
everything runs on your own PC. Nothing is sent to the internet unless you turn it on.

Windows 10/11 x64 and ARM64 100% local License MIT English and French

Sparky Studio: videos with sound generated locally
🎬 The Studio β€” every video here was generated on the PC, with its sound, by LTX-2.5.


✨ What it does

πŸ’¬ Chat

  • πŸ”’ Like ChatGPT, offline β€” history, plus πŸ‘» temporary chats that are never saved.
  • ✏️ Edit any message, πŸ” regenerate or ➑️ continue an answer, and flip between versions (β€Ή 2/3 β€Ί).
  • 🧠 Adjustable thinking β€” Off, Light, Normal or Deep, and see how the model reasoned.
  • πŸ“ Rich answers β€” tables, LaTeX formulas, Mermaid diagrams, task lists, syntax-highlighted code (all offline).
  • πŸ‘οΈ Vision β€” drop photos, screenshots or scans: the assistant sees and analyses them.
  • πŸ“Ž Attach any file β€” PDF, Word, PowerPoint, Excel, text, code, audio and video (transcribed offline).
  • πŸ—‚οΈ Organize your chats β€” full-text search, rename, πŸ“Œ pin, πŸ“ folders, export (JSON / Markdown) and import.

πŸ“š Knowledge & web

  • πŸ“„ Ask your documents (RAG) β€” collections of PDFs, Office files, text, code… indexed on your PC, answers with numbered sources [1] [2].
  • 🌐 Web search, when you want it β€” turn on Web: the assistant searches (DuckDuckGo or your SearXNG), reads pages and the links you paste, and cites them. Off by default.
  • πŸ§‘β€πŸ’Ό Assistants β€” a role, its documents and web access, reusable in one click.
  • ⚑ Prompt library β€” type / to insert a saved prompt with {{variables}}; standing instructions for every chat or just one.

🎨 Create

  • 🎬 Studio: images & videos β€” a gallery of everything you generated, with a Grok-Imagine-like prompt bar: text β†’ image, text β†’ video, image β†’ video ("Animate"). Videos come with synchronized sound πŸ”Š (LTX-2.5), and your idea is expanded into a detailed prompt first.
  • πŸ–ΌοΈ Images β€” generate and edit by asking ("make it snow", "remove the bottle"); the agent checks its own result and retries.
  • 🧩 Code & apps panel β€” games, pages, tools and scripts written live next to the chat, with a running preview.
  • πŸ—οΈ Multi-file projects β€” websites (index.html + css/ + js/), Python or Node.js programs; the assistant makes the pictures, then Sparky tests the project automatically (headless browser, npm install, run) and the model fixes the errors until it works. β–Ά Run anytime, download as ZIP.

πŸŽ™οΈ Voice

  • 🎀 Dictation, offline β€” click the mic, talk, stop: Whisper writes it in the input box.
  • πŸ”Š Read aloud β€” on any answer, offline Piper voices (English, French, German, Spanish, Italian).

πŸ› οΈ Tools & automation

  • πŸ’» Computer mode β€” Sparky can look at and act on your PC: browse folders and the desktop, read and search files (PDF and Office too), take a screenshot, write, copy, move, send to the Recycle Bin, open files and apps, run PowerShell commands. You choose the security level for each chat: Off, Read only, Read freely & ask before changes (recommended), Ask for everything or Full access; actions that need your OK show an approval card (Allow / Always in this chat / Deny).
  • πŸ”Œ MCP tools β€” plug any Model Context Protocol server (same config as Claude Desktop: files, GitHub, databases…).
  • ⏰ Scheduled tasks β€” "every morning at 8, summarize the tech news": the answer lands in a new chat.
  • πŸ”— OpenAI-compatible API β€” use Sparky's model from Continue, VS Code extensions or scripts at http://127.0.0.1:7860/v1. Off by default.
  • πŸ€– Sparky Bot (beta) β€” a companion that remembers you and learns your style, with a memory you can see and edit (details).

βš™οΈ Models & setup

  • 🩺 System scan β€” checks your GPU, memory and disk, then recommends the models that fit your machine.
  • πŸ“¦ Model library β€” one-click installs, fast parallel resumable downloads, speed / quality / memory indicators for your hardware.
  • ♻️ Models already on your PC β€” LM Studio, Ollama, Hugging Face cache, Jan, GPT4All, other ComfyUI installs… used in one click.
  • ☁️ Cloud models, if you want β€” OpenRouter, Claude, OpenAI, Gemini, Mistral… Off by default.
  • βœ… Only official models β€” "uncensored", "abliterated" or NSFW variants are excluded from the catalog and the Hugging Face search.
  • πŸŒ— Light or dark theme, πŸ‡¬πŸ‡§ English or πŸ‡«πŸ‡· French interface, ⬆️ one-click updates.

πŸ“‹ Everything Sparky supports

Area Supported
πŸ’¬ Chat streaming answers Β· visible reasoning with 4 thinking levels Β· edit a sent message Β· regenerate Β· continue Β· answer versions (β€Ή 2/3 β€Ί) Β· copy Β· read aloud Β· temporary chats Β· English / French UI Β· light / dark / auto theme
πŸ—‚οΈ Conversations history Β· full-text search Β· rename Β· pin Β· folders Β· export JSON (with images) or Markdown Β· import (Sparky JSON or [{role, content}])
πŸ§‘β€πŸ’Ό Setup of a chat assistant presets (role, documents, web) Β· per-chat instructions (system prompt) Β· standing instructions for every chat Β· prompt library with /commands and {{variables}}
πŸ“„ Documents (RAG) collections Β· PDF (with page numbers), Word, PowerPoint, Excel, OpenDocument, text, Markdown, CSV, JSON, code, audio and video (transcribed) Β· local multilingual embeddings (multilingual-e5-small) + keyword search Β· numbered citations with the source passages
🌐 Web search (DuckDuckGo / Bing, or your SearXNG) · reads pages and pasted links (HTML, PDF, text) · citations · private addresses blocked · off by default, per chat
πŸ“Ž Files in a message images (vision), PDF, Office, text and code, audio and video (offline Whisper transcription) Β· drag and drop, paste
🎬 Studio media library of every image and video (Studio and chats) Β· text β†’ image Β· text β†’ video Β· image β†’ video ("Animate") Β· 16:9, 9:16, 1:1, 4:3, 3:4 Β· 3 to 10 s Β· prompt enhancement Β· video player, download, reuse prompt Β· the local assistant pauses during a video and comes back after
🎞️ Video models LTX-2.5 22B (video + sound, ~40 s for 4 s of video on an RTX Spark once loaded) · Wan 2.2 5B (lighter, no sound)
πŸ–ΌοΈ Images generate and edit by instruction (FLUX.2 Klein, Qwen-Image 2.1, SDXL) Β· paint a zone to edit Β· reuse a face, character, style or scene Β· the agent checks its result and retries
🧩 Code & projects artifacts panel with live preview, code, versions, download Β· multi-file projects (web, Python, Node.js) Β· automatic test-and-fix loop (headless browser, Python, npm install / build / test) Β· β–Ά Run Β· ZIP download Β· generated pictures inside projects
πŸ“ Markdown GFM tables Β· task lists Β· LaTeX (KaTeX) Β· Mermaid diagrams Β· syntax highlighting Β· citations Β· served locally (no CDN)
πŸŽ™οΈ Voice offline dictation (Whisper large-v3 turbo / base) with live level bars Β· offline read-aloud (Piper voices: en, fr, de, es, it)
πŸ’» Computer mode list, read (PDF / Office), search, info, screenshot Β· write, mkdir, copy, move Β· Recycle Bin (never a permanent delete) Β· open files / apps / URLs Β· PowerShell commands (2 min timeout) Β· 5 security levels per chat Β· approval cards (once / always in this chat / deny) Β· system folders always protected
πŸ”Œ Tools MCP servers over stdio (command / args / env) or Streamable HTTP (url / headers), Claude Desktop config format
⏰ Automation scheduled tasks: daily, weekly, every N minutes, once · results filed in a new chat with an unread badge
πŸ”— API OpenAI-compatible /v1/models, /v1/chat/completions (streaming or not), /v1/embeddings Β· bearer key Β· off by default Β· local only
πŸ“¦ Models local GGUF assistants (llama.cpp: CUDA x64 / ARM64, or CPU) Β· catalog with speed / quality / memory for your PC Β· models already on your PC (LM Studio, Ollama, Hugging Face cache…) Β· Hugging Face search Β· optional cloud models (OpenRouter, Claude, OpenAI, Gemini, Mistral, Groq, DeepSeek, xAI, any OpenAI-compatible server) Β· only official, non-NSFW models
πŸ€– Sparky Bot (beta) companion with long-term, editable memory Β· style profile Β· journal Β· relationship level
πŸš€ Install & updates step-by-step installer Β· system scan with recommended models Β· one-click updates

πŸ“Έ Screenshots

Computer mode with an approval card
πŸ’» Computer mode β€” Sparky reads your files, then asks before writing
Video models in the library
πŸ“¦ Model library β€” assistants, images, videos, voice
Studio: videos generated locally
🎬 Studio β€” your images and videos, with their sound
Studio video viewer
🎞️ Video viewer β€” balloons over Cappadocia, made on the PC in 2 minutes
Animate a picture
✨ Image β†’ video β€” pick a picture, describe the motion and the sounds
Web search with citations
🌐 Web search β€” the assistant searches, reads and cites its sources
Answers from your documents with citations
πŸ“„ Documents β€” answers from your files, with numbered sources
Tables, formulas and diagrams
πŸ“ Rich answers β€” tables, LaTeX, Mermaid, versions of an answer
Workspace: document collections
πŸ“š Workspace β€” document collections indexed on your PC
Workspace: assistants
πŸ§‘β€πŸ’Ό Assistants β€” a role, documents and web access, reusable
Prompt library
⚑ Prompt library β€” type / to insert a saved prompt
MCP tools
πŸ”Œ Tools (MCP) β€” plug any MCP server
Scheduled tasks
⏰ Scheduled tasks β€” prompts that run by themselves
Light theme
πŸŒ— Light theme β€” or dark, or follow Windows
Image generation and editing
πŸ–ΌοΈ Images β€” generate, then edit by instruction
Visible reasoning
🧠 Thinking β€” see how the model reasoned
Settings
βš™οΈ Settings β€” language, theme, system, models, context
Model library
πŸ“¦ All models β€” speed, quality and memory for your PC
Welcome screen with system scan
🩺 First launch β€” system scan and recommended models
Model menu with thinking levels
πŸ”€ Model menu β€” switch models, pick a thinking level

Sparky writes a Breakout game live in the side panel, then runs it
🧩 A Breakout game written live in the side panel, then played.

Generating and editing an image

Offline voice dictation
Offline voice dictation: live level bars, then the text lands in the input box.

🚧 Sparky Bot β€” personal companion with memory (beta, in progress)

Status: in active development. Sparky Bot ships as a beta inside Sparky (sidebar β†’ Sparky Bot). It works today, but the memory engine and the personality system are still being tuned and may change.

Sparky Bot is a friend-like companion that remembers you, learns your style and grows with you β€” in the spirit of OpenAI's Dots and Grok's companions, but 100% local and with a memory you can actually see and edit.

Sparky Bot learns about the user while chatting

Sparky Bot with its memory
Memory β€” every fact it learned, grouped, editable, pinnable
Sparky Bot journal
Journal β€” it reflects between conversations and remembers to follow up

How the memory works

  • Learns after every message β€” a background pass extracts durable facts about you (who you are, tastes, projects, people, goals, events) and decides to add, update or forget, Mem0-style.
  • Guard-rails in code, not just in the prompt β€” one fact per memory; an update must be about the same fact (checked by meaning) or it becomes a new memory instead of overwriting; near-duplicates are ignored; a new memory must come from your words, never from the bot's own reply.
  • Smart retrieval β€” before each reply it picks the memories that matter now: meaning (local multilingual embeddings, multilingual-e5-small), importance, recency, plus pinned facts.
  • Time-aware β€” "next Tuesday" is stored as a real date, and past events are updated with what happened.
  • Learns your style β€” tone, length, formality, humor, language.
  • Reflects when idle β€” merges duplicates, writes a short journal, updates its summary of your relationship and prepares what to ask next time ("How did the meetup go?").
  • Relationship level β€” from Just met to Close friends as you talk over days. Always a friend: never romantic, never clingy.
  • You stay in control β€” see, edit, pin or delete any memory, turn learning off, or Forget everything in one click. Nothing leaves your PC.

Roadmap

  • Persistent memory with add / update / forget, guard-rails and semantic search
  • Style profile, journal, follow-ups, relationship level, 4 personalities
  • Animated avatar, bilingual UI (English / French)
  • Voice conversations (Whisper in, local text-to-speech out; read-aloud already works in the main chat)
  • Proactive check-ins (optional notifications)
  • Memory import / export, per-memory "why do you know this?" with the source message
  • Larger evaluation set for the memory engine across models

πŸš€ Install (Windows 10/11)

One line, in PowerShell:

irm https://raw.githubusercontent.com/anisayari/sparky/main/install.ps1 | iex

Or download the project (Code > Download ZIP), unzip it and double-click install.bat.

The installer walks you through 7 simple steps:

  1. choose your language (English / FranΓ§ais) and check your machine,
  2. pick the install folder (default %LOCALAPPDATA%\Sparky),
  3. install Python 3.12 if needed (via winget),
  4. install PyTorch for your GPU and the image engine ComfyUI,
  5. install the AI engine llama.cpp (CUDA build for NVIDIA GPUs, x64 or ARM64),
  6. scan your hardware and show the models recommended for it (nothing is downloaded yet),
  7. create a Sparky shortcut on the desktop and in the Start menu, then open Sparky in your browser.

The step-by-step installer

Sparky then opens at http://127.0.0.1:7860 on its welcome screen: pick your language, see the system scan, use the models already on your PC in one click, or install the recommended ones (or any other from See all models). Nothing is downloaded without your click.

Next times, double-click the shortcut (or start.bat). To stop everything: stop.bat.

Installer options: -Lang en|fr, -Dir <folder>, -Yes (no questions), -Models (also download the recommended models from the terminal), -NoLaunch. For the one-line install, use the environment variables SPARKY_LANG, SPARKY_DIR, SPARKY_YES, SPARKY_MODELS, SPARKY_NOLAUNCH.

πŸ’» Which machine?

Machine Runs well
NVIDIA GPU 24 GB+ or 32 GB+ unified memory 27–35B assistants, Qwen-Image 2.1
NVIDIA GPU 12–16 GB 9–20B assistants, FLUX.2 Klein
NVIDIA GPU 6–8 GB 4–9B assistants, FLUX.2 Klein (slower)
No NVIDIA GPU small assistants (4B) on the CPU, no image generation

The system scan picks automatically among these.

🧠 Models

Speeds measured on an RTX Spark N1X (Q4, full power); Sparky adapts them to your GPU.

Assistant Size Speed GPQA (published) Vision Best for
gpt-oss 20B 11 GB 83 tok/s 71.5 fastest
Qwen3.5 35B A3B 21 GB 74 tok/s 84.2 βœ“ best fast all-rounder
Nemotron 3.5 Lightning 30B 24 GB 74 tok/s 75.4 fast without thinking
Qwen3.5 4B 3 GB 66 tok/s 76.2 βœ“ tiny, even without a GPU
Gemma 4 26B A4B 17 GB 62 tok/s 82.3 βœ“ fast and versatile
Qwen3.5 9B 6 GB 34 tok/s 81.7 βœ“ best small model
Gemma 4 12B 7 GB 34 tok/s 78.8 βœ“ light
Qwen3.8 27B 16 GB 16 (33 with MTP) 89.2 βœ“ smartest, best at code
Gemma 4 E4B 6 GB – – βœ“ small machines

All of them can think before answering (adjustable level). Vision can be added in one click when it is missing.

Images Size Time per image Style
FLUX.2 Klein 4B 7 GB ~3 s photo, readable text, edits by instruction
Qwen-Image 2.1 16 GB ~35 s most realistic, edits by instruction
Juggernaut XL v9 10 GB* ~15 s photo (SDXL)
Animagine XL 4.0 10 GB* ~15 s illustration (SDXL)
Voice Size Note
Whisper large-v3 turbo 1.6 GB very accurate, 99 languages (GPU)
Whisper base 0.3 GB light, for machines without a GPU
Video Size Time for 5 s Note
LTX-2.5 22B (distilled, int8) 39 GB ~45 s once loaded (RTX Spark) video with sound, text or image to video
Wan 2.2 TI2V 5B 18 GB ~2–3 min lighter, no sound

Video models are big: during a video, Sparky pauses the local assistant to give the whole GPU memory to the video model (about 5Γ— faster), then reloads it.

* includes the IP-Adapter files (β‰ˆ 4 GB, shared by all SDXL models) used to reuse a character or a style.

Every model keeps its own license (Apache 2.0, Gemma Terms of Use, NVIDIA Open Model License, etc.): check its Hugging Face page before any commercial use.

πŸ”§ Existing installation (ComfyUI / llama.cpp already installed)

Create a config.json file at the project root to reuse your folders:

{
  "python": "D:\\ai\\venv\\Scripts\\python.exe",
  "comfy_dir": "D:\\ai\\ComfyUI",
  "llama_server": "D:\\ai\\llama\\llama-server.exe",
  "llm_dir": "D:\\ai\\models",
  "mmproj_dir": "D:\\ai\\mmproj"
}

Other keys: voice_dir, data_dir, app_port (7860), llm_port (8080), comfy_port (8188). The SPARKY_CONFIG environment variable can point to another config file.

⌨️ Command line

runtime\venv\Scripts\python.exe app\syscheck.py                  # system scan (add --lang=fr for French)
runtime\venv\Scripts\python.exe app\models_cli.py --list         # catalog
runtime\venv\Scripts\python.exe app\models_cli.py --recommended  # install the recommended models
runtime\venv\Scripts\python.exe app\models_cli.py qwen359        # install one model

⬆️ Update / uninstall

  • Update: Sparky checks GitHub once an hour. When a new version is out, a message offers to install the update: Sparky runs git pull and restarts by itself. If files were modified locally, it lists them and gives the command to put them aside first; for an install made from the ZIP, it gives the install command to run again. The current version is in Settings > Version (and in the VERSION file).
  • Uninstall: stop.bat, then delete the install folder (%LOCALAPPDATA%\Sparky by default) and the shortcuts.

☁️ Cloud models (optional)

Sparky is 100% local by default. If you want, Settings > Cloud models lets you add a key for OpenRouter, Anthropic (Claude), OpenAI, Google Gemini, Mistral, Groq, DeepSeek, xAI, or any OpenAI-compatible server (LM Studio, vLLM, a company proxy...). Pick a model in the provider's list: it appears in the model menu with a ☁, and switching to it frees your GPU.

  • Keys stay on your PC (data\cloud.json) and are never sent back to the page.
  • While a cloud model is active, the footer says so: your messages, images and attached files then go to that provider.
  • Claude goes through the official anthropic SDK (adaptive thinking, effort, refusal fallback); the others through their OpenAI-compatible API.

πŸ”’ Privacy

Everything runs on your machine: conversations, documents, images and models stay in the install folder (data\, models\). The only outgoing connections download the tools and models (GitHub, PyPI, Hugging Face, the Piper voices), search the model library, check for updates (the VERSION file on GitHub), and β€” only when you turn them on β€” search the web and read pages (Web chip of a chat, scheduled tasks), run MCP tools that reach the internet, or talk to a cloud provider.

The local API only answers the Sparky page itself: requests from other websites (cross-site or DNS rebinding) are refused, and the projects the assistant writes run on their own origin (port 7861), so their code cannot drive Sparky. The OpenAI-compatible API (/v1) is off by default; when on, it requires its key and still only listens on 127.0.0.1. Web reading refuses private and local addresses.

πŸ’» Computer mode and security

Off by default. Pick a level with the Computer chip under the message box (it applies to that chat):

Level Reading (list, read, search, screenshot) Changes (write, copy, move, trash) Open apps Β· run commands
Off β€” β€” β€”
Read only βœ… ❌ ❌
Read freely & ask before changes β˜… βœ… πŸ™‹ asks you πŸ™‹ asks you
Ask for everything πŸ™‹ asks you πŸ™‹ asks you πŸ™‹ asks you
Full access βœ… βœ… βœ…

Whatever the level: Windows, Program Files, ProgramData and Sparky's own folder can never be modified, a deletion always goes to the Recycle Bin, commands stop after 2 minutes, and the model is told that file contents are data, never instructions. "Always in this chat" only lasts until you change the level.

πŸ”— OpenAI-compatible API

Turn it on in Workspace > API, then point any OpenAI client at Sparky's active model:

from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:7860/v1", api_key="sk-sparky-...")  # key shown in Workspace > API
print(client.chat.completions.create(model="sparky", messages=[{"role": "user", "content": "Hello!"}]).choices[0].message.content)

πŸ”Œ MCP tools

Workspace > Tools (MCP) takes the same JSON as Claude Desktop, for example:

{"mcpServers": {
  "files":  {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "C:\\Users\\me\\Documents"]},
  "remote": {"url": "https://example.com/mcp", "headers": {"Authorization": "Bearer ..."}}
}}

Servers start with Sparky (the bundled Node.js provides npx); their tools are offered to the assistant in every chat.

πŸ§ͺ Development

runtime\venv\Scripts\python.exe -m pip install pytest ruff
runtime\venv\Scripts\python.exe -m ruff check app tests
runtime\venv\Scripts\python.exe -m pytest

The tests need no model, GPU or network: they run Sparky on throw-away folders, with scripted models and fake cloud providers (tests/mocks.py). GitHub Actions runs them on Windows (Python 3.10 and 3.13) and Linux, and checks that the PowerShell scripts parse in Windows PowerShell 5.1.

πŸ‡«πŸ‡· En franΓ§ais

L'interface et l'installeur existent aussi en français : choisis Français au début de l'installation, ou change la langue dans Paramètres.

Sparky en franΓ§ais

πŸ—‚οΈ Project layout

app/
  server.py     web server + model management
  harness.py    agent: assistant <-> image tools loop, artifacts
  catalog.py    catalog, downloads, indicators
  syscheck.py   system scan and recommendations
  attach.py     attached files -> text (PDF, Office, code, audio/video transcription)
  localscan.py  finds the models already on the PC (LM Studio, Ollama, Hugging Face...)
  updater.py    version check and one-click update (git pull)
  cloud.py      optional cloud providers (OpenRouter, Claude, OpenAI-compatible...)
  checker.py    automatic project tests (headless browser, Python, Node.js)
  stt.py        offline voice dictation (Whisper)
  tts.py        offline read-aloud (Piper voices through onnxruntime + espeak-ng)
  computer.py   computer mode: file / app / command tools, security levels, protected folders
  studio.py     Studio: media library, image / video / image-to-video jobs (LTX-2.5, Wan 2.2)
  rag.py        document collections: extraction, chunking, embeddings, search with citations
  web.py        web search and page reading (DuckDuckGo / Bing / SearXNG), private addresses blocked
  mcp.py        Model Context Protocol client (stdio and Streamable HTTP)
  workspace.py  assistants and prompt library
  scheduler.py  scheduled tasks
  openai_api.py OpenAI-compatible API (/v1)
  vendor/       Markdown libraries served locally (marked, DOMPurify, KaTeX, highlight.js, Mermaid)
  companion.py  Sparky Bot: persona, learning, reflection, journal (beta)
  memory.py     Sparky Bot memory: SQLite store + hybrid semantic retrieval
  index.html    interface (English / French)
install.ps1     step-by-step installer
VERSION         current version
requirements.txt  Sparky's own Python packages
tests/          regression tests (pytest), run by .github/workflows/ci.yml
start.ps1 / stop.ps1
docs/           screenshots and demos

πŸ“œ License

Code under the MIT license. ComfyUI (GPL-3.0) and llama.cpp (MIT) are downloaded separately during install.

About

πŸ”’ Your private AI assistant, 100% local on Windows: chat, vision, documents (RAG), web search, images, videos with sound, voice, code projects, MCP tools β€” one-line install, models picked for your PC.

Topics

Resources

Stars

61 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages