A fully offline AI coding agent that generates, tests, and iterates on single-file HTML apps — no cloud, no API keys, runs entirely on your machine.
Developed by Panendra Rao .J
You describe an app in plain English. Loci builds it, runs a headless browser self-test, auto-fixes errors, and shows you the result — all locally.
User prompt
│
▼
Phase 1 — Intent Clarification (fast, no reasoning)
│ Ask ≤2 clarifying questions, or skip if intent is clear
▼
Phase 2 — Code Generation (full reasoning, Ollama)
│ Generates a complete single-file HTML app
▼
Self-Test (headless Chrome via Selenium)
│ Checks for JS errors, blank pages, interaction failures
├─ Pass → show preview ✓
└─ Fail → retry with error feedback (max 2 retries)
│
└─ Still failing → ask user to simplify or inspect code
| Layer | Tech |
|---|---|
| LLM | Ollama — gemma4:e2b (local) |
| Backend | Python / Flask |
| Self-test | Selenium + headless Chrome |
| Frontend | Vanilla JS + Tailwind CSS |
# 1. Install dependencies
pip install flask flask-cors requests selenium
# 2. Pull the model
ollama pull gemma4:e2b
# 3. Start Ollama
ollama serve
# 4. Run Loci
python app.pyOpen http://localhost:5000 in your browser.
Chrome must be installed for the self-test to work.
Loci/
├── app.py # Flask backend + agent logic
└── static/
└── index.html # Chat UI