Back to Mistral Rs

Use the built-in web UI

docs/src/content/docs/guides/serve/with-web-ui.md

0.8.222.6 KB
Original Source
bash
mistralrs serve -m Qwen/Qwen3-4B

Open http://localhost:1234/ui. The built-in web UI is mounted at /ui by default whenever you run mistralrs serve. It is a single-page app bundled into the binary; nothing is fetched from the network at runtime.

The UI provides:

  • A chat panel with markdown rendering, code block syntax highlighting, and streamed output.
  • A settings drawer with sampling controls (temperature, top-p, top-k, max tokens) and a system prompt field.
  • Inline rendering of thinking tokens when the model emits them.
  • Tool-call visualization when --enable-search, --enable-code-execution, or --enable-shell is also set.
  • Tool approval cards when approval mode is ask.
  • Multimodal attachments when the loaded model supports images, audio, or video.

With agents enabled

bash
mistralrs serve --agent -m Qwen/Qwen3-4B

See tool calling for what --agent enables and the individual flags behind it.

When the model calls a tool, the UI renders a collapsed block in the conversation. Expanding shows the tool arguments and result. Search blocks display the query and a result count; code-execution blocks display the executed Python and any output or images; shell blocks display the commands, stdout/stderr, and exit status.

The settings drawer controls search, code execution, shell, and tool approval per conversation without restarting the server. Set Tool approval to ask to approve or deny each agent action inline.

On Linux and macOS, code and shell execution use the default OS-level sandbox unless the server is started with --sandbox off. For the server, HTTP, Python, Rust, and sandbox settings, see enable code execution and enable shell execution.

With multimodal models

When the loaded model accepts images, a paperclip icon appears in the input bar. Attaching an image sends an image_url content part ({"type": "image_url", "image_url": {"url": "..."}}). Audio and video work the same on supporting models.

Modality support per model is in the supported models reference.

System prompt and sampling

The settings drawer state is persistent per browser. System prompts and sampling parameters survive reloads.

Clearing browser local storage for the site resets all UI state.

Disabling the UI

Pass --no-ui to mistralrs serve to skip mounting the UI router. The HTTP API continues to serve normally.