×

nf-agent-pi @ 0.5.3

Provider: nextflow-io
Claimed: 20 Aug 2026 12:29:51 (UTC)
Description: The nf-agent-pi plugin provides a containerized runner for Nextflow's agent primitive, enabling language model integration with access to shell and filesystem tools that other runners don't support. It solves the problem of securely executing AI agents as Nextflow tasks while keeping provider credentials isolated from the task environment. Bioinformaticians and workflow developers would use this to build AI-assisted data analysis pipelines that can inspect files, run commands, and interact with language models.
Latest version: 0.5.3
Total downloads: 441 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 25 Sep 2026 14:05:51 (UTC)
Release Notes -
Download URL https://registry.nextflow.io/api/v1/plugins/nf-agent-pi/0.5.3/download/nf-agent-pi-0.5.3.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-agent-pi/blobs/sha256:23934f96788340f7b53ede59315926db6a7e2f7f402a0d56920106ec19211b4a
Size 23.8 MB
Checksum 831e79b239ed8a9f7f87fb206f8e6a079e04f7968a2e4baa03537d2bbe34e8431daec024edc8a6198bbd962904963ca0fe9d20de49da7617b52040ad044f7957
Total downloads 440 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.5.3 >=26.08.0-edge 25 Sep 2026 14:05:51 (UTC) 440
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