×

nf-llm-debugger @ 1.0.0

Provider: CRG
Claimed: 02 Jun 2026 09:49:25 (UTC)
Description: The `nf-llm-debugger` plugin integrates Nextflow with OpenAI-compatible LLMs (such as OpenAI, Ollama, or Llamafile) to automatically capture and diagnose process execution failures by translating cryptic error codes and logs into actionable human-readable explanations. It solves the problem of developers spending time deciphering obscure exit codes and stack traces by providing instant AI-powered error diagnostics. Nextflow pipeline developers would use this plugin to accelerate debugging and reduce troubleshooting time when their workflows fail.
Latest version: 1.0.0
Total downloads: 3 View trends

Summary

The nf-llm-debugger plugin hooks directly into the Nextflow runtime engine to capture process execution failures (such as non-zero exit codes, out-of-memory events, or command errors). It retrieves the failed task context and log outputs, compiles them into a structured report, and queries an OpenAI-compatible Large Language Model (LLM) API (such as Llamafile, Ollama, OpenAI, or LocalAI) to generate an instantaneous, highly accurate error diagnosis.

Key Features:

  • Automatic Runtime Interception: Monitors the task execution lifecycle (TraceObserver) and automatically analyzes errors.
  • Universal Compatibility: Works with any local or remote OpenAI-compatible completion endpoint (/v1/chat/completions).
  • No-Key Local Defaults: Configured out-of-the-box to use local, offline LLMs running via Llamafile or Ollama.
  • Actionable Diagnoses: Translates raw stack traces and OS exit codes (like 126, 127, 137) into human-readable steps.

Get Started

1. Requirements

  • Nextflow 24.04.0 or newer
  • Java 17 or newer

2. Enable the Plugin

Add the plugin declaration to the plugins block inside your nextflow.config:

plugins {
    id 'nf-llm-debugger@1.0.0'
}

3. Configure Your LLM Endpoint

Define your API parameters inside the params block of your nextflow.config:

params {
    llm_address = 'http://localhost:8080/v1/chat/completions' // Your local or remote LLM endpoint
    llm_model = 'LLaMA_CPP'                                   // The model identifier
}

If your LLM endpoint requires authentication (e.g. OpenAI or Gemini), export your API key in your shell environment:

export LLM_API_KEY="your-api-key"

Examples

1. Deliberately Failing Pipeline

Below is a simple Nextflow pipeline (main.nf) designed to trigger an error by attempting to read a non-existent file:

nextflow.enable.dsl=2

process failProcess {
    script:
    """
    echo "Starting a process that will fail..."
    cat nonexistent_file.txt
    """
}

workflow {
    failProcess()
}

2. Expected Output with LLM Diagnosis

When you run the pipeline above with nf-llm-debugger enabled:

nextflow run main.nf

The plugin automatically intercepts the task failure, sends the context to the configured LLM, and prints a structured diagnosis directly to the console:

executor >  local (1)
[03/4f4d68] failProcess | 0 of 1 ✘
🤖 [nf-llm-debugger] onFlowComplete - Success: false
🤖 [nf-llm-debugger] onFlowComplete - Error: Process `failProcess` terminated with an error exit status (1)
🤖 [nf-llm-debugger] Sending error report to LLM (model: LLaMA_CPP)...

================================================================================
🤖 [nf-llm-debugger] LLM ERROR DIAGNOSIS:
================================================================================
🤖 [DIAGNOSIS] The task 'failProcess' failed because the command tried to execute
'cat nonexistent_file.txt', but the file 'nonexistent_file.txt' does not exist
in the task's working directory.

💡 SUGGESTIONS:
1. Double-check if the file name is spelled correctly in your process script.
2. If this file is an input, make sure you declared it correctly in the `input:`
   block of the process so Nextflow stages it into the work directory.
================================================================================

ERROR ~ Error executing process > 'failProcess'

Caused by:
  Process `failProcess` terminated with an error exit status (1)

License

Licensed under the MIT License.

Nextflow version >=24.04.0
Depends On -
Release Date 02 Jun 2026 15:18:24 (UTC)
Release Notes https://github.com/biocorecrg/nf-llm-debugger/releases/tag/1.0.0
Download URL https://registry.nextflow.io/api/v1/plugins/nf-llm-debugger/1.0.0/download/nf-llm-debugger-1.0.0.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-llm-debugger/blobs/sha256:8beedb3cc6e136e927cb3bd30b8bd8c17a91710c0d7a503d303440f055cd543b
Size 9.2 KB
Checksum 2a01630dad6eee0dc83ee0ea8592d8c61fc036cd4d1a7330b61411eeaeb45882fe3e6c0c6a780a9487f8bb7fc2e7429f3bd792480fcccccc0ce33d9f77b89ca3
Total downloads 3 View trends
Security Scan
Version Nextflow version Date Status Downloads
1.0.0 >=24.04.0 02 Jun 2026 15:18:24 (UTC) 3