Skip to content

BJW333/ARGUS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

162 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ARGUS

Advanced Response and Guidance User System

A personal AI assistant which has many diffrent features voice activation, local LLM inference via Ollama, a genetic algorithm-based response optimization system, RAG-enhanced knowledge retrieval, and a modern QML liquid glass interface.

Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           ARGUS Core                                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  main.py β†’ bootstrap.py β†’ orchestrator.py                          β”‚
β”‚     β”‚                          β”‚                                    β”‚
β”‚     β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚     β”‚    β”‚                     β”‚                     β”‚              β”‚
β”‚     β–Ό    β–Ό                     β–Ό                     β–Ό              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚  Speech  β”‚           β”‚  NLP Engine β”‚       β”‚  Memory   β”‚         β”‚
β”‚  β”‚  System  β”‚           β”‚             β”‚       β”‚  System   β”‚         β”‚
β”‚  β”‚          β”‚           β”‚ β€’ Chatbot   β”‚       β”‚           β”‚         β”‚
β”‚  β”‚ β€’ Listen β”‚           β”‚ β€’ Intent    β”‚       β”‚ β€’ Short   β”‚         β”‚
β”‚  β”‚ β€’ Speak  β”‚           β”‚ β€’ Reward    β”‚       β”‚ β€’ Long    β”‚         β”‚
β”‚  β”‚ β€’ Mimic3 β”‚           β”‚ β€’ GA Rerank β”‚       β”‚ β€’ Persona β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚       β”‚                        β”‚                     β”‚              β”‚
β”‚       β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β”‚       β”‚    β”‚                   β”‚                                    β”‚
β”‚       β–Ό    β–Ό                   β–Ό                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚   GUI/QML    β”‚       β”‚    RAG      β”‚       β”‚  Actions  β”‚         β”‚
β”‚  β”‚              β”‚       β”‚   System    β”‚       β”‚           β”‚         β”‚
β”‚  β”‚ β€’ ChatPanel  β”‚       β”‚             β”‚       β”‚ β€’ Apps    β”‚         β”‚
β”‚  β”‚ β€’ BrainViz   β”‚       β”‚ β€’ WebRAG    β”‚       β”‚ β€’ Timer   β”‚         β”‚
β”‚  β”‚ β€’ LiquidGlassβ”‚       β”‚ β€’ Scraper   β”‚       β”‚ β€’ Weather β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚ β€’ Stocks  β”‚         β”‚
β”‚                                               β”‚ β€’ News    β”‚         β”‚
β”‚                                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Components

NLP Engine (nlp/)

  • chatbot.py - Local LLM inference via Ollama API, candidate generation with configurable temperature, top-k/top-p sampling
  • chatbot_init.py - Initializes the chatbot, reward system, and conversation history
  • intent.py - Hybrid intent recognition combining rule-based patterns with a fine-tuned ML classifier (hosted on HuggingFace: bjw333/intent_model_argus)
  • reward.py - Dynamic reward system evaluating responses on:
    • Semantic relevance (cosine similarity via sentence-transformers)
    • Sentiment alignment (VADER)
    • Grammar quality (LanguageTool)
    • Clarity and directness metrics

Genetic Algorithm Response Optimization

The chatbot uses a genetic algorithm to refine response candidates:

  1. Population Generation - Multiple response candidates generated with varied temperatures
  2. Fitness Evaluation - Each candidate scored by the reward system
  3. Selection - Top performers selected as parents
  4. Crossover - Semantic-aware text combination of parent responses
  5. Mutation - Semantic drift mutation to explore response space
  6. Final Refinement - Best candidate passed through a final generation loop

Memory System (core/memory_system.py)

Three-tier persistent memory stored in core/Argus_memory_storage/:

  • short_term.json - Recent conversation turns with rewards
  • long_term.json - Distilled important information
  • personality.json - User preferences and personality embeddings

RAG System (rag/ + web_learning/)

  • web_rag.py - Retrieval-Augmented Generation using SQLite + sentence embeddings
  • intelligent_scraper.py - Async web scraper with quality filtering, rate limiting, and domain diversity
  • scraper_service.py - Background service for continuous knowledge acquisition

Speech System (speech/)

  • listen.py - Wake word detection ("Argus") + speech recognition via SpeechRecognition/Whisper
  • speak.py - Text-to-speech output
  • speechmanager.py - Mimic3 TTS with pitch/speed control, queued playback, interrupt handling

Intent System

Recognized intents with hybrid ML + rule-based classification:

  • ai_response - General conversation (routed to LLM)
  • searchsomething - Wikipedia/web search
  • open / close - Application management
  • timer - Set timers
  • stock_data - Stock price lookup
  • weather_data - Weather queries
  • flight_data - Flight status
  • crypto_data - Cryptocurrency prices
  • news - News headlines
  • volume_control - System volume
  • exit - Shutdown ARGUS
  • time - Time queries
  • coinflip - Coin flip
  • cocktail_intent - Cocktail recipes
  • connectionwithinternet - Internet status check

GUI (gui_qml/)

PySide6/QML interface with liquid glass aesthetic:

  • MainView.qml - Main application window
  • ChatPanel.qml - Message display with animated bubbles
  • BrainCanvas.qml - 3D neural network visualization (audio-reactive)
  • LiquidGlassCard.qml - Reusable glass-effect components
  • backend_bridge.py - Python-QML signal bridge

Additional Tools (functionality_and_abilities/)

  • Put any custom tools within this folder

Installation

Requirements

  • Python 3.10+
  • macOS (primary target, adaptable to other platforms)
  • ~8GB+ RAM recommended for local LLM inference

Setup

# Clone the repository
git clone https://github.com/BJW333/ARGUS.git
cd ARGUS

# Install dependencies
pip install -r requirements.txt

# Install Mimic3 TTS (for speech output)
pip install mycroft-mimic3-tts

# Run ARGUS
python3 main.py

Environment Variables

# Optional - Memory storage location
export ARGUS_MEMORY_DIR="/path/to/memory"

# Optional - Enable background web learning
export ARGUS_WEBLEARN_ENABLED=1
export ARGUS_WEBLEARN_CYCLE_SEC=3600

Usage

  1. Launch ARGUS: python3 main.py
  2. Wait for the greeting
  3. Say "Argus" to activate voice input
  4. Speak your query or command
  5. Type in the chat panel for text input

Voice Commands

  • "Argus, what's the weather like?"
  • "Argus, open Spotify"
  • "Argus, set a timer for 5 minutes"
  • "Argus, what's the price of Bitcoin?"
  • "Argus, tell me about quantum computing"

Special Commands

  • update web knowledge - Ingest new scraped content into RAG
  • start web learning - Enable background web scraping
  • stop web learning - Disable background scraping
  • exit - Shutdown ARGUS

Models

Local LLM

ARGUS uses Ollama for local inference. Ensure Ollama is running and configure your model in config_metrics/main_config.py.

HuggingFace Models

Tech Stack

Component Technology
Language Python 3.10+, QML
LLM Inference Ollama
Speech Recognition SpeechRecognition, OpenAI Whisper
Text-to-Speech Mimic3
NLP spaCy, sentence-transformers, NLTK
ML Framework PyTorch, TensorFlow, Transformers
GUI PySide6 (Qt for Python), QML
Database SQLite (RAG storage)
Web Scraping aiohttp, BeautifulSoup, Selenium

Project Structure

ARGUS/
β”œβ”€β”€ main.py                 # Entry point
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ orchestrator.py     # Main command routing
β”‚   β”œβ”€β”€ memory_system.py    # Persistent memory
β”‚   β”œβ”€β”€ bootstrap.py        # Initialization
β”‚   β”œβ”€β”€ input_bus.py        # GUI signal bridge
β”‚   └── Argus_memory_storage/
β”œβ”€β”€ nlp/
β”‚   β”œβ”€β”€ chatbot.py          # LLM + GA optimization
β”‚   β”œβ”€β”€ intent.py           # Intent classification
β”‚   └── reward.py           # Response evaluation
β”œβ”€β”€ speech/
β”‚   β”œβ”€β”€ listen.py           # Voice input
β”‚   β”œβ”€β”€ speak.py            # Voice output
β”‚   └── speechmanager.py    # TTS management
β”œβ”€β”€ rag/
β”‚   └── web_rag.py          # RAG retrieval
β”œβ”€β”€ web_learning/
β”‚   β”œβ”€β”€ intelligent_scraper.py
β”‚   └── scraper_service.py
β”œβ”€β”€ gui_qml/
β”‚   β”œβ”€β”€ MainView.qml
β”‚   β”œβ”€β”€ ChatPanel.qml
β”‚   β”œβ”€β”€ BrainCanvas.qml
β”‚   └── backend_bridge.py
β”œβ”€β”€ actions/
β”‚   └── actions.py          # Command implementations
β”œβ”€β”€ config_metrics/
β”‚   β”œβ”€β”€ main_config.py
β”‚   └── logging.py
└── trainingdata/

Contributors

No one else has contributed to this project I have built it all solo. AI was used to generate comments in the code and the README with this project for efficiency purposes.

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

License

MIT License


This project is under active development.

About

ARGUS is a personal AI assistant that evolves its responses using genetic algorithms. Features local LLM inference via Ollama, RAG-based continuous learning, three-tier persistent memory, and a modern QML liquid glass interface. Fully local and private.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors