MLflow Tracing

byted-motor@byted-motor

OpenClaw integration package for MLflow Tracing

Readme

MLflow logo

๐Ÿฆž OpenClaw MLflow Observability Plugin

MLflow integration for OpenClaw for observability, evaluation, and monitoring. This plugin automatically traces OpenClaw agent executions in MLflow, capturing LLM calls, tool invocations, and sub-agent spans in a hierarchical trace structure.

OpenClaw MLflow Integration

Key Benefits

  • ๐ŸŒ Open Source: MLflow is 100% open source and governed by the Linux Foundation, rooted in the same philosophy as OpenClaw.
  • ๐Ÿ›ก๏ธ You Own Your Data: MLflow is self-hosted. Trace data from OpenClaw stays on your infrastructure and never leaves it.
  • ๐Ÿ”€ Vendor Neutral: MLflow works with any LLM provider or agent framework, with no vendor lock-in.

Setup

1. Install the Plugin

bash
openclaw plugins install @mlflow/mlflow-openclaw

2. Start the MLflow Server

Start the MLflow server (self-hosting) following the instructions. Alternatively, use a managed MLflow service if you prefer not to self-host.

3. Configure the Plugin

text
openclaw mlflow configure

The plugin will prompt you for the MLflow tracking URI and experiment ID. You can create an experiment from the MLflow UI.

text
~$ openclaw mlflow configure

๐Ÿฆž OpenClaw 2026.3.13 (61d171a) โ€” Automation with claws: minimal fuss, maximal pinch.

โ”Œ  MLflow Tracing configuration
โ”‚
โ—†  MLflow Tracking URI
โ”‚  http://localhost:5000
โ””
โ—‡  Experiment ID
โ”‚  2

4. Check the Status

Verify the configuration by running the following command:

bash
openclaw mlflow status

If the configuration is successful, you should see the effective configuration in the output.

5. Talk to OpenClaw

Run or restart the OpenClaw gateway to apply the configuration.

bash
openclaw gateway run  # or openclaw gateway restart
openclaw message send "Hello, Lobster!"

Visit the MLflow UI (e.g. http://localhost:5000) to see the trace.

MLflow UI

Configuration

Environment Variables

Tracking URI and experiment ID can also be set through environment variables:

bash
export MLFLOW_TRACKING_URI=http://localhost:5000
export MLFLOW_EXPERIMENT_ID=<your-experiment-id>

Plugin Allowlist

OpenClaw shows a warning when a community plugin is installed but not declared in the plugin allowlist. Add mlflow-openclaw to the plugin allowlist in your openclaw.json file to suppress the warning.

text
{
    "plugins": {
        "allow": ["mlflow-openclaw"]
    }
}

What Gets Traced

The plugin creates a span hierarchy for each agent session:

text
AGENT (openclaw_agent)              โ† root span
โ”œโ”€โ”€ LLM (llm_call)                  โ† each LLM interaction
โ”œโ”€โ”€ TOOL (tool_<name>)              โ† each tool invocation
โ”œโ”€โ”€ AGENT (subagent_<label>)        โ† sub-agent executions
โ””โ”€โ”€ ...

Development

bash
# Type-check
npm run typecheck

# Test
npm test

# Format
npm run format

# Lint
npm run lint

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.