Retro-Terminal Edition
A local-first, desktop-class Personal Intelligence OS with a "Cassette Futurism" / "90s Mainframe" aesthetic. Think Alien terminals, Metal Gear Solid UI, or a highly polished Linux terminal.
- Terminal Feed: A linear notebook interface styled as a data feed/log with session management
- Circuit Board: A node-graph for building AI processing pipelines with templates
- Local-First AI: Powered by Ollama for fully local LLM inference
- Auto Orchestrator: Intent-aware model selection with session stickiness and model-switch events
- Quick Cloud Lane:
/quickroutes low-priority asks to free/cheap cloud models when connected - Conversational Action Assist: In-chat
yes / edit: / noconfirmation flow for image/music/speech/QDC actions - Vector Memory: ChromaDB for semantic search, RAG, and document indexing
- Image Analysis: Vision model integration for analyzing images (LLaVA, BakLLaVA, Moondream)
- File Processing: Load and process PDFs, text files, and other documents
- Image + Music Generation: Local image generation and ACE-Step music generation
- Speech Stack: Voice chat modal + browser/Orpheus TTS with streaming speech options
- Cloud Providers: OpenAI, Anthropic, Gemini, Mistral, DeepSeek, OpenRouter, and QDC connector card
- QDC Async Job Lane: Upload/run/status/results flow with terminal/socket progress updates
- Session Management: Save, load, and restore sessions
- Circuit Persistence: Save and load complete circuit configurations
- Retro Aesthetics: CRT scanlines, phosphor green, monospace everything
Before you begin, ensure you have the following installed:
- Download from nodejs.org
- Verify installation:
node --version
- Download from python.org
- Verify installation:
python --versionorpython3 --version
- Install from ollama.ai
- After installation, pull at least one model:
ollama pull llama2 # or ollama pull mistral # or any other model you prefer
- Verify Ollama is running:
ollama list
- Download from git-scm.com
- Cloud chat/image providers are optional and can be configured in Cloud Providers modal.
- QDC is supported as an async remote job connector (not direct chat-completions).
π‘ Tip: Not sure what to do? Run make help or ./help to see all available commands!
After cloning the repository, you can open Notebook with a single command:
cd loom
make notebook-openOr using the direct script:
cd loom
./startThis will:
- β Check prerequisites (Python, Node.js, Ollama)
- β Set up Python virtual environment automatically
- β Install all dependencies (backend + frontend)
- β Start both backend and frontend servers
- β Display URLs when ready
That's it! Open http://localhost:5173 in your browser.
To close Notebook, you can:
- Press
Ctrl+Cin the terminal where it's running - Or run:
make notebook-closein a new terminal - Or run:
./closefrom the project root
# Open Notebook (start all services)
make notebook-open
# or
./start
# Close Notebook (stop all services)
make notebook-close
# or
./close
# Install dependencies
make install
# Clean up (remove dependencies and build artifacts)
make clean
# Show help
make helpIf you prefer to set up manually or the one-command start doesn't work:
git clone https://github.com/mhsenkow/loom.git
cd loomcd backend
pip install -r requirements.txtNote: On macOS/Linux, you may need to use pip3 instead of pip. If you encounter permission errors, use a virtual environment:
# Create virtual environment
python3 -m venv venv
# Activate it (macOS/Linux)
source venv/bin/activate
# Activate it (Windows)
venv\Scripts\activate
# Then install dependencies
pip install -r requirements.txtOpen a new terminal window/tab:
cd frontend
npm installIn the backend directory:
# Make sure you're in the backend directory
cd backend
# Start the server
uvicorn app.main:socket_app --reload --port 8000You should see output like:
INFO: Uvicorn running on http://0.0.0.0:8000
INFO: Application startup complete.
Keep this terminal open - the backend needs to keep running.
Open a new terminal window/tab and navigate to the frontend directory:
cd frontend
npm run devThis will start the Vite dev server. You should see:
VITE v5.x.x ready in xxx ms
β Local: http://localhost:5173/
β Network: use --host to expose
Open your browser and navigate to: http://localhost:5173
You should see the LOOM interface!
Optional environment variables for safer/localized deployments:
LOOM_ALLOWED_ORIGINS(backend): comma-separated CORS allowlist.
Example:LOOM_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173LOOM_LOG_LEVEL(backend): app log level (DEBUG|INFO|WARNING|ERROR, defaultINFO).LOOM_ACCESS_LOG(backend): enable uvicorn access logs (true/false, defaultfalse).LOOM_HTTP_CLIENT_LOG_LEVEL(backend): log level for internalhttpx/httpcorelogs (defaultWARNING).LOOM_SOCKETIO_LOG(backend): enable Socket.IO internal logs (true/false, defaultfalse).LOOM_ENGINEIO_LOG(backend): enable Engine.IO transport logs (true/false, defaultfalse).LOOM_QUIET_REQUEST_PATHS(backend): comma-separated endpoint paths that are logged atDEBUGfor successful requests (default/health,/api/images/models,/api/code-context/status,/api/sessions).LOOM_WEB_API_KEY(backend): if set,/api/web/*endpoints requireX-LOOM-API-KEY.LOOM_WEB_RATE_LIMIT_PER_MIN(backend): requests per minute limit for/api/web/*endpoints (default60).LOOM_INTERNAL_API_BASE_URL(backend): internal base URL used by backend services for internal API calls (defaulthttp://localhost:8000).LOOM_RUN_CLEANUP_ON_STARTUP(backend): run generated-media cleanup on startup (true/false, defaulttrue).LOOM_GENERATED_MEDIA_RETENTION_DAYS(backend): remove generated images/music older than N days on startup (default14).LOOM_QDC_MODE(backend): QDC execution mode (currentlymock).LOOM_QDC_MOCK_STEP_S(backend): QDC mock progress pacing in seconds per step (default0.35).LOOM_QDC_PACKAGE_DIR(backend): optional output directory for generated QDC package.zipfiles.LOOM_QDC_MAX_PACKAGE_FILES(backend): maximum files allowed per generated QDC package (default12000).VITE_API_BASE_URL(frontend): backend API base URL for the web app (defaulthttp://localhost:8000).
To run LOOM as a desktop application:
- Make sure both backend and frontend dev servers are running (steps 4 & 5)
- In a new terminal, navigate to the frontend directory:
cd frontend
npm run electron:devThis will open LOOM in an Electron window with the retro terminal aesthetic.
Once LOOM is running, you can use these commands in the terminal:
| Command | Description |
|---|---|
/help |
Show available commands |
/ai <prompt> |
Send a prompt to the AI |
/models |
List available Ollama models |
/setup-models |
Pull baseline stack (tiny/chat/image/music) if missing |
/quick <question> |
Route low-priority ask to fast free/cheap cloud lane |
/status |
Show system status (Ollama, ChromaDB) |
/clear |
Clear the display; use /restore to bring it back |
/restore |
Restore content from before /clear |
/saveas <name> |
Save current session to a named slot |
/load <name> |
Load a saved session (replaces current) |
/sessions |
List saved sessions |
/goals |
Show active user and assistant goals |
/goal user ... |
Add/update user goals |
/goal assistant ... |
Add/update assistant goals |
/memory |
Show long-term memory notes |
/remember [tier] <fact> [@0-1] |
Add memory with optional tier/confidence |
/forget <index> |
Remove one memory note by index |
/mission ... |
Manage session objective / next / blocker |
/improve ... |
Manage maintenance queue (list/add/done/clear) |
/eval |
Show agent quality snapshot from live telemetry |
/image |
Upload and analyze an image with vision models |
/song <style> |
Open quick music generation flow |
/qdc status |
Show QDC connector and remote lane status |
/qdc jobs |
List recent QDC jobs |
/qdc run <prompt> |
Start async QDC remote job |
/qdc package <path> |
Build a QDC-ready .zip package from file/folder |
/qdc package-model <path> |
Build a QDC .zip for AI Model upload type |
/qdc ship <path> :: <prompt> |
Package + upload + run in one command |
/qdc ship-model <path> :: <prompt> |
Package model + upload + run |
/qdc relay <prompt> |
Continue chat using latest QDC cloud output as context |
Tip: You can also type naturally. Non-command input goes to chat unless it is detected as an action request (image/music/speech/QDC), in which case LOOM asks for yes, edit: ..., or no.
autochat mode uses the orchestrator to pick models based on intent, speed/cost/quality settings, and prior model stickiness./quickexplicitly targets the fast lane and prefers free/cheap cloud models (Gemini/OpenRouter/open mini-class models), with local tiny-model fallback.- Cloud models are listed in a unified catalog alongside local models.
- QDC is treated as a job lane, not a token-streaming chat provider.
LOOM can turn plain-language requests into assisted actions:
- Example: βmake a poster for my eventβ -> suggests image action -> reply
yesto run. - Example: βcompose lo-fi study musicβ -> suggests music action ->
yeslaunches music generation. - Example: βuse qdc for this remote runβ -> suggests QDC job action ->
yesstarts async job. - Example: βread this aloudβ -> suggests speech mode action.
- Click and drag to create new modules
- Connect modules together to build AI pipelines
- Use the templates sidebar to quickly add common module types
- Right-click modules for options
- Use the file picker to load PDFs, text files, and other documents
- Files are automatically processed and indexed for semantic search
- Use INDEX and SEARCH cell types for vector store operations
- Access processed files through the circuit board modules
- Build knowledge bases with automatic document indexing
- Upload images using the π· button or
/imagecommand - Analyze images with vision models (LLaVA, BakLLaVA, Moondream)
- Vision models are automatically detected and recommended
- Analysis results can be sent to chat for further discussion
- Install vision models with:
ollama pull llava:7borollama pull bakllava
- Pre-built templates for common workflows (RAG, research, analysis)
- Templates sidebar for quick access
- Save and load complete circuit configurations
- Share circuits by name
-
Port 8000 already in use: Change the port in the uvicorn command:
uvicorn app.main:socket_app --reload --port 8001
Then update the frontend connection (check
frontend/src/hooks/useSocket.ts) -
Python dependencies fail to install:
- Make sure you're using Python 3.9+ (3.10+ recommended)
- Try upgrading pip:
pip install --upgrade pip - On macOS, you may need:
pip3 install -r requirements.txt
-
Ollama connection errors:
- Make sure Ollama is running:
ollama list - Verify Ollama is accessible:
curl http://localhost:11434/api/tags
- Make sure Ollama is running:
- Port 5173 already in use: Vite will automatically try the next available port
- npm install fails:
- Try deleting
node_modulesandpackage-lock.json, then runnpm installagain - Make sure you have Node.js v18+
- Try deleting
- No models available: Pull a model with
ollama pull llama2 - Model not responding: Check Ollama is running and the model name is correct
- Connection refused: Ensure the backend server is running on port 8000
/quickuses local fallback unexpectedly: Connect a cloud provider in the Providers modal and retry- QDC run fails immediately: Ensure Qualcomm QDC token is connected in Providers (
/qdc statusshould show connected)
- Window doesn't open: Make sure the Vite dev server is running first
- Blank screen: Check the browser console for errors (DevTools should open automatically)
loom/
βββ frontend/ # Electron + React app
β βββ electron/ # Electron main process
β βββ src/
β β βββ components/
β β β βββ shell/ # CRT effects, title bar, settings
β β β βββ terminal/ # Tiptap notebook, orchestration, providers, image/music flows
β β β βββ circuit/ # React Flow graph, modules, templates, QDC nodes
β β βββ hooks/ # Socket, status, circuit runner hooks
β β βββ styles/ # Tailwind + CRT CSS
β β βββ types/ # TypeScript interfaces
β βββ package.json
β
βββ backend/ # Python FastAPI server
β βββ app/
β β βββ routers/ # REST endpoints (modules, files, images, circuits, providers, qdc, search)
β β βββ services/ # Ollama, ChromaDB, orchestrator, qdc lane, file processing, storage
β β βββ models/ # Pydantic schemas
β βββ data/ # Local data storage (ChromaDB, SQLite)
β βββ scripts/ # Template extraction and testing scripts
β βββ requirements.txt
β
βββ scripts/ # Startup/shutdown scripts
βββ Makefile # Convenience commands
βββ start, close, help # Executable scripts
βββ README.md
- CHROMADB_INTEGRATION.md - Complete guide to vector store and RAG
- VECTOR_CELLS_GUIDE.md - Simple guide to INDEX and SEARCH cells
- LOCAL_CONVERSATIONAL_AI.md - Local conversation + streaming speech stack details
- CLOUD_ORCHESTRATION_AND_QDC.md - Orchestrator routing, quick lane, providers, and QDC job lane
- TEMPLATE_UPDATES.md - Available circuit templates
- MODULE_PERSISTENCE_IMPLEMENTATION.md - How module storage works
- STORAGE_ANALYSIS.md - Storage architecture details
- No Border Radius: Everything is sharp, rectangular
- Monospace Only: JetBrains Mono for all text
- Phosphor Green: Primary accent color (#33ff00)
- Void Black: Background (#050505)
- Brutalist UI: Buttons invert on click, no gradients
- CRT Effects: Optional scanline overlay
GET /- Server infoGET /health- Health check (Ollama + ChromaDB status)GET /api/models- List available Ollama modelsGET /api/modules- List all modulesPOST /api/modules- Create a moduleDELETE /api/modules/{id}- Delete a moduleGET /api/files- List processed filesPOST /api/files/upload- Upload and process a filePOST /api/images/generate- Generate an imagePOST /api/images/analyze- Analyze an image with vision modelsGET /api/images/check-vision-models- Check available vision modelsGET /api/circuits- List saved circuitsPOST /api/circuits- Save a circuitGET /api/circuits/{name}- Get a saved circuitGET /api/search- Semantic search across indexed documentsGET /api/providers- List cloud providers and capabilitiesGET /api/providers/models/all- Unified local+cloud model catalogGET /api/providers/quick-model- Suggest fast/low-cost model for/quickGET /api/qdc/status- QDC lane statusPOST /api/qdc/upload- Upload artifact path for QDC lanePOST /api/qdc/jobs- Start async QDC jobGET /api/qdc/jobs- List recent QDC jobsGET /api/qdc/jobs/{id}- Get QDC job statusGET /api/qdc/jobs/{id}/logs- Get QDC job logsGET /api/qdc/jobs/{id}/results- Get QDC job resultPOST /api/qdc/jobs/{id}/rerun- Rerun QDC jobPOST /api/qdc/jobs/{id}/cancel- Cancel QDC job
Client β Server:
chat- Send AI prompt{ prompt, model }execute_module- Run a module{ module_id, type, inputs }pull_model- Pull Ollama model with progress
Server β Client:
ai_chunk- Streaming token{ content }ai_status- Status update{ status, message }module_status- Module state{ module_id, status, output }orchestrator_event- Circuit/model suggestion or auto-switch detailspull_status- Model pull progress{ status, model, percent, message }qdc_job_event- QDC async job progress/status updates
cd backend
uvicorn app.main:socket_app --reload --port 8000The --reload flag enables auto-reload on code changes.
cd frontend
npm run devHot module replacement is enabled by default.
Frontend:
cd frontend
npm run buildElectron:
cd frontend
npm run electron:build- Electron (Desktop shell)
- React + TypeScript + Vite
- Tailwind CSS (Retro terminal theme)
- Tiptap (Headless editor)
- React Flow (Node graph)
- Socket.IO Client
- Python 3.9+ (3.10+ recommended)
- FastAPI + Socket.IO
- Ollama (Local LLMs + Vision models)
- ChromaDB (Vector store for RAG)
- SQLite (Circuit and session persistence)
- PyMuPDF (PDF processing)
- Diffusers (Image generation)
- Transformers (Local ML models)
β Fully Working:
- Terminal feed with session management
- Circuit board with node-based workflows
- AI chat with local/cloud routing
- Intent-aware orchestrator with auto model switching + model-switch notifications
- Quick lane (
/quick) with free/cheap cloud preference and tiny local fallback - Vector store with ChromaDB (INDEX/SEARCH cells)
- File processing and indexing
- Image analysis with vision models
- Image + music generation panels and command flows
- Conversational action-confirm flow (
yes/edit:/no) for image/music/speech/QDC - QDC async lane (upload, run, status, logs, results, rerun/cancel)
- Circuit QDC nodes (
qdc_upload,qdc_run,qdc_status,qdc_results) - Circuit templates and persistence
- Session save/load/restore
π§ In Development:
- Live Qualcomm QDC API execution backend (current lane is mock-backed for UX integration)
- Enhanced RAG workflows and more circuit templates
- Advanced image generation features and performance optimizations
π Planned:
- Multi-user support
- Cloud sync (optional)
- Plugin system
- Advanced visualization tools
MIT
Contributions are welcome! Feel free to open issues or submit pull requests.
Need help? Open an issue on GitHub or check the troubleshooting section above.