×

nf-agent-pi @ 0.5.4

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:
    answer: String

    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:
    report: String

    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.08.0-edge
Depends On -
Release Date 06 Oct 2026 10:06:18 (UTC)
Release Notes -
Download URL https://registry.nextflow.io/api/v1/plugins/nf-agent-pi/0.5.4/download/nf-agent-pi-0.5.4.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-agent-pi/blobs/sha256:355a00e3140afde49a8adca3a39230681ff5692aefd82f453ccee2fa3ccf1f05
Size 23.8 MB
Checksum b96c3c4ad1aecb17ada8c9f546475bcaf79fa8b083d2a2be0c4bd359111bb4cc08b53dc3680136438bdfb63597ab1594ae2659563a9b1a5a58a5633b740db91a
Total downloads 4 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