Skip to content

⛓️ dagpipe β€” Directed Acyclic Graph Execution for Deterministic State

dagpipe executes pipelines composed of nodes connected in a directed acyclic graph (DAG). Each node receives an immutable State and optionally produces derived states for downstream nodes. Execution is deterministic: the same input state and pipeline always produce the same output states and lineage.

Doc model: this wiki is written for humans β€” how‑to guides, examples, and testing recipes. The authoritative API contracts live in the code (GSDFC docstrings) and the machine‑readable bundle under docs/mcp/.


πŸš€ Key Features

  • 🧱 Node-based execution β€” each node is a pure, deterministic unit of work
  • πŸ”€ DAG topology β€” branching, merging, and multiple roots out of the box
  • 🧊 Immutable State β€” states are never mutated; fork() creates children
  • πŸ—‚οΈ Hierarchical Payload β€” dot-path read/update over nested data
  • πŸ“ Schema validation β€” payloads and updates validated at construction
  • ⚑ Async execution β€” AsyncNode + run_async for I/O-bound steps
  • πŸͺœ Step-wise runs β€” resumable, progress-hooked execution via run_steps
  • πŸ“œ YAML pipelines β€” declare schema, nodes, and graph in one file (load_pipeline)

πŸ“¦ Installation

From your internal PyPI:

pip install --extra-index-url https://$PYPI_USERNAME:$PYPI_PASSWORD@pip.aetoskia.com/simple dagpipe

From local source:

pip install -e .

⚑ Quick Start

from dagpipe import Payload, Schema, State, Graph, Engine, Node

class HelloNode(Node):
    id = "hello"

    def resolve(self, state):
        yield self.fork(state, payload_update={"msg": "hello"})

class MyState(State):
    schema = Schema({"msg": str | None})

graph = Graph()
graph.add_root(HelloNode())

engine = Engine(graph)
results = engine.run(MyState(payload=Payload({})))

assert results[0].get("msg") == "hello"

πŸ“ Documentation Structure

Section Description
Overview Architecture, lifecycle, and execution model decision table
Core Components Validated reference for the public API surface
Use cases Step-by-step recipes, grouped by theme
Β· Getting Started
Β· 01 – Basic linear pipeline Sequential multi-node pipeline
Β· 02 – Graph execution Branching, merging, multiple roots
Β· 03 – YAML pipelines Declarative pipelines via load_pipeline
Β· State & Data
Β· 04 – Schema and payload Nested schemas and dot-path access
Β· 05 – State fork and lineage Immutability, lineage, confidence
Β· Async & Steps
Β· 06 – Async execution AsyncNode and run_async
Β· 07 – Step-wise execution Resumable runs and progress hooks
Best Practices Node design, state design, and gotchas
Error Handling Library exceptions and where they surface
Testing Mock-based quickstart


Β© Aetoskia Internal β€” dagpipe 0.0.1