×

nf-agent-pi @ 0.6.0

Provider: nextflow-io
Claimed: 20 Aug 2026 12:29:51 (UTC)
Description: This plugin provides the `pi` agent runner for Nextflow's `agent` primitive, enabling language model integration within data pipelines by executing agents in containers with access to shell and filesystem tools. It solves the problem of securely running LLM-powered tasks in Nextflow workflows while keeping provider credentials isolated through RPC, making it ideal for bioinformaticians and data scientists who want to incorporate AI capabilities into their computational pipelines. The runner supports tool calling, retries, and full Nextflow lineage tracking for each agent invocation.
Latest version: 0.6.0
Total downloads: 465 View trends

Summary

This plugin provides the pi agent runner, one of the two runners that execute the Nextflow agent primitive.

An agent is a process-shaped primitive: it declares typed inputs and outputs, renders a prompt, calls a language model — optionally letting the model call Nextflow modules as tools — and emits the result on a channel. Each invocation runs as an ordinary Nextflow task, so work directories, retries, parallelism, resume, and lineage all apply.

The pi runner executes the agent inside a container rather than in the driver JVM. That container boundary is what makes the shell:bash tool available, which the langchain4j runner (nf-agent) rejects. The plugin itself ships no runtime: the agent harness and the agent-rpc proxy live in a runner image published alongside each Nextflow release, and the plugin jar embeds the coordinate of the image built from the same commit. Provider credentials reach the container over RPC and never enter the task environment, the task script, or the runner's credential store.

Agents are a preview feature. Their syntax and behavior may change in future releases.

Get Started

Select the runner in your nextflow.config:

agent.runner = 'pi'

The plugin is loaded automatically when the configuration declares an agent scope. Declare it explicitly to pin a version:

plugins {
    id 'nf-agent-pi@0.5.1'
}

Provide the model credential, preferably as a pipeline secret:

agent {
    runner = 'pi'
    apiKey = secrets.LLM_KEY
    model = 'openai/gpt-5-mini'
}

A container engine is required, since every agent invocation runs in the runner image.

Examples

A single agent

agent qa {
    model 'openai/gpt-5-mini'
    instruction 'You are a concise scientific assistant.'

    input:
    question: String

    output:
    stdout()

    prompt:
    """
    Answer briefly: ${question}
    """
}

workflow {
    qa('What is FASTQ format?').view()
}

Shell and filesystem tools

shell:bash is supported only on this runner. The runner's file tools are rooted at the work directory with the container as the outer bound; shell:bash has no boundary inside the container:

agent inspector {
    model 'openai/gpt-5-mini'
    tools 'fs:*', 'shell:bash'

    input:
    sample: Path

    output:
    stdout()

    prompt:
    """
    Inspect ${sample} and report what kind of data it holds.
    """
}

Pinning the runner image

By default the runner uses the image published with the Nextflow release it ships in. Override it to run a mirrored or custom image:

agent {
    runner = 'pi'
    container = 'public.cr.seqera.io/nextflow/nf-agent-pi:0.5.1'
}

Reaching the driver from the container

Tool calls travel back to the driver over RPC. The driver host is inferred where possible; override it when the inferred address is not reachable from the container:

agent {
    runner = 'pi'
    rpc {
        remoteHost = '10.0.1.7'
        port = 8099
    }
}

License

Apache License 2.0

Nextflow version >=26.10.0
Depends On -
Release Date 12 Oct 2026 10:51:16 (UTC)
Release Notes -
Download URL https://registry.nextflow.io/api/v1/plugins/nf-agent-pi/0.6.0/download/nf-agent-pi-0.6.0.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-agent-pi/blobs/sha256:e84e6ae315d663d2af7fe864b8dbe0af0965a36dc32b3f5f72ed88211c3703a2
Size 23.8 MB
Checksum a7b3f7f3f8bb18de8f99c1d2e035a6bdcab0e55a1293d5af2777ef8e666b22b59d3fb465c0699caddd3f407f56dc0eefc1a3727e8f2fd225dfdfa07f6c4a83b9
Total downloads 19 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.6.0 >=26.10.0 12 Oct 2026 10:51:16 (UTC) 19
0.5.4 >=26.08.0-edge 06 Oct 2026 10:06:18 (UTC) 4
0.5.3 >=26.08.0-edge 25 Sep 2026 14:05:51 (UTC) 441
0.5.2 >=26.08.0-edge 22 Sep 2026 18:45:04 (UTC) 0
0.5.1 >=26.08.0-edge 20 Aug 2026 12:53:17 (UTC) 1