Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Loci — Local Offline Coding Agent

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


What it does

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.


Flow

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

Stack

Layer Tech
LLM Ollamagemma4:e2b (local)
Backend Python / Flask
Self-test Selenium + headless Chrome
Frontend Vanilla JS + Tailwind CSS

Setup

# 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.py

Open http://localhost:5000 in your browser.

Chrome must be installed for the self-test to work.


Project structure

Loci/
├── app.py          # Flask backend + agent logic
└── static/
    └── index.html  # Chat UI

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages