docs/docs/genai/tracing/integrations/listing/open-webui.mdx
import ImageBox from "@site/src/components/ImageBox"; import TilesGrid from "@site/src/components/TilesGrid"; import TileCard from "@site/src/components/TileCard"; import { Users, BookOpen, Scale } from "lucide-react";
Open WebUI is a self-hosted web interface for running LLMs locally or via remote APIs. MLflow integrates with Open WebUI through its Pipelines system — a lightweight filter mechanism that intercepts every chat request and response. This page shows how to install and configure an MLflow filter pipeline that logs a trace for every conversation turn, grouped by session in the MLflow UI.
Open WebUI's Pipelines system supports filter pipelines with two hooks:
inlet — runs before each request; captures the user message and session contextoutlet — runs after each response; logs a complete MLflow trace with user input, assistant response, model name, and token usageAll turns of the same conversation are linked via mlflow.trace.session, so you can select "Group by session" in the MLflow UI to see the full conversation flow.
mlflow server --disable-security-middleware
open-webui serve
Build a custom Docker image with MLflow installed:
cat > Dockerfile.mlflow <<'EOF'
FROM ghcr.io/open-webui/pipelines:main
RUN pip install --no-cache-dir mlflow
EOF
docker build -f Dockerfile.mlflow -t pipelines-mlflow .
docker run -p 9099:9099 \
--add-host=host.docker.internal:host-gateway \
-v pipelines:/app/pipelines \
--name pipelines \
--restart always \
-e MLFLOW_TRACKING_URI=http://host.docker.internal:5000/ \
-e DEBUG_MODE=true \
pipelines-mlflow
In Open WebUI, go to Admin Panel → Settings → Connections and add a new OpenAI API connection:
http://localhost:9099/0p3n-w3bu! (default credential)Go to Admin Panel → Settings → Pipelines. Set the Pipelines listener address to http://host.docker.internal:9099, then upload the pipeline file using the file upload button. Then configure the MLflow tracking URI and experiment name in the pipeline's valve settings:
You can find the pipeline file at examples/open_webui/mlflow_filter_pipeline.py in the MLflow repository.
Start a conversation in Open WebUI:
<ImageBox src="/images/llms/tracing/open-webui/chat_session.png" alt="Open WebUI chat session" />Open the MLflow UI and navigate to the Traces tab. Each conversation turn appears as a separate trace:
<ImageBox src="/images/llms/tracing/open-webui/trace_single_1.png" alt="MLflow single trace view" /> <ImageBox src="/images/llms/tracing/open-webui/trace_single_2.png" alt="MLflow trace detail" />Enable "Group by session" to see the full conversation grouped under one session:
<ImageBox src="/images/llms/tracing/open-webui/trace_session.png" alt="MLflow session grouped view" />| Field | Description |
|---|---|
| Inputs | Last user message per turn |
| Outputs | Assistant response |
model | Model name reported by Open WebUI |
mlflow.trace.session | Chat ID — groups all turns of a conversation |
mlflow.trace.user | Authenticated user's email |
| Token usage | Input/output/total tokens when provided by the backend |
The pipeline exposes the following valves configurable from the Open WebUI admin UI:
| Valve | Default | Description |
|---|---|---|
mlflow_tracking_uri | http://localhost:5000 | MLflow tracking server URI |
mlflow_experiment_name | open-webui | Experiment name in MLflow |
debug | false | Enable debug logging |
A complete, runnable example including the pipeline source and setup instructions is available in the MLflow repository: