Retriever: Building Modular Robot Agents with Causal Functional Composition
Project description
🐕 Retriever
Building Modular Closed-loop Robot Agents with Causal Functional Composition
This repository is the Retriever core/runtime package:
- Author pipelines as a typed graph (
Pipeline) - Verify/compile to a backend-agnostic IR (done automatically at runtime)
- Execute on a backend (
Pipeline.run(...)): local multiprocessing or dora-rs - Debug step-by-step in-process (
Pipeline.step(...))
System-level pipelines, robot/simulator integrations, and heavier model stacks belong in the companion GoldenRetriever repository or other external packages.
Canonical Runtime Workflow
Critical ideas:
@iodefines typed message envelopes.Flow[I, O]defines node logic.flow @ clockdecides when a node runs.Pipeline.connect(..., sync=...)wires nodes and declares sampling behavior.pipe.run(...)is for backend execution;pipe.step(...)is for in-process debugging.
Minimal example:
from retriever.flow import Flow, Pipeline, Rate, Trigger, Latest, io
@io
class Number:
value: int
@io
class Doubled:
value: int
class Source(Flow[None, Number]):
def __init__(self) -> None:
super().__init__()
self.count = 0
def step(self, _): # type: ignore[override]
self.count += 1
return Number(value=self.count)
class Double(Flow[Number, Doubled]):
def step(self, input: Number) -> Doubled:
return Doubled(value=input.value * 2)
pipe = Pipeline("quickstart")
source = Source() @ Rate(hz=2)
double = Double() @ Trigger("value")
pipe.connect(source, double, sync=Latest())
pipe.run(backend="multiprocessing", duration=1.0)
Debugging:
result = pipe.step(dt=0.5)
print(result.executed)
pipe.close_stepper()
Short docs path:
- Quickstart:
docs/quickstart.md - Handbook:
docs/handbook.md - Runtime guide:
docs/guide_runtime.md
Setup (overview)
Use Python 3.11 for the pinned runtime environment in this repo.
Quick start with Pixi:
curl -fsSL https://pixi.sh/install.sh | bash
pixi run demo-webcam-detection
pixi.lock is multi-platform (osx-arm64, linux-64). Commit it for reproducible installs; other platforms can re-lock after adding the platform to pixi.toml and running pixi install.
Pixi manages its own env. If you prefer uv/pip, use a separate conda/venv to avoid mixing managers. Pixi installs the PyPI portion using uv internally; you usually don't need to run uv yourself when using Pixi.
Full installation (Pixi/conda/uv), dora CLI notes, and troubleshooting: docs/getting_started/install.md.
Runtime/core manifests in this repo:
pyproject.tomlpixi.toml
Development
- Development workflow, pre-commit hooks, and QA steps:
docs/contributing.md
Documentation
Docs live in docs/:
- Runtime handbook (canonical):
docs/handbook.md - Quickstart:
docs/quickstart.md - Architecture:
docs/architecture.md - Tutorials:
docs/tutorials/index.md - Install:
docs/getting_started/install.md - Runnable examples:
examples/tutorial/andexamples/control_demo.py
Roadmap
Recent features:
- Main Thread Flow (
@gui_flow): Run flows in main thread for native GUI support (MuJoCo viewers, Qt, etc.)- Public examples in this repo currently focus on the tutorial/runtime surface.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file debug_retriever-0.1.4-py3-none-any.whl.
File metadata
- Download URL: debug_retriever-0.1.4-py3-none-any.whl
- Upload date:
- Size: 462.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dc1f0fdd51b7e0af039e957fc6fc78b0398dd20caeb858100d8b56808f2d77b
|
|
| MD5 |
3d96c558cae0d182dfdf07b1c5239576
|
|
| BLAKE2b-256 |
c3f6230dd02c83eb6ff5d6bd38dc242cb7b4e3f972b8ca4722aef9264c57d10d
|