Repository navigation
Elrond Local AI Copilot
Elrond Assistance (AI) is Imladris's built-in, privacy-preserving AI coding and data science copilot. Tailored specifically for R (tidyverse, ggplot2), Python (pandas, numpy, polars, matplotlib), SQL, and Quarto scientific authoring, Elrond executes locally on your hardware with zero telemetry sent to third-party clouds.
Unlike typical developer tools that require configuring Python virtual environments, CUDA drivers, API keys, or reverse proxies, Elrond is designed for zero setup:
graph TD
Toggle["Enable in Preferences → AI & Elrond"] --> CheckEngine{"Is llama.cpp on PATH or bundled?"}
CheckEngine -->|Yes| CheckModel{"Is Qwen2.5-Coder downloaded?"}
CheckEngine -->|No| AutoInstall["Download standalone engine to ~/.local/share/imladris/bin/"]
AutoInstall --> CheckModel
CheckModel -->|Yes| LaunchDaemon["Spawn llama-server (Vulkan GPU compute / CPU fallback)"]
CheckModel -->|No| DownloadModel["Background download Qwen2.5-Coder-3B (GGUF)"]
DownloadModel --> LaunchDaemon
LaunchDaemon --> Ready["Status Bar: Elrond running on Qwen2.5-Coder-3B"]
- Toggle "Write with Elrond Assistance (AI)" on in Preferences → AI & Elrond.
- If
llama.cpp(llama-server) is not installed, Imladris either uses the Flatpak-bundled engine or downloads a standalone binary into~/.local/share/imladris/bin/. - If no GGUF model is selected, Imladris automatically bootstraps
Qwen2.5-Coder-3Bin the background with a progress bar. - The engine spawns with Vulkan GPU acceleration (falling back to multi-core CPU compute on older systems) and confirms readiness via HTTP
/healthpolling.
In Preferences → AI & Elrond, an intuitive 3-stop slider lets you balance hardware usage and copilot proactivity:
| Feature / Metric | Low (On-Demand Only) | Medium (Smart Autocomplete) | High (Full Data Science Copilot) |
|---|---|---|---|
| Trigger Mechanism | Explicit shortcut (Ctrl+Shift+E) or Ribbon button click |
Automatic inline completion as you pause typing | Proactive inline code suggestions + Assistant panel advice |
| Context Window Size |
2048 tokens (minimal RAM footprint) |
4096 tokens |
8192 tokens (full document + schema context) |
| Typing Debounce | N/A (on-demand) | 500 ms pause | 250 ms fast response |
| Dataframe Awareness | Only explicitly highlighted text | Active dataframe columns (names(df), df.columns) |
Full dataframe structure, data types, and head preview |
| Plot Synthesis | Only when explicitly prompted | Autocompletes standard ggplot2 / matplotlib syntax | Proactively suggests optimal chart types based on data types |
| Recommended Hardware | 4 GB+ RAM / Intel HD Graphics or CPU | 8 GB+ RAM / 2 GB VRAM | 16 GB+ RAM / 4 GB+ Dedicated GPU (Vulkan/CUDA) |
Positioned directly next to the word and line counter in the bottom status bar, Imladris polls engine memory consumption every 2 seconds without blocking the main GTK4 UI thread:
Elrond running on Qwen2.5-Coder-3B - 0.24 GB RAM / 2.08 GB VRAM used
- Displays the currently loaded GGUF model name.
- Shows live host system RAM allocated by the inference subprocess.
- Shows live dedicated GPU VRAM consumption tracked via Vulkan/CUDA driver telemetry.
Press Ctrl+Shift+E or right-click in the editor and choose "Write with Elrond Assistance". Direct Editor Writing operates directly on the active document buffer without modal popovers:
- Apply to Selection: When text is selected, the generated code or revision replaces the highlighted range.
-
Update Active Chunk: When the cursor is positioned inside a fenced code chunk (
```{r},```{python}), the chunk body is updated in place. The opening fence and all leading Quarto options (#| label: ...,#| fig-cap: ...) are strictly preserved. -
Single-Step
Ctrl+ZUndo: All edits made during a Direct Editor Writing operation are recorded as a single buffer edit action. PressingCtrl+Zimmediately reverts the buffer to its previous state.
As you type code chunks, Elrond suggests completions in ghost text or popup completion lists via GtkSourceView. Press Tab or Enter to accept.
Open the Assistant side panel for multi-turn conversational querying, hypothesis validation, and statistical debugging.
In addition to the zero-config internal engine, Preferences → AI & Elrond allows routing queries to:
-
Local Servers: Ollama (
http://localhost:11434), LM Studio (http://localhost:1234), Cherry Studio, or LocalAI on loopback. -
Local CLI Harness: Automatic discovery and integration with host Antigravity CLI (
agy), OpenCode, or OpenClaude. -
Frontier Cloud APIs: Direct API key connections for Google Gemini (
gemini-2.0-flash,gemini-1.5-pro), Anthropic Claude (claude-3-5-sonnet), DeepSeek (deepseek-reasoner/ R1), Qwen, OpenAI, Kimi, and NVIDIA NIM. -
Free-Tier Cloud AI APIs:
-
Groq Free Tier (
api.groq.com, e.g.,llama-3.3-70b-versatile) -
Cerebras Free Tier (
api.cerebras.ai, e.g.,llama-3.3-70b) -
OpenRouter Free Models (
openrouter.ai, models ending with:free, e.g.,meta-llama/llama-3.3-70b-instruct:free) -
GitHub Models Free Tier (
models.inference.ai.azure.com, e.g.,gpt-4o) -
FreeLLMAPI Local Proxy (
http://localhost:8000)
-
Groq Free Tier (
-
Automatic Quota Failover:
When a cloud provider returns HTTP 429 (quota exceeded or rate limit), Imladris automatically cascades across candidate free-tier providers. To preserve data privacy, remote failover requires explicit user opt-in (
free_api_consent_acceptedinai_config.json). -
GitHub Copilot OAuth Device Flow:
Authenticate with GitHub Copilot via standard OAuth Device Code Flow (
https://github.com/login/device). Credentials are encrypted inlibsecretunder schemaio.github.Antux912012.Imladris.Copilotwith0600POSIX file permissions on fallback.
Imladris IDE (v0.45.0) • Core licensed under Apache License 2.0 (Apache-2.0) (Hybrid Open-Core) • Built with Vala, GTK4, Libadwaita, WebKitGTK 6.0 & Papirus Icons (GPL-3.0-or-later).