How adilmunawar/jarvis works
1. Overall shape
This is a Python-based personal assistant/JARVIS-style automation system. The repository is organized around a central “brain” that routes user commands into specialized modules for speech, automation, web tasks, vision, and utility features.
2. Primary entry points
jarvis.py appears to be the main runtime entry point described in the README. Supporting top-level scripts like ui.py, demo.py, and co_brain.py likely provide alternate frontends, demos, or coordination logic around the core assistant loop.
3. Core command-routing layer
The Brain/brain.py, Automation/Automation_Brain.py, Time_Operations/brain.py, and Vision/MVbrain.py / Vision/Vbrain.py files suggest a multi-brain architecture: one central orchestration layer plus domain-specific routers. These components likely classify commands and dispatch them to the correct subsystem instead of keeping all logic in one place.
4. Speech input and speech output
Voice interaction is a first-class path. NetHyTechSTT/listen.py handles speech-to-text input, while TextToSpeech/Fast_DF_TTS.py provides text-to-speech output. The presence of files like speech_output.txt, input.txt, and conversation-history logs indicates the assistant also persists spoken/text exchanges for debugging or context.
5. Task automation subsystem
The Automation/ package is the main action layer for controlling the machine and browser. It includes modules for opening apps, tab automation, scrolling, battery checks, YouTube playback, Spotify playback, web opening, and web data fetching. This is the boundary where abstract commands become OS/browser actions.
6. Feature/utility modules
Features/ contains small capability-focused helpers such as volume control, microphone/speaker health checks, battery percentage, IP lookup, jokes, advice, clap detection, and file creation. These are likely invoked by the brain when a command matches a narrow utility task.
7. Web and online integrations
Several folders point to external-service driven features: Real_Time/ for Google search flows, Weather_Check/check_weather.py for weather, and Whatsapp_automation/wa.py for WhatsApp automation. Automation/Play_Music_YT.py, Automation/Youtube_play_back.py, and Spotify-related code show direct dependence on online media platforms.
8. Scheduling and time-based behavior
Time_Operations/ and schedule.txt indicate reminder/alarm/scheduler support. Time_Operations/throw_alert.py likely triggers notifications or alerts based on parsed times, while this subsystem handles deferred actions rather than immediate commands.
9. Vision and image generation
The Vision/ package suggests optional camera/image-based features, separate from voice. TextToImage/gen_image.py indicates the assistant can also generate images from text, which is a distinct capability path from command automation.
10. Data and context persistence
Data/DLG_Data.py, Alam_data.txt, chat_hystory.txt, conv_history.txt, history.txt, and log.txt show local data storage for dialogue, alarms, and logs. This repo appears to rely on flat files rather than a database for conversation state and lightweight memory.
11. External tooling and platform coupling
chromedriver.exe makes browser automation a concrete dependency, likely for Selenium-style control of Chrome. requirements.txt and setup.py define the Python environment, so the architecture is strongly tied to local desktop execution rather than a cloud service.
12. Likely runtime flow
The expected flow is: user speaks or types a command → STT/input layer captures it → the brain/router identifies intent → a specialized module performs the action (system, web, media, reminder, vision, etc.) → TTS or UI returns the result. The repo is therefore best understood as a local, modular desktop assistant with several service-specific adapters behind one command interface.
Main entry points: Brain/brain.py Brain · Automation_Brain.py Automation brain · jarvis.py jarvis.py · Time_Operations/brain.py Time brain
Components 21
Interfaces
Ways users enter commands and receive responses
- jarvis.py · Main assistant runtime
jarvis.py - ui.py · Alternate user interface
ui.py - demo.py · Showcase or test run
demo.py - Speech input · Speech-to-text command capture
NetHyTechSTT/listen.py - Speech output · Text-to-speech response generation
TextToSpeech/Fast_DF_TTS.py
Core Brain
Command routing and orchestration
- Brain · Primary intent dispatcher
Brain/brain.py - Co-brain · Secondary orchestration layer
co_brain.py - Automation brain · Routes automation commands
Automation/Automation_Brain.py - Time brain · Routes reminders and time-based actions
Time_Operations/brain.py - Vision brain · Routes camera and vision tasks
Vision/Vbrain.py - MV brain · Alternate vision command router
Vision/MVbrain.py
Actions
Local machine, browser, and media control
- System actions · Open apps, check battery, volume, file creation, device health
Automation/open_App.py - Browser actions · Tabs, scrolling, web open, page data, YouTube playback
Automation/tab_automation.py - Media actions · Music and playback helpers for YouTube and Spotify
Automation/Play_Music_YT.py - Utilities · Advice, jokes, IP lookup, clap detection, microphone and speaker checks
Features/get_jokes.py
Online Integrations
External services and web-backed features
- Web services · Search, weather, WhatsApp, and data fetch helpers
Real_Time/google_big.py - Image gen · Text-to-image generation
TextToImage/gen_image.py - Alerts · Deferred alerts and reminders
Time_Operations/throw_alert.py
State & Data
Persistent text files and stored context
- Dialogue data · Conversation-related data access
Data/DLG_Data.py - Flat files · Chat history, logs, schedule, and speech/input buffers
chat_hystory.txt - Runtime deps · Python packaging and browser driver dependency
requirements.txt
Connections 20
- jarvis.py → Speech input: capture input · Main runtime accepts spoken commands
- jarvis.py → Brain: route · Entry point hands commands to the core router
- ui.py → Brain: send command · UI forwards typed commands to the brain
- demo.py → Brain: exercise · Demo run likely uses the same routing layer
- Brain → Automation brain: dispatch · Core brain delegates action commands
- Brain → Time brain: dispatch · Core brain delegates reminder and alert commands
- Brain → Vision brain: dispatch · Core brain delegates vision commands
- Brain → Co-brain: coordinate · Secondary orchestration for multi-step flows
- Automation brain → System actions: control · Automation router triggers local system tasks
- Automation brain → Browser actions: browse · Automation router triggers browser automation
- Automation brain → Media actions: play media · Automation router handles music and video playback
- Automation brain → Utilities: invoke · Automation flow can call narrow utility helpers
- Brain → Web services: query · Core routes online lookup and service tasks
- Brain → Image gen: generate · Core can trigger text-to-image generation
- Time brain → Alerts: schedule · Time subsystem emits reminders and alerts
- Vision brain → MV brain: delegate · Vision entry point may forward to alternate vision router
- jarvis.py → Speech output: respond · Main runtime speaks results back to the user
- Brain → Dialogue data: store context · Conversation data supports memory and dialogue state
- Brain → Flat files: persist · Assistant uses flat files for history, logs, and buffers
- Automation brain → Runtime deps: depends on · Browser/system automation relies on packaged runtime and driver