# @electron/llm

An Electron module for prototyping local-first apps that chat with local large language models, exposing an API modeled on Chromium's window.AI but supporting any GGUF model.

This module is built on node-llama-cpp and loads a chosen GGUF model inside a utility process, streaming responses to renderer windows over Chromium's Mojo IPC pipes. Its goal is to make native LLM use in an Electron app easier than consuming a llama.cpp implementation directly, without necessarily being more feature-rich, and it is offered partly as a reference implementation for an app's own process architecture.

It installs with npm and is loaded in the main process before any window is created, after which a preload script it injects exposes a prompt and chat interface to every renderer. The maintainers describe it as an experimental exploration of how to support local language models in Electron, so a production app should be ready to migrate away from it later.

Website: https://github.com/electron/llm
