--- title: Elffuss Code emoji: 🧑‍💻 colorFrom: purple colorTo: pink sdk: static app_file: index.html pinned: false license: apache-2.0 short_description: A VS Code-style IDE with a local AI agent, in-browser tags: - webgpu - local-llm - agent - code - lfm - transformers.js --- # 🧑‍💻 Elffuss Code: put your computer to code with you Open a folder from your disk and a full web IDE unfolds around it: Monaco (the VS Code editor), a file tree, tabs, and an AI agent that **reads, searches and edits your project for real**. The model runs on **your** GPU through WebGPU. Your code never leaves your machine. Free, no account, no API key. > ⚠️ **Open it full-screen** ([direct link](https://utopiaia-elffuss-code.static.hf.space)). The > File System Access API (opening a local folder) is blocked inside the embedded iframe. ![demo](https://utopiaia.com/demos/elffuss/elffuss-code-demo.gif) In the demo a **small model running entirely in the browser** reads `calc.py`, finds a real bug and fixes it with a minimal edit: genuine tool calls, not autocomplete. ## What's new - **Our own engine.** The default brain is **LFM3 1.7B** running on Elffuss Engine, a WebGPU runtime we wrote ([source](https://github.com/utopia-ia/elffuss-engine)). It is also the default on phones, in a smaller build. Gemma-4 (LiteRT-LM) and Qwen3.5 (ONNX) are still in the model picker. - **Install it as an app.** Code offers to install itself (PWA), so it opens in its own window. - **VS Code extensions.** Search [Open VSX](https://open-vsx.org) from the Extensions panel and install color themes, grammars, snippets and language settings, checked against the SHA-256 Open VSX publishes. Extensions that *run code* need a sandbox on a separate site, so they work on [code.elffuss.com](https://code.elffuss.com) and not in this Space. - **A new look**, a project city view, search fixed in the header, and a console that is never covered. - **Says what's wrong.** If WebGPU exists but the GPU is blocked right now, Settings says so instead of claiming your browser has no WebGPU. ## Why it's different - **Your code stays local.** The folder is opened through the File System Access API: no upload, no account. - **Real tool calling**: `code.tree`, `code.read`, `code.search`, `code.edit`, `code.write`. You watch every call. - **Edits, not rewrites**: the agent patches the lines that change, even in files of several megabytes. - **Long tool results don't break the conversation**: they are compacted to fit the model's context. - **Context retrieval that works beyond English**, accents and Cyrillic included (measurements below). - **Real editor**: Monaco, file tree, tabs, `Ctrl+S`, and the git branch and last commit read straight from `.git`. - **Zero install, zero build.** Vanilla ES modules. - **Your language**: the whole IDE follows your browser's language (English, Spanish and more). - External providers (OpenAI, Anthropic, Ollama) are **opt-in**; keys stay in your browser. - Optional local **bridge** for real `node` / `npm` / `python` runs, downloaded from the main site with its SHA-256. Chrome or Edge recommended (WebGPU and File System Access). ## How it's built Write-ups on the whole stack (model, runtime, agent harness, editor and file access, all in one tab): **** ## Context management: how it's measured The context packer isn't chosen by intuition. Numbers measured at the **same token budget**: **Real agent sessions** (25 sessions, 174 probes, fact recall, no LLM judge): | | recall | |---|---| | tail truncation | 7.0 % | | previous version | 15.1 % | | **current** | **65.3 % ± 8.5** | **Long-term memory** (200 questions, F1 from the benchmark's own repo, a real model answering, ~8 % of the context): | | F1 | |---|---| | **the FULL context, uncompressed** | **22.56** | | tail truncation | 6.62 | | hand-written heuristics | 6.07 | | BM25 without IDF | 20.34 | | BM25 | 23.59 | | embeddings | 23.95 | | **rank fusion (BM25 + embeddings)** | **28.09** | **Retrieving well beats having everything**: 28.09 vs 22.56 with 8 % of the tokens. Irrelevant context isn't neutral ballast; it distracts. Two more things that were measured, not assumed: turning the heuristics on cost **−3.02 F1**, and removing IDF costs **−3.25**. Semantic search doesn't replace lexical search, it covers its blind spot: with no vocabulary overlap between question and answer, embeddings win (24.28 vs 18.60); with overlap, BM25 wins (29.33 vs 23.58), and fusion keeps both. References: BM25 (Robertson et al., TREC-3 1994) · IDF (Spärck Jones, 1972) · RRF (Cormack et al., SIGIR 2009) · MMR (Carbonell & Goldstein, SIGIR 1998) · attention sinks (Xiao et al., ICLR 2024) · valid time (Snodgrass & Ahn, SIGMOD 1985). The full story, including what went wrong: ## The Elffuss family - 🌐 Full app: - 💻 Source (Apache-2.0): - ✳️ Elffuss Claw, ask for an app and your computer builds it: · [Space](https://huggingface.co/spaces/UtopiaIA/elffuss-claw) - 🗣️ Elffuss Translator, speech-to-speech translation on your device: · [Space](https://huggingface.co/spaces/UtopiaIA/elffuss-translator) - 📝 Elffuss Copilot, live call notes that never leave your browser: - 🪢 Elffuss Braid, version control for many coding agents: · [Space](https://huggingface.co/spaces/UtopiaIA/elffuss-braid) - ⚙️ Elffuss Engine, the WebGPU runtime: · [notes](https://huggingface.co/spaces/UtopiaIA/elffuss-motor) - 🧬 Shared core: - 📰 All apps and the blog: