Skip to content

aryash45/AI-Jarvis-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Jarvis 2025 - Local Hierarchical Agent System

A modern, modular AI assistant powered by specialized agents for autonomous task execution. Built with local-first architecture for privacy and offline capability.

Python FastAPI React


🌟 Features

🧠 Intelligent Agent System

  • KnowledgeAgent: Quick answers via Wikipedia + Bing search
  • MediaAgent: Dynamic YouTube music/video playback with genre support
  • SystemAgent: Volume control, app launching, media keys
  • WebAgent: General web search and news (fallback)

🎨 Premium Command Center UI

  • Real-time WebSocket communication
  • Glassmorphism dark mode design
  • Live agent status visualization
  • Voice input via browser's Web Speech API

πŸ”’ Privacy-First Architecture

  • Local execution (no cloud dependency)
  • Modular design for easy customization
  • Bing search integration (no API keys needed)

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • Node.js 16+ (for frontend)
  • Windows OS (for system control features)

Installation

  1. Clone the repository
git clone https://github.com/yourusername/AI-Jarvis-model.git
cd AI-Jarvis-model
  1. Install Python dependencies
pip install -r requirements.txt
  1. Install frontend dependencies
cd frontend
npm install
cd ..

Running the System

Option 1: Full System (Recommended)

./start_jarvis.bat

Then open http://localhost:5173 in your browser.

Option 2: Voice-Only Mode

python main.py

Option 3: Test Agents

python test_jarvis.py

πŸ“– Usage Examples

Voice Commands

Knowledge Queries:

  • "Who is Elon Musk?"
  • "What is quantum computing?"
  • "Tell me about the Eiffel Tower"

Media Control:

  • "Play Shape of You"
  • "Play some rock music"
  • "Play romantic songs playlist"

System Control:

  • "Mute volume"
  • "Open notepad"
  • "Launch calculator"

Web UI

  1. Click the microphone button
  2. Speak your command
  3. See real-time agent processing
  4. Get instant responses

πŸ—οΈ Architecture

jarvis_core/
β”œβ”€β”€ orchestrator.py      # Routes commands to agents
β”œβ”€β”€ state.py            # Shared agent state
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ knowledge_agent.py   # Wikipedia + Bing search
β”‚   β”œβ”€β”€ media_agent.py       # YouTube playback
β”‚   β”œβ”€β”€ system_agent.py      # System control
β”‚   └── web_agent.py         # General web (fallback)
└── tools/
    β”œβ”€β”€ browser_tools.py     # Bing search, URL handling
    β”œβ”€β”€ speech_tools.py      # Voice I/O
    └── system_tools.py      # OS automation

Agent Routing Logic

Command β†’ Orchestrator β†’ {
    "volume|mute|open"     β†’ SystemAgent
    "play|music|song"      β†’ MediaAgent
    "who|what|search"      β†’ KnowledgeAgent
    *                      β†’ WebAgent (fallback)
}

πŸ› οΈ Configuration

Search Provider

Currently uses Bing (via web scraping). No API key required.

Voice Settings

Modify jarvis_core/tools/speech_tools.py:

# Change voice speed
engine.setProperty('rate', 150)  # Default: 150

# Change voice
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)  # 0=male, 1=female

Security Configuration

CORS Settings (Production):

# Set allowed frontend origins
export JARVIS_FRONTEND_URL="https://yourdomain.com"

# For multiple origins
export JARVIS_FRONTEND_URL="https://yourdomain.com,https://backup.com"

Application Whitelist:

Edit jarvis_core/tools/system_tools.py to customize allowed applications:

ALLOWED_APPS = {
    "Windows": [
        "notepad", "calc", "chrome", "firefox", # ... add your apps
    ]
}

Network Binding:

# Localhost only (most secure)
export JARVIS_HOST="127.0.0.1"

# All interfaces (if needed for network access)
export JARVIS_HOST="0.0.0.0"

For more details, see SECURITY.md.


πŸ§ͺ Testing

Run All Tests

python test_jarvis.py

Test Individual Agents

from jarvis_core.orchestrator import Orchestrator

orchestrator = Orchestrator()
result = orchestrator.route_command("who is Albert Einstein")
print(result)

πŸ“¦ Dependencies

Core:

  • pydantic - Data validation
  • requests - HTTP client
  • beautifulsoup4 - HTML parsing

Voice:

  • speechrecognition - Speech-to-text
  • pyttsx3 - Text-to-speech

System:

  • pyautogui - System automation

Web:

  • wikipedia - Wikipedia API
  • fastapi - Backend API
  • uvicorn - ASGI server

Frontend:

  • react - UI framework
  • vite - Build tool
  • tailwindcss - Styling

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Inspired by modern agentic AI systems
  • Built with privacy and local execution in mind
  • Designed for extensibility and customization

πŸ“ž Support

For issues, questions, or suggestions:


Made with ❀️ for the AI community

About

A Python-powered virtual assistant capable of performing a variety of tasks such as opening websites, playing music, fetching news, telling jokes, searching on Google, and much more. Jarvis is activated by the wake word "Sydney" and responds to your voice commands intelligently.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors