A voice + chat personal assistant in Python that talks with you and runs real automations on your machine. Powered by Google Gemini via a single API key, with proper tool-calling so the AI decides when to open apps, search the web, take notes, check the weather, control your system, and more.
You βΈ jarvis, what's the weather in Visakhapatnam and open youtube
β running get_weather(city='Visakhapatnam')
β running play_youtube(query='...')
JARVIS βΈ It's 31Β°C and sunny in Visakhapatnam. YouTube is open for you.
- Real-time chat β natural conversation with memory that persists between sessions.
- Voice in & out β speak to it (mic β speech-to-text) and it replies aloud (TTS). Falls back to text automatically if no mic/speakers.
- Tool-calling automations β the model calls real Python functions:
Category Tools System open_app,run_command,set_volume,take_screenshot,system_infoWeb open_website,web_search,play_youtube,get_weather,wikipediaFiles write_file,read_file,append_file,list_files(sandboxed)Utility get_datetime,add_note,read_notes,set_reminder,calculate - Model-agnostic β swap models in
.env(GPT-4o-mini, Gemini Flash, Llama 3.3, Grokβ¦). - Extensible β add a new automation in ~10 lines with one decorator.
Jarvis/
βββ main.py # entry point β python main.py
βββ config.py # loads .env settings
βββ requirements.txt
βββ .env.example # copy to .env and add your key
βββ jarvis/
βββ assistant.py # interactive loop (UI, input mode, commands)
βββ brain.py # Gemini client + tool-calling loop
βββ voice.py # speech-to-text + text-to-speech (optional)
βββ memory.py # rolling conversation memory + disk persistence
βββ automations/
βββ registry.py # @tool decorator + dispatch
βββ system.py # open apps, volume, screenshots, shell
βββ web.py # search, weather, wikipedia, youtube
βββ files.py # sandboxed file ops
βββ utils.py # time, notes, reminders, math
1. Web HUD (the interface) β animated Iron Man HUD in your browser, with live clock, weather, and system/mobile indicators. This is JARVIS's single front-end:
pip install -r requirements.txt
python main.py # boots the HUD and opens http://127.0.0.1:5000
# python main.py --no-browser # HUD without auto-opening the browserpython server.py runs the exact same thing. Set an access PIN in Settings to reach it from
your phone over the same Wi-Fi (a QR code is shown for quick pairing).
2. Terminal (CLI) β classic voice/text loop in the console, kept as a fallback:
python main.py --cli- Streaming replies β text appears token-by-token as the model thinks (SSE).
- Barge-in β tap π (or press
Esc) to cut JARVIS off mid-sentence and speak. - Multi-language β English / Hindi / Telugu for both understanding and spoken replies.
- Personas β JARVIS (formal), FRIDAY (casual), COACH (study coach) β switch in Settings.
- Long-term memory β "remember my sister's birthday is 4 March" persists across sessions
(
~/.jarvis/facts.json), and is fed back into every conversation. - Vision β drag-drop, paste, or πΌ attach an image; JARVIS describes/acts on it (free vision model first, paid fallback). Great for your photography work.
- RAG over your files β "summarize my notes", "find X in my resume" scans your workspace/Documents/Desktop/Downloads.
- Media & power β play/pause, next/prev, brightness, lock, sleep.
- Win+S launcher β "open chrome / vscode / settings" runs the Win+S β type β Enter flow you asked for. Plus quick tabs (Internshala, Instagram, GitHubβ¦).
- System watchdog β pops toast alerts for low battery / high CPU / full RAM (i3-friendly).
- Themes β Arc (cyan), Mark III (gold-red), Ultron (red), Stealth (mono).
- Command palette β
Ctrl+Kfor quick actions. - Draggable panels, chat export (Markdown), model fallback (auto-switch on error).
- Mobile control β set an access PIN, open the shown LAN URL on your phone (same Wi-Fi).
- Telegram bot β control the laptop from anywhere via Telegram, with full AI chat, quick-action menu, approval flow for destructive tools, and proactive watchdog alerts.
- Single-AI brain β Gemini drives every tool call (screenshot, open_app, run_commandβ¦). Streamed tokens are the final reply β no second pass. Falls back across smaller Gemini models automatically on rate-limit, and rotates to a backup key when the primary is exhausted.
- Personal identity baked in β JARVIS starts every session already knowing who you are
(name, education, projects, socials, contact). See
jarvis/owner.py. - Files anywhere β write, append, copy, move, rename, mkdir, list, read on any path the OS lets you touch. Delete still requires approval.
- Create anything β Markdown, HTML, CSV, JSON, YAML, XML, TXT, code files (Python, JS, TS, Go, Rust, Java, C++, β¦), PDF, DOCX, XLSX, PPTX (all from Markdown-lite), and images generated from a text prompt via Gemini 2.5 Flash Image.
- Run code β
run_python(approval-gated) executes a Python snippet in a 10s sandbox, returns stdout/stderr.
python main.py opens the HUD at http://127.0.0.1:5000 (and auto-launches your browser).
- Arc reactor β a live canvas animation that spins faster and glows brighter while JARVIS is thinking or speaking.
- Boot sequence, animated ring gauges (CPU / RAM), and a status cluster (ONLINE / MODEL / TOOLS).
- Live indicators β clock + date, current weather, and battery / network / CPU / RAM pills, visible on desktop and mobile layouts.
- Round icon buttons β settings, command palette, QR pairing, contacts, session memory, mic, vision, and send, rendered as crisp inline SVG icons (no emoji, fully theme-colored).
- Settings modal β paste API key (saved to
.env), pick a model/persona/language/theme, set a mobile PIN, toggle voice. - Voice β the mic button uses your browser's speech recognition; replies are spoken via speech
synthesis. No
pyaudioneeded for the web UI. - Approval flow β destructive tools (shutdown, delete, send_whatsapp) trigger an approval card.
- Tool calls show as glowing chips under each reply so you can see what JARVIS actually did.
- Telegram β the same brain and memory are reachable from your phone via the Telegram bot.
pip install -r requirements.txtMicrophone (optional, for voice input).
pyaudioneeds system audio libs:
- Windows:
pip install pyaudio(orpip install pipwin && pipwin install pyaudio)- macOS:
brew install portaudio && pip install pyaudio- Linux:
sudo apt install portaudio19-dev && pip install pyaudioSkip this if you only want to type β set
JARVIS_STT=0in.env.
cp .env.example .env # Windows: copy .env.example .envThen edit .env and paste your key from https://aistudio.google.com/apikey.
You can also add a second key as JARVIS_GEMINI_KEY_BACKUP for automatic
rotation when the primary key hits its rate limit.
python main.py| Variable | Default | Meaning |
|---|---|---|
JARVIS_GEMINI_KEY |
β | Required. Your Gemini API key. |
JARVIS_GEMINI_KEY_BACKUP |
β | Optional. Used automatically when the primary is rate-limited. |
JARVIS_MODEL |
gemini-2.0-flash |
Any Gemini model id (e.g. gemini-2.0-flash, gemini-2.5-flash). |
JARVIS_VOICE |
1 |
1 = speak replies aloud, 0 = text only. |
JARVIS_STT |
1 |
1 = listen via mic, 0 = type input. |
JARVIS_NAME |
JARVIS |
Assistant name/personality. |
JARVIS_WAKE_WORD |
jarvis |
Optional wake word. |
In-session commands: exit, reset (clear memory), text / voice (switch input mode).
Run JARVIS on your PC and DM it from any phone on any network β same AI brain, same automations, with an inline keyboard and proactive alerts.
- Open Telegram, message @BotFather.
- Send
/newbot, follow the prompts, copy the token.
Edit .env (set JARVIS_PIN first if you haven't β Telegram reuses it):
JARVIS_PIN=5252
JARVIS_TELEGRAM_ENABLED=1
JARVIS_TELEGRAM_TOKEN=123456:ABC-DEF...Install the dependency and restart:
pip install -r requirements.txt # adds python-telegram-bot
python server.pyYou should see [telegram] bot started in the startup output.
- Open your bot in Telegram.
- Send
/startβ it'll ask for the PIN. - Send
/start 5252(or whatever your PIN is). The PIN message is deleted for safety. You now see the main menu.
- Quick-action menu β
πΈ Screenshot Β· π₯ System Β· π Battery Β· π» CPU/RAM Β· π Open URL Β· π Files Β· π Volume Β· πͺ Windows Β· β» Shutdown Β· π Restart. - Commands β
/me,/myprojects,/screenshot,/battery,/windows,/volume 50,/open chrome,/cancel_shutdown,/reset,/help. - File ops β
/file write <path>(then attach a file),/file write_text <path> <content>,/file append <path>,/file mkdir <path>,/file list [path],/file read <path>,/file delete <path>(asks for approval). Files work anywhere your OS user can write. - Free chat β any non-command text is sent to JARVIS's brain, so you can ask "open YouTube and search lo-fi" or "summarize my notes".
- Screenshots come back as photos β the bot detects
Screenshot saved to β¦and sends the file. - Approval flow β destructive tools (shutdown, restart, delete file) show a β / β inline keyboard. Approve from anywhere.
- Proactive alerts β low battery / high CPU / full RAM alerts get DMed automatically (forwarded from the same watchdog the web UI uses).
- Shared memory β Telegram conversation and web/CLI share the same Memory, so context carries between devices.
- Single-AI replies β Gemini handles both the tool-calling and the final wording. Falls back across smaller Gemini models automatically.
- Multi-user β multiple Telegram accounts can be linked (each
sends
/start <PIN>). Revoke by deleting~/.jarvis/telegram_authorized.json.
Set JARVIS_TELEGRAM_ENABLED=0 in .env and restart. The Flask server
keeps running normally.
Drop a function in any file under jarvis/automations/ (or a new one):
from .registry import tool
@tool(
name="lock_screen",
description="Lock the computer screen.",
)
def lock_screen() -> str:
import os, platform
if platform.system() == "Windows":
os.system("rundll32.exe user32.dll,LockWorkStation")
return "Screen locked."Import it in jarvis/automations/__init__.py and JARVIS can now call it β no other
wiring needed. The model reads the description to decide when to use it.
- File tools are sandboxed to
~/jarvis_workspace. run_commandexecutes shell commands β the model is told to be cautious, but treat it like giving the AI a terminal. Remove that tool fromautomations/__init__.pyif you want a locked-down build.- Your
.env(API key) is git-ignored.
Built by Sampath Satya Saran Β· powered by Google Gemini.