@mlflow/opencode
v0.2.0-rc.1
Published
OpenCode integration package for MLflow Tracing
Downloads
242
Maintainers
Readme
@mlflow/opencode
MLflow tracing plugin for OpenCode.
This plugin automatically traces OpenCode conversations to MLflow, capturing:
- User prompts and assistant responses
- LLM calls with token usage
- Tool invocations and results
- Session metadata
Installation
npm install @mlflow/opencodeUsage
- Add to your
opencode.json:
{
"plugin": ["@mlflow/opencode"]
}- Set environment variables:
export MLFLOW_TRACKING_URI=http://localhost:5000
export MLFLOW_EXPERIMENT_ID=123- Run OpenCode normally - traces are created automatically when sessions become idle.
Configuration
The plugin is configured via environment variables:
| Variable | Required | Description |
| ----------------------- | -------- | ---------------------------------------------------------- |
| MLFLOW_TRACKING_URI | Yes | MLflow tracking server URI (e.g., http://localhost:5000) |
| MLFLOW_EXPERIMENT_ID | Yes | MLflow experiment ID |
| MLFLOW_OPENCODE_DEBUG | No | Set to true to enable debug logging |
Viewing Traces
Start an MLflow server and view your traces in the UI:
mlflow server
# Open http://localhost:5000License
Apache-2.0
