agentleFS
loom-funloom-fun/loom-skills/skills/loom-demo-ui/SKILL.md

loom-demo-ui

Skill4 starsChanged 7 days agoMITView on GitHub

Start and use the Loom Playground web UI (chat with streaming reasoning and tok/s, ASR with mic recording, TTS, image generation, embedding similarity) that proxies to one or more running loom-serve instances and discovers their models automatically. Use when the user wants a browser demo/UI for Loom models.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Start the model servers with loom-setup (serve.sh), for example a GPU server on :8100 with several models and an NPU server on :8101.

    line 24
  2. Distinctive:

    Start the UI. The tools venv needs fastapi, uvicorn and httpx:

    line 26
  3. Very specific:

    Always pipe --dump-dom as shown.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Loom Playground UI

A small FastAPI proxy (ui/server.py) + one static page (ui/index.html). The page polls each upstream's /v1/status, groups ready models by loom.kind, and wires the tabs:

TabModel kindWhat it does
ChattextDropdown of every text model. Streams the reply, shows reasoning first, then reports TTFT and decode tok/s. Image attach is allowed when the model lists image input.
TranscriberecognitionUpload a file, record from the mic, or use the bundled short.mp3. The browser converts audio to 16 kHz mono PCM.
SpeakspeechPlays the result and reports real-time factor.
Imageimage512² or 1024², with a seed.
EmbedembeddingOne sentence per line; shows a cosine-similarity matrix.

The first served model of each kind is used, and missing kinds show "(none)".

Start

  1. Start the model servers with loom-setup (serve.sh), for example a GPU server on :8100 with several models and an NPU server on :8101.
  2. Start the UI. The tools venv needs fastapi, uvicorn and httpx:
    LOOM_UI_UPSTREAMS="gpu=http://127.0.0.1:8100,npu=http://127.0.0.1:8101" \
      bash ${CLAUDE_SKILL_DIR}/start_ui.sh 8090 ~/loom/.tools
    It prints UI: http://127.0.0.1:8090. The log is /tmp/loom-ui-8090.log; to stop it, run kill $(cat /tmp/loom-ui-8090.pid).
  3. Open the page on the same machine. The microphone needs localhost or https. Remotely, use an SSH tunnel: ssh -L 8090:127.0.0.1:8090 host.

LOOM_UI_UPSTREAMS takes any number of name=url pairs, and the name becomes the route /api/<name>/…. You can add models without touching the UI: restart the upstream loom-serve with another --model=, and within 5 s the page picks it up from /v1/status.

Verify (headless)

curl -s localhost:8090/api/targets                       # ["gpu","npu"]
curl -s localhost:8090/api/gpu/v1/status | head -c 200
chromium --headless --no-sandbox --virtual-time-budget=8000 --dump-dom http://127.0.0.1:8090/ \
  | grep -o '<select id="chatmodel">.*</select>\|data-t="[a-z]*"[^<]*'   # dropdown + tab labels populated

Always pipe --dump-dom as shown. Snap chromium's stdout redirected straight to a file gives 0 bytes, under /tmp and $HOME alike. If you need a file, use … --dump-dom URL | cat > ~/dom.html.

Recommended demo set on Strix Halo

The GPU server shares a 50 GiB elastic budget (--memory_bytes=53687091200 --parameter_idle_ms=60000) across:

  • Qwen3.8-27B vision (preset vision)
  • moonshine-streaming-tiny
  • pocket-tts
  • Krea-2-Turbo image-int8
  • optionally your own ported LLM package

The NPU server runs Qwen3-Embedding-0.6B (older wheel, --pool_backing=fixed).

Switching between big models takes a few seconds while weights reload.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.