dragon.ai.agent.config.pipeline.PipelineNode

class PipelineNode[source]

Bases: object

A single node in a user-defined pipeline DAG.

A node is either agent-backed or a plain function:

  • Agent-backed (fn=None): the orchestrator dispatches the task to the named persistent agent via its queue. task_description is required in this case.

  • Plain function (fn=<callable>): the callable is wired directly into the Dragon Batch graph — no LLM, no agent queue. The callable must accept (*upstreams: TaskResult) -> TaskResult. The shared DDict handle is available via upstreams[0].serialized_ddict. task_description is ignored.

Parameters

agent_id:

Unique node identifier (also the agent id for agent-backed nodes).

task_description:

Human-readable task description sent to the agent. Ignored for plain-function nodes.

fn:

Optional callable for plain-function nodes. When set, the orchestrator uses it directly instead of dispatching to an agent.

depends_on:

List of agent_id values whose results must be available before this node executes.

__init__(agent_id: str , task_description: str = '', fn: Callable | None = None, depends_on: list [str ] = <factory>) None

Methods

__init__(agent_id, task_description, fn, ...)

Attributes

fn

task_description

agent_id

depends_on

agent_id: str
task_description: str = ''
fn: Callable | None = None
depends_on: list [str ]
__init__(agent_id: str , task_description: str = '', fn: Callable | None = None, depends_on: list [str ] = <factory>) None