How hemachandranl2025cse-prog/jarvis-ai works
Purpose and Entry Points
JARVIS-AI is a Python personal-assistant system combining LLM-driven task planning with desktop, browser, file, and web automation. Primary application entry points are main.py for assistant startup and ui.py for the user-facing interface. or_client.py is the likely boundary to the external AI/model client.
Agent Orchestration
The agent package defines the execution pipeline:
• agent/planner.py translates user intent into a plan of actions.
• agent/executor.py dispatches planned work to action implementations.
• agent/task_queue.py sequences or manages pending tasks.
• agent/error_handler.py provides failure handling around planning/execution.
This separates intent interpretation from side-effecting automation, allowing the executor to act as the principal control boundary.
Action Capability Layer
The actions directory is the assistant’s tool surface. Action modules encapsulate concrete external effects and are selected by the agent runtime. Major capability groups include:
• Desktop/application control: actions/computer_control.py, actions/open_app.py, actions/desktop.py
• Browser and web operations: actions/browser_control.py, actions/web_search.py, actions/youtube_video.py
• Local file and screen processing: actions/file_controller.py, actions/file_processor.py, actions/screen_processor.py
• Communication and personal workflows: actions/send_message.py, actions/reminder.py, actions/flight_finder.py
• Development and system operations: actions/code_helper.py, actions/dev_agent.py, actions/computer_settings.py
These modules form the key safety and integration boundary because they interact with the OS, applications, browser, local files, and remote services.
Prompt and Model Boundary
core/prompt.txt contains the core prompt/instruction asset used to steer assistant behavior. or_client.py likely submits prompts and receives generated responses from an external AI provider; the exact provider is not identified in the supplied repository view. The planner consumes this model-facing behavior to decide which action sequence to execute.
State, Memory, and Configuration
Persistent assistant context is managed separately from execution:
• memory/memory_manager.py owns memory storage/retrieval behavior.
• memory/config_manager.py manages memory-related configuration.
• config/__init__.py establishes the project configuration package.
The expected flow is user input → prompt/model planning → queued execution → action results, with relevant context read from or written to the memory layer.
Runtime and Infrastructure
The project is Python-based, with package/install metadata in setup.py and runtime dependencies in requirements.txt. It operates as a local automation application rather than an explicitly defined web service. Material external dependencies include an AI/model endpoint through or_client.py, browser/web destinations used by search/video/flight actions, and the host operating system and installed applications controlled by desktop actions.
Primary Control Flow
1. main.py and/or ui.py accepts a user request.
2. The planner (agent/planner.py) uses prompt guidance (core/prompt.txt), memory, and the model client (or_client.py) to derive work.
3. Tasks move through agent/task_queue.py.
4. agent/executor.py invokes one or more modules in actions/.
5. Results and failures are handled by agent/error_handler.py and may update memory/memory_manager.py.
Main entry points: executor.py Action executor · planner.py Task planner · memory_manager.py Memory manager · task_queue.py Task queue
Components 17
Entry Points
- Assistant startup
main.py - User interface
ui.py
Agent Runtime
- Task planner · Converts user intent into an action plan.
agent/planner.py - Task queue
agent/task_queue.py - Action executor · Dispatches plans to side-effecting actions.
agent/executor.py - Error handler
agent/error_handler.py
Automation Capabilities
Side-effecting integrations with the local machine and web.
- Desktop control · Controls the OS and installed applications.
actions/computer_control.py - Browser & web actions · Automates browser operations and web lookups.
actions/browser_control.py - File & screen actions · Processes local files and screen content.
actions/file_controller.py - Personal workflow actions · Handles messaging, reminders, and flight lookup.
actions/send_message.py - Development & settings · Provides coding, development, and system settings operations.
actions/code_helper.py
Context & Guidance
- Model client · Boundary to an external AI/model provider.
or_client.py - Core prompt
core/prompt.txt - Memory manager · Reads and writes persistent assistant context.
memory/memory_manager.py - Memory configuration
memory/config_manager.py
Other components
- External AI provider
- Host OS, apps & web
Connections 21
- Assistant startup → Task planner: starts request flow
- User interface → Task planner: submits request
- Task planner → Core prompt: uses guidance
- Task planner → Memory manager: reads context
- Task planner → Model client: requests plan
- Model client → External AI provider: model request
- Task planner → Task queue: enqueues tasks
- Task queue → Action executor: dequeues work
- Action executor → Desktop control: dispatches
- Action executor → Browser & web actions: dispatches
- Action executor → File & screen actions: dispatches
- Action executor → Personal workflow actions: dispatches
- Action executor → Development & settings: dispatches
- Action executor → Error handler: handles failures
- Action executor → Memory manager: stores results
- Memory configuration → Memory manager: configures
- Desktop control → Host OS, apps & web: controls
- Browser & web actions → Host OS, apps & web: automates
- File & screen actions → Host OS, apps & web: accesses
- Personal workflow actions → Host OS, apps & web: uses services
- Development & settings → Host OS, apps & web: operates on