dragon.ai.agent.config.pipeline.PipelineNode
- class PipelineNode[source]
Bases:
objectA 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_descriptionis 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 viaupstreams[0].serialized_ddict.task_descriptionis 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_idvalues 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