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 evolving to focus on the Retriever core/runtime:
- Author pipelines as a typed graph (
Pipeline/FlowContext) - 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, integrations (robots/sim), and heavy model stacks will live in a separate Golden Retriever (reference system) repository as part of an ongoing split.
Canonical Runtime Workflow
Unified API (Recommended): retriever.connect(...) → retriever.run(...) (Implicitly handles validation/IR).
Low-Level API: Pipeline (or FlowContext) → validate() → IRStruct → (optional) build_execution() → execute_ir()
Minimal example (Typed Flows + Unified DSL):
from dataclasses import dataclass
from retriever.flow import Flow, flow_io
import retriever
@flow_io
@dataclass
class SrcOut:
value: int
@flow_io
@dataclass
class AddOut:
value: int
class Source(Flow[None, SrcOut]):
def run(self, _): # type: ignore[override]
return SrcOut(value=1)
class AddOne(Flow[SrcOut, AddOut]):
def run(self, input: SrcOut) -> AddOut:
return AddOut(value=input.value + 1)
# 1. Instantiate & Clock
src = Source() @ retriever.Rate(hz=10)
add = AddOne() @ retriever.Rate(hz=10)
# 2. Connect (Unified DSL)
retriever.connect(src, add)
# 3. Debug (Sync, In-Process)
retriever.step(dt=0.1)
# 4. Run (Async)
retriever.run(backend="multiprocessing", duration=1.0)
Note: For standard libraries (PyTorch, Gym), you can use the retriever.lib.Wrapper factory (see handbook).
More details: docs/handbook.md
Setup (overview)
Use Python 3.10–3.12 (avoid 3.14; some deps lack wheels).
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.
Golden/system split prep:
- Runtime/core manifests:
pyproject.toml,pixi.toml - Golden/system templates (to be moved to a separate repo):
pyproject-golden.toml,pixi-golden.toml
Development
- Development workflow, pre-commit hooks, and QA steps:
docs/contributing.md
Documentation
Docs live in docs/:
- Runtime handbook (canonical):
docs/handbook.md - Architecture:
docs/architecture.md - Tutorials:
docs/tutorials/index.md - Install:
docs/getting_started/install.md - Advanced Examples:
examples/advanced/- Skill Switching: Dynamic behavior switching pattern with Fan-in support (
examples/advanced/skill_switching/) - Native Controller: Rust/C++ native extension bindings (
examples/advanced/native_controller/) - TWIST2 Simulation: MuJoCo humanoid robot at 1000Hz physics + 50Hz policy (
examples/advanced/twist2_simulation/)
- Skill Switching: Dynamic behavior switching pattern with Fan-in support (
Roadmap
Recent features:
- Main Thread Flow (
@gui_flow): Run flows in main thread for native GUI support (MuJoCo viewers, Qt, etc.)- See:
examples/advanced/twist2_simulation/for usage example
- See:
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.1-py3-none-any.whl.
File metadata
- Download URL: debug_retriever-0.1.1-py3-none-any.whl
- Upload date:
- Size: 396.1 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 |
8512b43be4def73a6b9b07dd677f96d9465ffbb1a928f62560eb9cae8a9af8be
|
|
| MD5 |
806e493136c2674a066570ff031b7d27
|
|
| BLAKE2b-256 |
38dbc421e7279c5527bb46787f0b8a8d0551515f39d8aee475759afc367766e2
|