elm-π

ELM-Pi: Agentic AI using the UoE ELM service.

A coding agent whose model runs on the University’s own GPUs, two miles away, not on a credit card.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rob-c/elm-pi/main/install.sh)"

macOS or Linux. No sudo, nothing installed system-wide, one directory you can delete. You will need an ELM API key first — how to get one is below.

Qwen 3.5, 397B parameters and a 262K context, answering from Edinburgh, with 64 sub-agents on tap when one is not enough.

Start here: you need an ELM key

ELM keys are issued on request, not self-service. In the ELM web UI, submit the API-key request form describing what you want to use it for; it goes to an approval queue. Keys look like elm-xxxxxxxx-xxxxxxxxxxxxxxxx and are typically valid for 12 months.

Check whether you already have one before requesting a second. On any ELM browser tab, open the console (⌥⌘I) and run:

await (await fetch("/api/elm-key-requests?page=0&size=20",
      {credentials:"include"})).json()

Look for "status": "KEY_ISSUED" — the key is in elmKeyValue. Paste it when the installer asks, or set it up front:

ELM_API_KEY=elm-... /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rob-c/elm-pi/main/install.sh)"

What this is

pi is a terminal coding agent — it reads your files, edits them, runs commands and iterates, the way Claude Code or Codex do. This install points it at the University of Edinburgh’s ELM gateway, so the model doing the work is Qwen 3.5 397B on university hardware, billed against your departmental allocation rather than a credit card.

Commercial providers are removed from the install on purpose. A staff allocation of $500 at industry token rates is a few weeks of real coding-agent use; the same money on ELM lasts far longer, and the GPUs are ones the University already owns.

What the command does

About 650 MB and three minutes on a warm network. Re-running is safe: it never overwrites your key, your sessions, your memory or a config you have edited. Everything lives under one directory, so uninstalling is:

rm -rf ~/.local/share/elm-pi ~/.local/bin/pi

Prefer to read before you run? The script is install.sh, and INSTALL.md spells out the manual equivalent of every step.

Using it

pi                           # interactive, in whatever directory you're working in
pi -p "explain this repo"    # one-shot
pi --fast -p "..."           # one-shot, ~3x quicker to start
cat paper.tex | pi -p "find the undefined references"

The command is pi. The wrapper takes the name and hands over to pi.orig, the unwrapped CLI inside the install, so anything expecting a pi gets the wrapped, ELM-only one.

CommandWhat it does
/modelswitch between the ELM models
/thinkingreasoning — off by default here, and deliberately so
/elm-policywhy only ELM models are available
/exportsave the session to HTML or JSONL

What you get

ModelQwen/Qwen3.5-397B-A17B-FP8 — 262K context, tool calling, vision
Sub-agents64-child fan-out budget, with Llama 3.3 workers via a local tool-call shim
Editinganchor-based, which survives long files better than line-number patches
Memoryper-project AGENTS.md, plus searchable cross-session memory
WebDuckDuckGo, then Exa; off by default until pi --remote
Sessionsper-project, private to your account (directory mode 700; existing files tightened to mode 600)

The configuration carries a number of settings that were measured rather than guessed — thinking off, retry budgets tuned for a shared gateway, and a warning when the machine is already saturated with sub-agents. Dependencies are exact and locked; updates are validated in staging before activation. The reasoning and the numbers are in INSTALL.md.

Cost, and a word about policy

The ELM key is university-issued and metered. Qwen carries a guidance cost of 2 per unit against your department’s allocation — far cheaper than a commercial model, running on university hardware that ELM flags “Climate Sensitive” and “University Hosted” — but not free.

A coding agent’s usage profile looks nothing like the ELM chat UI: whole source files, long loops, retries. If your key was approved for a different stated purpose, tell the ELM team before they find out from a quota alert.

If something goes wrong

SymptomCause
pi: command not found~/.local/bin is not on your PATH yet — the installer adds it to your shell profile, so open a new shell
401 Invalid API keykey wrong, revoked, or past its expiry date
Chats fine, never edits filesthe backend returned no tool calls — see verify step 3 in INSTALL.md
-p "..." seems to hangnot a bug: print mode reads stdin. Pipe something in, or add < /dev/null
A commercial model is refusedworking as designed — see LOCKDOWN.md

The full table is in INSTALL.md. Anything else: open an issue.