Open Source Hacker News (LLM)

El Yayster – a resident LLM that inhabits Emacs

EmacsLLM agentOllama

El Yayster inverts the usual "LLM in Emacs" pattern. Most packages make Emacs a mouth that talks to a model; this one makes Emacs a body the model inhabits. The agent perceives your live environment — open buffers, current mode, working directory — and acts on it through gated Emacs Lisp: decide, call a tool, read the result, repeat. It works against any OpenAI-compatible /chat/completions endpoint, with local Ollama as the happy path and no cloud required. The name is the joke and the thesis: "El" is the definite article and also Emacs Lisp, while "Yayster" is the dare to seat the model at eval and M-x too.

The agent's capabilities include eval_elisp, write_buffer, and run_command, but every mutating action asks your permission first — the agent drafts, you commit. It is self-discovering, using apropos and describe to explore Emacs's built-in self-documentation, so its toolset grows from the editor itself. Requests run in a curl subprocess so Emacs stays responsive, with progress streaming into a *yayster* buffer. The header line shows the live model, context-window occupancy auto-detected from Ollama's /api/show, and per-turn/session token counts.

El Yayster is a single self-contained file, yayster.el, with no ELPA packages beyond built-in cl-lib, json, and subr-x plus the curl binary and a reachable model. Setup is minimal: add the file's directory to load-path, (require 'yayster), call yayster-awaken, optionally bind C-c y to yayster-step and C-c Y to yayster-use-host, and set yayster-endpoint and yayster-model (defaults to http://localhost:11434/v1/chat/completions with qwen3:8b). It requires Emacs 28.1+ and curl; it has been tested with local models such as Qwen and GLM via Ollama. Available commands include yayster-step, yayster-use-host, and yayster-abort, plus an optional mode-line indicator that shows the current host/model and a pulse while a turn is in flight.

Read original →

← Back to home