🚀 Free AI Bootcamp starts July 4 — spots are limitedRegister Nowor Email jayaram.linux@gmail.com
SaturdAI.
← All docs

2026-07-17

45-Minute Class Workbook: Open WebUI Configuration

A run-of-show for a 45-minute in-class session built from two existing docs: 20 Things to Administer in Open WebUI and Tool Calling & MCP in Open WebUI. Each segment follows the same pattern: talk for ~2 minutes about one configuration, make the change live, then show the changed behavior with a real prompt. Students follow along on their own account on the shared instance, except where noted as instructor-only.

Not included yet: Part B of the MCP doc (the mcpobridge) is left out of this run — it wasn't reliably working at time of writing. Once it's verified working end-to-end, it slots in as an extra ~8-minute segment before the wrap (see the note at the bottom).

Before class: prep checklist

  • Open WebUI is running and every student can reach it on the local network, with their own account approved.
  • The base model used in the demo is loaded and selectable by everyone.
  • You (the admin) have Admin Panel access for the Code Execution toggle in segment 3 — that one step is instructor-only, everyone else just watches their own screen for the effect.
  • Have the Weather Lookup tool code (segment 4, below) ready to paste — either pre-type it into a shared note/chat so students can copy it, or project your screen while everyone pastes along.
  • Prepare a short text file with 2–3 facts a base model can't know (e.g. this bootcamp's actual schedule) for the Knowledge/RAG segment — save it as bootcamp-facts.txt so it's ready to upload.

Run of show

TimeSegment
0–4Intro — the three-tier mental model
4–91. System Prompt
9–142. Temperature
14–193. Code Execution (Pyodide) — instructor-only toggle
19–264. Native Tool — Weather Lookup
26–345. Workspace Model preset
34–426. Workspace Knowledge (RAG)
42–45Wrap-up

Intro (0–4 min)

Draw three boxes: Controls Panel (per-chat, resets when you start a new chat), Workspace (per-preset, saved and reusable, shareable with others), Admin Panel / Settings (instance-wide, admin-only, affects every user). Everything today is one example from each box, in increasing scope.

1. System Prompt (4–9 min)

Talk (2 min): the system prompt is a standing instruction prepended to every message in this chat — it lives in the Controls panel (sliders icon above the message box) and resets when a new chat starts, unless it's later saved into a Model preset (segment 5).

Change:

  • Start a new chat, ask "What's 2+2?" — note the plain answer.
  • Open the Controls panel → System Prompt → enter: You only reply in pirate slang.

Show the changed behavior: ask the exact same question again — the answer comes back in pirate slang. Same model, same question, different behavior purely from the system prompt.

2. Temperature (9–14 min)

Talk (2 min): temperature controls sampling randomness — 0 is (near-)deterministic, higher values widen the range of next-token choices. It's one of the Advanced Params in the same Controls panel.

Change:

  • Controls panel → Advanced Params → Temperature → set to 0.
  • Ask "Give me one word that describes the ocean." twice in two separate messages — note the answers are the same or nearly so.
  • Set Temperature to 1.5.

Show the changed behavior: ask the same question twice more — the two answers now differ noticeably. Same prompt, same model, only the sampling parameter changed.

3. Code Execution / Pyodide (14–19 min, instructor-only)

Talk (2 min): the "Run" button on Python code blocks in chat executes via Pyodide — a full CPython interpreter compiled to WebAssembly that runs entirely client-side in the browser tab. No local Python install, no subprocess, no server call — which is also why it's sandboxed with no real filesystem or network access. This toggle is instance-wide, so only an admin changes it, but every student watches it disappear on their own screen live.

Change (instructor): Admin Panel → Settings → Code Execution → toggle off. Save.

Show the changed behavior: everyone asks their model for a short Python snippet (e.g. "Write Python to print the first 5 Fibonacci numbers") — the code block still renders, but the "Run" button is gone. Toggle it back on afterward and confirm it reappears — leave it on before moving to the next segment.

4. Native Tool — Weather Lookup (19–26 min)

Talk (2 min): Open WebUI lets you paste a Python function straight into the admin UI and hand it to a model as a callable tool — no extra process, no external server. This is the "native" half of the tool-calling story (the other half, real MCP servers via mcpo, comes in a later session).

Change: Workspace → Tools → + Create new tool, paste:

"""
title: Weather Lookup
description: Get current weather for a city using Open-Meteo (no API key needed)
"""
import requests

class Tools:
    def get_weather(self, city: str) -> str:
        """
        Get current weather for a city.
        :param city: Name of the city, e.g. "Bangalore"
        """
        geo = requests.get(
            "https://geocoding-api.open-meteo.com/v1/search",
            params={"name": city, "count": 1},
        ).json()
        if not geo.get("results"):
            return f"Could not find city: {city}"
        lat, lon = geo["results"][0]["latitude"], geo["results"][0]["longitude"]
        weather = requests.get(
            "https://api.open-meteo.com/v1/forecast",
            params={"latitude": lat, "longitude": lon, "current_weather": True},
        ).json()
        temp = weather["current_weather"]["temperature"]
        return f"Current temperature in {city}: {temp}°C"

Save it, then in a new chat click the tools icon (wrench/plug above the message box) and toggle Weather Lookup on.

Show the changed behavior: ask "What's the weather in Bangalore right now?" — the reply cites a real current temperature, proof it called the function instead of guessing. Toggle the tool back off and ask again to contrast with a plain (possibly wrong or refused) guess.

5. Workspace Model preset (26–34 min)

Talk (2 min): repeating segments 1, 2, and 4 by hand every single chat doesn't scale. A Workspace Model bundles a system prompt, Advanced Params, and enabled Tools into one saved, reusable preset that shows up in the model picker like any other model.

Change:

  • Workspace → Models → + New Model.
  • Name it Weather Bot, pick the same base model used so far.
  • System Prompt: You are a helpful weather assistant. Keep answers to one sentence.
  • Advanced Params → Temperature: 0.3.
  • Tools section → check Weather Lookup.
  • Save.

Show the changed behavior: start a brand-new chat, pick Weather Bot from the model dropdown, ask "What's the weather in Bangalore?" — no manual system prompt, no manual temperature change, no manually toggling the tool on. All three ride along with the preset automatically.

6. Workspace Knowledge (RAG) (34–42 min)

Talk (2 min): Knowledge collections chunk and embed uploaded documents so a model can retrieve from them mid-chat — this is retrieval-augmented generation (RAG), and it's how you give a model facts it was never trained on, like your own bootcamp's schedule.

Change:

  • Ask the base model directly: "When does the SaturdAI bootcamp meet, and who teaches it?" — it will guess or admit it doesn't know.
  • Workspace → Knowledge → + New Knowledge → upload bootcamp-facts.txt (prepared before class).
  • Workspace → Models → edit Weather Bot (or a new preset) → Prompts / Knowledge section → attach the new Knowledge collection → Save.

Show the changed behavior: in a chat using that preset, ask the same question again — the model now answers correctly from the uploaded facts, and cites the source document if citations are enabled.

Wrap-up (42–45 min)

Re-draw the three boxes from the intro and slot today's six changes into them: Controls panel (System Prompt, Temperature), Workspace (Weather Lookup Tool, Model preset, Knowledge), Admin Panel (Code Execution). Point at the Tool Calling & MCP doc for Part B — real MCP servers via mcpo — as the natural next session once that bridge is verified working.

Adding the MCP/mcpo segment later

Once mcpois confirmed working end-to-end (see the gotchas in the MCP doc's Part B), insert it as a segment 7 between Knowledge and the wrap: talk for 2 minutes on "real MCP vs native tools," register the Tool Server URL in Admin Panel → Settings → Integrations, then ask "What time is it in Tokyo?" to show a genuine MCP call. Budget ~8 minutes and shift the wrap to 42–50, or trim segment 3 (Code Execution) to save 3–4 minutes elsewhere.