How fatihmakes/mark-xlix works
Purpose and Entry Points
MARK XLIX is a cross-platform, local personal AI assistant centered on low-latency Gemini Live voice interaction, computer control, visual context, and persistent personalization. main.py is the runtime orchestrator for the Gemini session, audio I/O, and tool dispatch. ui.py hosts the desktop HUD and interaction controls; setup.py handles first-run setup.
Session and LLM Core
The live assistant loop connects user input, Gemini reasoning/tool calls, and spoken or UI output. LLM integration, speech recognition, and speech synthesis are separated under core/, while the assistant behavior and routing policy are defined in core/prompt.txt.
• main.py
• core/llm_client.py
• core/stt.py
• core/tts.py
Desktop UI and Remote Surface
The primary UI is a PyQt6 HUD with waveform, activity log, interruption controls, camera/display elements, settings, and dynamic content presentation. A separate dashboard server exposes a browser-based remote-control surface, with TLS material present for secure hosting/pairing.
• ui.py
• dashboard/server.py
• dashboard/static/app.html
• config/certs/jarvis.crt
Tool/Action Boundary
The model-facing capability boundary is the actions/ package: main.py dispatches interpreted requests to focused adapters that execute OS operations or call external services. This is the primary safety and platform-integration boundary: actions can manipulate the desktop, applications, browser, files, messaging, and scheduled reminders.
• actions/computer_control.py
• actions/computer_settings.py
• actions/open_app.py
Computer Awareness and Automation
Visual and system-awareness actions feed screen/webcam context and hardware telemetry into the assistant workflow. Autonomous developer work and proactive suggestions extend the reactive command loop into multi-step or idle-time behavior.
• actions/screen_processor.py
• actions/system_monitor.py
• actions/dev_agent.py
• actions/proactive.py
Information and External-Service Actions
Information retrieval uses Gemini-grounded search with DuckDuckGo fallback; specialized actions provide weather, flights, YouTube, game platform, and messaging integrations. These modules isolate service-specific protocols from the main live session.
• actions/web_search.py
• actions/weather_report.py
• actions/flight_finder.py
• actions/send_message.py
Persistence, Setup, and OS Integration
Persistent memory stores user preferences, context, language, and personalization independently of the active conversation. Configuration management supports assistant/user naming and runtime settings. Installation/setup also handles OS-specific boot registration and native scheduling mechanisms, spanning Windows, macOS, and Linux.
• memory/memory_manager.py
• memory/config_manager.py
• core/installer.py
• setup.py
Runtime Dependencies and Infrastructure
The application runs on Python 3.11/3.12 with microphone and OS automation dependencies, requiring a Gemini API key. Core external dependencies include Gemini Live/API services, OS-native desktop APIs and schedulers, web search providers, and optional Steam/Epic, browser, messaging, weather, and flight services. Package dependencies are declared in requirements.txt.
Main entry points: main.py Runtime orchestrator · web_search.py Information services · llm_client.py Gemini Live client · ui.py Desktop HUD
Components 19
Entry & Surfaces
- Runtime orchestrator · Runs the live session, audio I/O, and tool dispatch.
main.py - Desktop HUD · Voice interaction, visual context, controls, and activity display.
ui.py - Remote dashboard · Browser-based remote control surface.
dashboard/server.py - Dashboard client
dashboard/static/app.html
Live Assistant Core
- Gemini Live client · Connects the session to Gemini reasoning and tool calls.
core/llm_client.py - Assistant policy · Defines assistant behavior and routing policy.
core/prompt.txt - Speech recognition
core/stt.py - Speech synthesis
core/tts.py
Actions & Automation
Model-facing capability and platform boundary.
- Desktop controls · Computer control, settings, and application launching.
actions/computer_control.py - Visual & system awareness · Captures screen context and system telemetry.
actions/screen_processor.py - Proactive automation · Runs developer tasks and idle-time suggestions.
actions/dev_agent.py - Information services · Search and specialized external-service requests.
actions/web_search.py
Persistence & Setup
- Personal memory · Persists preferences, context, language, and personalization.
memory/memory_manager.py - Runtime configuration · Stores assistant identity and runtime settings.
memory/config_manager.py - First-run setup · Initializes installation and OS integration.
setup.py - OS installer · Registers platform-specific boot and scheduling integration.
core/installer.py
Other components
- Gemini API / Live
- Desktop OS & services · Native desktop APIs, apps, schedulers, and service integrations.
- Python dependencies
requirements.txt
Connections 23
- Desktop HUD → Runtime orchestrator: user controls
- Dashboard client → Remote dashboard: remote control
- Remote dashboard → Runtime orchestrator: session commands
- Speech recognition → Runtime orchestrator: transcript
- Runtime orchestrator → Gemini Live client: live requests
- Gemini Live client → Gemini API / Live: Live API
- Assistant policy → Gemini Live client: behavior policy
- Runtime orchestrator → Speech synthesis: spoken responses
- Speech synthesis → Desktop HUD: assistant activity
- Runtime orchestrator → Desktop controls: tool dispatch
- Runtime orchestrator → Visual & system awareness: context requests
- Runtime orchestrator → Proactive automation: agent tasks
- Runtime orchestrator → Information services: service requests
- Desktop controls → Desktop OS & services: desktop operations
- Visual & system awareness → Desktop OS & services: screen and telemetry
- Proactive automation → Desktop OS & services: automation
- Information services → Gemini API / Live: grounded search
- Information services → Desktop OS & services: external providers
- Runtime orchestrator → Personal memory: personal context
- Runtime orchestrator → Runtime configuration: runtime settings
- First-run setup → OS installer: installation
- OS installer → Desktop OS & services: boot and scheduling
- Python dependencies → Runtime orchestrator: runtime packages