This guide will help you set up and run the OpenAgent project on Windows, including both the CLI agent and the stunning web UI.
- Windows 10/11
- Python 3.10+ (you have Python 3.13.5 ✅)
- Internet connection (for initial setup only)
- ~4 GB free disk space (for Ollama model)
- Download Ollama for Windows: https://ollama.ai/download/windows
- Run the installer
- Ollama will auto-start as a Windows service
- Download from: https://github.com/UB-Mannheim/tesseract/wiki
- Run the installer (recommended path:
C:\Program Files\Tesseract-OCR) - Important: During installation, check "Add to PATH" or manually add it:
- Open System Properties → Environment Variables
- Add
C:\Program Files\Tesseract-OCRto your PATH
Open PowerShell in the project directory and run:
cd c:\Users\koush\Music\openagent
.\scripts\setup_windows.ps1This script will:
- Verify Ollama installation
- Pull the
phi3:minimodel (~2.5 GB download) - Check Tesseract installation
- List available models
Note: The model download may take 5-15 minutes depending on your internet speed.
pip install -r requirements.txtThis installs all required Python packages including:
- ChromaDB (vector database)
- sentence-transformers (embeddings)
- PyMuPDF (PDF parsing)
- pytesseract (OCR wrapper)
- Flask (UI server)
- and more...
You have two ways to run OpenAgent:
Run the command-line interface:
python -m openagentAvailable Commands:
/help— Show help/tools— List all tools/status— System status/file <path>— Parse a file/clear— Clear history/quit— Exit
Example Usage:
🧑 You> summarize this text: OpenAgent is an offline-first AI agent...
🤖 Agent> [AI response here]
🧑 You> /file C:\path\to\document.pdf
🤖 Agent> [Parsed content]
🧑 You> search for Python tutorials
🤖 Agent> [DuckDuckGo search results]
cd c:\Users\koush\Music\openagent\ui
python server.pyYou'll see:
============================================================
🤖 OpenAgent UI Server
============================================================
Starting server on http://localhost:5000
Open your browser and navigate to the URL above
Press Ctrl+C to stop the server
============================================================
Navigate to: http://localhost:5000
UI Features:
- 🌌 Live particle field with 120 particles + dynamic connecting lines
- 🔲 CRT scanline overlay for sci-fi terminal feel
- ✨ Corner bracket decorations with glow on all 4 corners
- 💫 Logo pulse glow animation
- ⏳ Typing indicator with staggered bounce dots
- 🃏 Tool cards that stagger-pop in with physics-based easing
- 💬 Messages slide in with spring animation
- 🎯 Input bar glow pulses cyan on focus
3 Interactive Panels:
- Chat — Full conversational interface
- Tools — Interactive cards for all 7 tools
- System — Live ring-charts showing LLM load, network, memory usage
| Tool | Icon | Description | Type |
|---|---|---|---|
| File Parser | 📄 | Extract text from TXT, PDF, DOCX | Offline |
| OCR Vision | 🖼️ | Tesseract OCR on images | Offline |
| Summarizer | 📝 | AI-powered text summarization | Offline |
| Sandbox Exec | ⚡ | Run whitelisted shell commands | Offline |
| Web Search | 🌐 | DuckDuckGo search (no API key) | Online |
| Web Fetch | 🔗 | Download and parse webpages | Online |
| RAG Memory | 🧠 | ChromaDB vector memory | Offline |
ollama --version
ollama list # Should show phi3:minitesseract --versionpython -m openagentTry these commands:
/status— Check system status/tools— List available toolssummarize this: Hello world— Test LLM
- Start server:
python ui/server.py - Open browser: http://localhost:5000
- Check animations are running
- Send a test message: "Hello!"
- Click on Tools panel
- Check System Status panel
pytest tests/ -vThis runs all unit tests for parsers, tools, memory, and network functionality.
Solution:
- Download and install from https://ollama.ai/download/windows
- Restart PowerShell after installation
Solution:
- Install from https://github.com/UB-Mannheim/tesseract/wiki
- Add to PATH:
C:\Program Files\Tesseract-OCR - Restart PowerShell
Solution:
- Check internet connection
- Try fallback model:
ollama pull qwen2.5:0.5b - Update
config/settings.yamlto use the fallback model
Solution:
- Ensure Flask server is running:
python ui/server.py - Check http://localhost:5000 (not https)
- Check browser console for errors (F12)
Solution:
- Reinstall dependencies:
pip install -r requirements.txt --force-reinstall - Use a virtual environment:
python -m venv venv .\venv\Scripts\Activate.ps1 pip install -r requirements.txt
Explanation:
- This is normal on CPU-only systems with local models.
- Solution: Switch to a Cloud Provider (OpenRouter/DeepSeek) for instant responses.
- Open
config/settings.yaml - Change
provider: "openrouter"or"deepseek" - Add your API key
- Restart the server
- Open
Solution:
- The agent automatically falls back to local Ollama if the cloud fails.
- Check
logs/openagent.logfor details. - Ensure you have credits in your API account.
openagent/
├── __main__.py # Entry point
├── config/
│ ├── cli.py # CLI REPL
│ └── settings.yaml # Configuration
├── core/
│ ├── agent.py # Main agent orchestrator
│ ├── llm.py # Ollama HTTP client
│ ├── router.py # Tool routing logic
│ └── network.py # Internet connectivity check
├── tools/
│ ├── offline/ # Offline tools
│ └── online/ # Online tools
├── parsers/ # File parsers (PDF, DOCX, TXT, IMG)
├── memory/ # ChromaDB wrapper
├── tests/ # Unit tests
├── scripts/
│ ├── setup_models.sh # Linux/Mac setup
│ └── setup_windows.ps1 # Windows setup (NEW)
├── ui/ # Web UI (NEW)
│ ├── index.html # Standalone HTML UI
│ └── server.py # Flask API server
├── requirements.txt # Python dependencies
└── README.md # Project documentation
The UI features:
- Dark sci-fi theme with cyan/magenta accents
- Glassmorphism effects
- Smooth animations (60fps particle system)
- Responsive design
- Real-time online/offline detection
-
Offline Mode: Most tools work without internet. Only Web Search and Web Fetch require connectivity.
-
Memory: The agent remembers conversation context using ChromaDB. Data is stored in
./data/chroma_db. -
File Parsing: Drag and drop files in the UI or use
/file <path>in CLI. -
Sandbox Security: Command execution is whitelisted. Only safe commands like
echo,date,lsare allowed. -
Model Switching: Edit
config/settings.yamlto change the LLM model.
- Explore all 7 tools in the Tools panel
- Try parsing different file types (PDF, DOCX, images)
- Test the RAG memory with multiple conversations
- Customize the UI colors in
ui/index.html - Add your own tools in
tools/offline/ortools/online/
- GitHub Issues: Report bugs or request features
- Documentation: See
README.mdfor architecture details - Tests: Run
pytest tests/ -vto verify functionality
Enjoy your offline-first AI agent! 🤖✨