"At your service, Sir."
ALFRED is a sophisticated, hybrid AI desktop assistant designed to bridge the gap between cloud intelligence and local system control. Unlike standard chatbots, ALFRED acts as a fully autonomous agent that can hear, speak, see, and act on your computer.
Featuring a holographic WayneTech-style overlay, ALFRED provides a visual connection to the AI's thought process, complete with sentiment-aware color shifting, real-time text generation, and "Ghost Writer" capabilities.
ALFRED leverages the best of both worlds:
- Cloud Brain (Groq + Llama 3.3 70B): Handles complex reasoning, conversation, and sentiment analysis at lightning speeds.
- Local Body (Ollama + Hermes 3): Executes sensitive system tools (app launching, hardware checks) locally for privacy and security.
Powered by Llama 4 Scout, ALFRED can "see" your screen.
- Vision-to-Code: "Look at this LeetCode problem and write the solution."
- Error Analysis: "Read this error message and tell me how to fix it."
- Instant Capture: Uses the
msslibrary for <10ms screen capture latency.
ALFRED includes a Ghost Writer engine that can take control of your keyboard.
- Autonomously types or pastes code solutions directly into your IDE.
- Perfect for live coding assistance, email drafting, or filling forms.
- Safety: Includes smart delays to ensure you have the correct window focused.
A transparency-enabled PyQt6 overlay that sits on your desktop:
- Dynamic Speech Bubble: Auto-resizes and auto-scrolls based on response length (teleprompter style).
- Sentiment Engine: The Tactical Radar changes color based on the AI's emotional context:
- ๐ข Green: Success / Happy
- ๐ Orange: Alert / Warning
- ๐ด Red: Error / Critical
- ๐ต Cyan: Neutral / Processing
- Conversations persist across sessions via encrypted storage
- Automatic summarization every 10 messages
- Loads previous context on startup
- Python 3.10+
- Ollama installed and running.
- Groq API Key (Free tier available at console.groq.com).
- OpenWeatherMap API Key (Free tier for weather features).
# 1. Clone the repository
git clone https://github.com/NexionisJake/Project-ALFRED.git
cd Project-ALFRED
# 2. Install Python dependencies
pip install -r requirements.txt
# 3. Pull the local model for tool execution
ollama pull hermes3Create a .env file in the root directory:
GROQ_API_KEY=your_groq_key_here
OPENWEATHER_API_KEY=your_weather_key_here(Optional) Customize config.py to change the voice or wake word:
ASSISTANT_NAME = "Alfred"
WAKE_WORD = "alfred"
VOICE_NAME = "en-GB-RyanNeural" # British Butler Voicepython main.pyALFRED comes equipped with 11 integrated tools out of the box:
| Category | Tool Name | Description |
|---|---|---|
| System | open_application |
Launches apps (Chrome, Spotify, VS Code, etc.) |
get_system_status |
Reports real-time CPU and RAM usage. | |
system_volume |
Controls volume (Up, Down, Mute). | |
| Web | Google Search |
Performs Google searches and opens results. |
get_weather |
Fetches real-time weather for any city. | |
| Media | media_play_pause |
Toggles media playback (Universal). |
media_next/prev |
Skips or rewinds tracks. | |
| Productivity | write_to_screen |
(Ghost Writer) Types generated text/code into active window. |
| Memory | search_knowledge_base |
Recalls personal facts from brain.txt. |
get_current_time |
Provides date, time, and day briefing. |
You: "Alfred, give me the morning briefing." Alfred: "Good morning, Sir. It is currently 8:00 AM. The weather in New York is 72 degrees and clear. All systems are operational."
You: (Open LeetCode) You: "Alfred, look at this problem and write the Python solution." Alfred: "Analyzing the Two-Sum problem... I have generated the solution. Pasting now." (Code automatically appears in your editor)
You: "Play some music and turn the volume up." Alfred: "Playing Spotify and adjusting audio levels, Sir."
You: "Look at my screen and describe what you see" Alfred: "I can see your code editor with a Python file..."
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ USER INTERACTION โ
โ (Voice Input via Microphone) โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EARS (Whisper STT) โ
โ - Wake word detection โ
โ - Speech-to-text transcription โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BRAIN (Hybrid Intelligence) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Cloud Brain (Groq Llama 3.3) โ โ
โ โ - Conversation โ โ
โ โ - Sentiment analysis โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Local Body (Ollama Hermes 3) โ โ
โ โ - Tool execution โ โ
โ โ - System commands โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Eyes (Llama Scout Vision) โ โ
โ โ - Screen analysis โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโดโโโโโโโโโ
โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ TOOLS โ โ MEMORY SYSTEM โ
โ 11 Actions โ โ - Short-term โ
โ โ โ - Long-term โ
โ โ โ - Knowledge โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ OUTPUT SYSTEMS โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Voice (TTS) โ โ GUI Overlay โ โ
โ โ Edge TTS โ โ Tactical HUDโ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Project-ALFRED/
โ
โโโ ๐ core/ # Core logic modules
โ โโโ __init__.py # Package marker
โ โโโ brain.py # The Brain (AI Processing)
โ โโโ ears.py # The Ears (Whisper + OpenWakeWord)
โ โโโ eyes.py # The Eyes (Vision Analysis)
โ โโโ overlay.py # The Face (PyQt6 Holographic GUI)
โ โโโ tools.py # The Hands (System Automation Tools)
โ โโโ voice.py # Voice synthesis
โ โโโ memory.py # Memory management
โ โโโ encryption.py # Data encryption
โ โโโ wake_word.py # Wake word detection
โ โโโ sounds.py # Sound effects
โ โโโ app_launcher.py # Application launcher
โ
โโโ ๐ data/ # Persistent data and memory
โ โโโ brain.txt # Long-term Knowledge Base
โ โโโ brain.txt.enc # Encrypted knowledge base
โ โโโ long_term_memory.json # Conversation History (auto-generated)
โ
โโโ ๐ tests/ # Diagnostic scripts
โ โโโ preflight_check.py # System verification check
โ โโโ test_overlay.py # GUI testing script
โ โโโ test_encryption.py # Encryption tests
โ โโโ test_memory.py # Memory tests
โ โโโ test_tools_security.py # Security tests
โ โโโ test_utils.py # Utility tests
โ โโโ test_all_tools.py # All tools tests
โ โโโ run_all_tests.py # Master test runner
โ
โโโ ๐ scripts/ # Utility scripts
โ โโโ migrate_brain.py # Migration utilities
โ
โโโ ๐ assets/ # Images and temp files
โ โโโ temp_speech.mp3 # (Auto-generated)
โ โโโ temp_command.wav # (Auto-generated)
โ
โโโ .env # API Keys (Hidden in .gitignore)
โโโ .gitignore # Git ignore settings
โโโ config.py # Identity & Settings
โโโ LICENSE # MIT License
โโโ main.py # The Central Nervous System (Main Loop)
โโโ run_tests.py # Test runner script
โโโ README.md # This file
โโโ requirements.txt # Python Dependencies
Issue: Microphone not working
- Check
ears.pyisn't running separately - Verify microphone permissions
Issue: GUI not showing
- Ensure PyQt6 is installed
- Run
python tests/test_overlay.pyto test overlay
Issue: Tools not working
- Run
python tests/preflight_check.py - Verify all imports are successful
Issue: API errors
- Check
.envfile has valid GROQ_API_KEY - Verify Ollama is running:
ollama list
Issue: High resource usage
- Check
config.pyfor performance settings - Consider disabling optional features
- API Security: Keys are loaded via
.envand never hardcoded. - Local Execution: Sensitive system commands (like opening apps) are parsed locally by Ollama, not sent to the cloud.
- Clipboard Safety: The Ghost Writer tool uses
pyperclipfor safe text insertion. - Encrypted Storage: Sensitive data is encrypted at rest.
ALFRED is designed to be modular.
- Fork the repository.
- Create a new tool in
tools.py. - Register it in
main.py. - Submit a Pull Request.
- LangChain - AI framework
- Groq - Cloud inference
- Ollama - Local models
- Faster-Whisper - Speech recognition
- Edge TTS - Voice synthesis
- PyQt6 - GUI framework
Distributed under the MIT License. See LICENSE for more information.
๐ SYSTEM STATUS: ALL SYSTEMS ONLINE
Built with โค๏ธ for the future of AI.
"We fall so that we can learn to pick ourselves up."