--- 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 - transformers.js - local-llm - agent - code - gemma --- # ๐Ÿง‘โ€๐Ÿ’ป Elffuss Code โ€” a VS Code-style IDE with an AI agent, 100% in your browser Open a local folder and a full web IDE unfolds around it โ€” real Monaco (the VS Code editor), a file tree, tabs โ€” with an AI agent that **reads, searches and edits your project for real**. The model runs on **your** GPU via WebGPU. Your code never leaves your machine. > โš ๏ธ **Open it full-screen** ([direct link](https://kikocis-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-calling, not autocomplete. ## Why it's different - **Your code stays local.** The folder is opened via the File System Access API โ€” no upload, no account. - **The model runs on your GPU** (WebGPU, Gemma-4 E4B via LiteRT-LM; ONNX/transformers.js as fallback). - **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 instead. - **Context retrieval that works beyond English** โ€” accents and Cyrillic included (measurements below). - **Real editor**: Monaco, file tree, tabs, `Ctrl+S`, and git branch/last commit parsed 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` execution โ€” downloaded from the main site. ## How it's built Write-ups on the full stack โ€” model, runtime, agent harness, editor and filesystem 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 using 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 โ€” an agentic OS in your browser: ยท [Space](https://huggingface.co/spaces/KikoCis/elffuss-claw) - ๐Ÿงฌ Shared core: - ๐Ÿ—ฃ๏ธ Elffuss Translator โ€” speech-to-speech translation on your device: - ๐Ÿ“ Elffuss Copilot โ€” live call notes that never leave your browser: - ๐Ÿ“ฐ All apps and the blog: