Open source A local-first AI agent, in Rust

The agent built for the context window you actually have.

Real coding work on 7B–32B local models. It picks what earns a place in the prompt, asks before it acts, and the kernel holds every command.

curl -fsSL https://jgermade.github.io/luu/setup.sh | sh

Linux and macOS · no root · read it before you pipe it

fig. 1 — luu serve, drawn: one job from prompt to fold, the Debug inspector following it. Illustrated, not recorded.

Runs on the models you can reach

  • Ollama
  • llama.cpp
  • MLX
  • vLLM
  • LM Studio
  • Qwen
  • Gemma
  • Mistral
  • DeepSeek
  • Kimi
  • GLM
  • Anthropic

How a job runs

It asks. You approve. Then it works.

  1. 01

    Explore

    a draft reads, on the floor

  2. 02

    Plan

    held until you approve

  3. 03

    Act

    the plan is the sandbox

  4. 04

    Fold

    into a summary

Context is the product

Every token earns its place.

Chosen against a budget, then rendered — so every token sent is attributable, and its worth is measured.

What changes least goes first

stable fresh system412 tool definitions1,180 repository map1,024 cached prefix byte-identical every call folded jobs64 turns, verbatim1,746 appended, never rewritten code + your prompt606 fused, as late as possible

Prefix reuse, measured

in blocks · mean 67% one turn · 33% 100%7550250 window full 25101520 turn, in a 512-token window

from the record's table; its ranges drawn straight

The turn is the unit

the window t1t2t3 t4t5t6t7t8 history · its budget floor == evicted turns 1–3 · 1.4K policy block

Only the code it points at

which file applies Landlock between fork and exec? 4.8 4.8 2.0 the repository, parsed the prompt linux.rs:1-25265 mod.rs:1-25309 runtime.rs:495-517263 187 free 837 / 1024 tokens

Safe by construction

The model never runs anything.

It asks. luu checks the plan, and the kernel holds what runs.

  • an allowlist, not a deny list
  • Landlock + seccomp
  • a container, if you want one
  • signed approvals
luu checks the plan signed container · optional landlock + seccomp rw ./ · ro ~/.cargo · cpu 300 s ›cargo test login test result: ok. 3 passed exit 0 · 3.8 s socket() → EPERM model read /etc/passwd no rule grants it

Local first

Your machine by default. Remote only when named.

luu downloads, checks and starts the engine, loads the model, and stops it when nothing uses it.

this machine sha256 ✓ from the release llama-server mlx-serve ollama :8080 :8081 :11434 qwen-coder 14B gemma 12B llama3.1 8B remote = true remote APIs never a fallback

Where you work

One engine, two ways in.

Terminal

luu chat

Web UI →

luu serve

Install

One line, a container, or a chart.

One binary, checked against the release's sha256. Then it asks how luu runs: local, for you, in ~/.local/bin with no root — or online, for people who log in: a systemd service on Linux, and a one-time link to finish it in the page — its mail, and you as its owner.

curl -fsSL https://jgermade.github.io/luu/setup.sh | sh
wget -qO- https://jgermade.github.io/luu/setup.sh | sh
  • Linux x86_64
  • Linux arm64
  • macOS Apple Silicon
  • macOS Intel

luu serve in a container, its state and its work tree in volumes. The image is ghcr.io/jgermade/luu, for amd64 and arm64.

docker run -d --name luu --restart unless-stopped \
  -v luu-state:/state -v luu-work:/work \
  -p 7878:7878 ghcr.io/jgermade/luu

Online — your domain, then how it sends mail and you as its owner, proved by one code sent to you — then a restart:

docker exec -it luu luu config
docker restart luu

Or keep it to whoever holds the token: docker exec luu cat /state/token, and open http://localhost:7878/?token=…. deploy/compose.yaml puts Caddy in front for TLS on a name of your own. Every session runs in this one container.

luu in a pod, its volumes kept on uninstall, behind an Ingress of any class — and, with runtime=kubernetes, every session in a pod of its own that mounts only its folder. The chart is oci://ghcr.io/jgermade/charts/luu.

helm install luu oci://ghcr.io/jgermade/charts/luu \
  --set ingress.enabled=true \
  --set ingress.host=luu.example.com \
  --set ingress.tls.enabled=true \
  --set runtime=kubernetes

The certificate is the Secret luu-tls, which cert-manager writes from an issuer in ingress.annotations. With Traefik's own ACME, name its resolver instead: --set ingress.tls.certResolver=letsencrypt.

Online, then a restart:

kubectl exec -it deploy/luu -- luu config
kubectl rollout restart deploy/luu

A session's pod is made through a ServiceAccount that may create pods, so hold the namespace to Pod Security restricted: kubectl label ns <ns> pod-security.kubernetes.io/enforce=restricted. Or keep it to the token, kubectl exec deploy/luu -- cat /state/token. Without an Ingress, kubectl port-forward svc/luu 7878.

# the mock backend: no model needed
$ luu chat "hola"

# against a local Ollama
$ luu chat "hola" --backend ollama \
    --model qwen2.5-coder:7b \
    --context-limit 8192

# the web UI, on 127.0.0.1:7878
$ luu serve
Installer options

With no command the script asks what to do. Pass one after sh -s --, for example sh -s -- install --dir ~/bin. It never edits a shell profile: when the directory is not on your PATH, it prints the line to add.

install · reinstall · uninstall
Asked for when none is given, offering reinstall and uninstall only when luu is already there. install does nothing when that version is already there; reinstall always downloads again.
--dir DIR
Where the binary goes. Default ~/.local/bin, or LUU_INSTALL_DIR.
--version TAG
A release such as v0.1.1. Default the latest, or LUU_VERSION.
--purge
With uninstall: also delete sessions, keys, config.toml, engines and models. Asks first.
-y, --yes
Do not ask before deleting — needed for --purge when there is no terminal.
LUU_DOWNLOAD_URL
A directory with luu-<target>.tar.gz and SHA256SUMS, used instead of GitHub: a mirror, or file:// for your own build.