×

nf-agent-pi @ 0.7.0

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 LLM API providers and optional tool calling capabilities. It solves the problem of securely executing AI-powered agents as Nextflow tasks while keeping credentials isolated and supporting advanced tools like shell execution and filesystem operations. Bioinformaticians and workflow developers would use this to incorporate LLM reasoning into data processing pipelines with full Nextflow features like retries, parallelism, and resumability.
Latest version: 0.7.0
Total downloads: 623 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.11.0-edge
Depends On -
Release Date 17 Nov 2026 17:18:00 (UTC)
Release Notes -
Download URL https://registry.nextflow.io/api/v1/plugins/nf-agent-pi/0.7.0/download/nf-agent-pi-0.7.0.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-agent-pi/blobs/sha256:80ce4e53f372034c3fccf96c677c28043dd5711f7d8d6c2a96b07738ee1edaa0
Size 23.6 MB
Checksum 6ea357467b5708334347a2667609b828cc27a0196c7585fb71818a461d57e0006737418191ced1cefb8ec1c598b3ed08047055036df232844ef7947bb97d639c
Total downloads 0 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.7.0 >=26.11.0-edge 17 Nov 2026 17:18:00 (UTC) 0
0.6.0 >=26.10.0 12 Oct 2026 10:51:16 (UTC) 165
0.5.4 >=26.08.0-edge 06 Oct 2026 10:06:18 (UTC) 15
0.5.3 >=26.08.0-edge 25 Sep 2026 14:05:51 (UTC) 442
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