Skip to content

Runtime

A Retriever Pipeline is the executable graph. It validates Flow wiring, exposes an intermediate representation, renders visual graph artifacts, supports local stepping, and can run through different backends.

from retriever.flow import Latest, Pipeline, Rate

with Pipeline("agent") as pipe:
    camera = CameraFlow() @ Rate(hz=30)
    detector = ColorDetector() @ Rate(hz=10)
    pipe.connect(camera, detector, sync=Latest())

pipe.validate()
pipe.visualize("artifacts/agent.html")
pipe.run(duration=10)
ValidateCatch missing ports, invalid sync policies, type-shape mistakes, and invalid loaded IR before launch.
VisualizeRender graph structure, clocks, ports, and edge policies as an HTML artifact.
StepDebug in one process with normal Python breakpoints before launching backends.
ReplayTurn robot runs into repeatable evidence instead of relying on timing luck.

Retriever validates both authored pipelines and IR loaded from JSON. IR.from_json(...) rejects duplicate node ids, dangling edge or adjacency references, and unknown ports before a backend tries to execute the graph. That keeps graph artifacts useful for debugging, replay, and Hub-loaded modules without deferring structural errors to a later runtime process.