Sparky is an ai agent designed to give users a nice chat experience while also being able to perform tasks. It's chill, it's got personality, and yeah it's still in beta so maybe don't rely on it for anything critical lol.
- GitHub Repository (the repo you're probably on rn)
- Official (stable) Instance (holler at @realsparkybot on Telegram)
- Documentation (coming soon™)
- Bug Tracker (found a bug? lemme know)
Wanna help? fork it, make your changes, send a PR. we don't bite 🦷 bug fixes, features, better docs, vibes—all welcome. just keep it chill and add tests if you're adding big stuff.
Sparky is licensed under the AGPLv3 License. See the LICENSE file for more info. (c) 2026 voltage!studios.
- a computer (duh)
- cloudflare account (free!)
- telegram and a bot token (also free!)
- openrouter api key (tons of free models fr)
- a brain (optional but we recommend it)
-
Clone the repo:
git clone https://github.com/voltagestudiosofficial/sparky-worker.git cd sparky-worker -
Install the goods:
npm install -
Make a Telegram bot:
- message @BotFather on Telegram
- follow the vibes to create one
- keep that token safe fam
-
Grab an OpenRouter API key:
- sign up at openrouter.ai
- steal it from settings
- don't commit this to git bro
-
Create a
.envfile (already gitignored so ur good):TELEGRAM_BOT_TOKEN=your_token_here OPENROUTER_API_KEY=your_key_here PRIMARY_MODEL=openai/gpt-4-turbo SYSTEM_PROMPT=You are Sparky, a helpful AI assistant # Discord configuration (optional) DISCORD_BOT_TOKEN=your_discord_bot_token DISCORD_PUBLIC_KEY=your_discord_public_key_hex DISCORD_APP_ID=your_discord_application_idNote: Sparky now always uses
openrouter/gpt-oss-20b:freefor chat responses. ThePRIMARY_MODELvariable is ignored - we always use the free GPT-OSS 20B.For voice messages: Voice transcription requires
OPENROUTER_API_KEYand uses OpenRouter's free whisper-1 model.For images: GPT-OSS 20B is text-only and cannot analyze images. For image support, you would need to set up a vision model separately.
-
Run it:
npm run dev
🔐 pro tip: use
wrangler secretfor production stuff - it's locked down and never stored locally. ur.envfile is chill cuz it's gitignored, but keep those secrets in wrangler when u deploy.
-
log in to cloudflare:
npm run wrangler login -
add ur secrets (they'll be encrypted no cap):
npm run wrangler secret put TELEGRAM_BOT_TOKEN npm run wrangler secret put OPENROUTER_API_KEY- paste when prompted (it won't show)
- don't put these as env vars or command args
-
deploy it:
npm run deploy -
set up the telegram webhook:
- get ur worker URL from the cloudflare dashboard
- message @BotFather and do
/setwebhook (worker URL goes here lol)/telegram - check it worked with
/getwebhookinfo