Skip to main content

A Python programming model and runtime for closed-loop robot agents whose perception, planning, and control run at different rates.

Project description

Retriever logo


Retriever

Programming Closed-Loop Modular Robot Agents

A Python programming model and runtime for robot agents whose perception, planning, and control run at different rates. You write down how often each part runs and how it handles data that arrives out of sync, so the timing lives in the graph instead of in hand-written glue code — and recorded input traces can be replayed through the same graph.

Docs Website Discord
GoldenRetriever examples Hub packs License


Robot systems rarely run as one neat synchronous loop: cameras, estimators, planners, VLMs, VLAs, and controllers all update at different rates. Retriever lets you declare how often each Flow runs and how each edge samples data — so the timing lives in the graph, not in glue code. Step the graph in-process to debug it, then run the same graph on a backend; record the consumed input trace when you need an exact replay.

See it run

One line, on any laptop with a webcam:

pip install "retriever-core[demo]" rerun-sdk
retriever demo webcam --visualize rerun

This pulls the openretriever/webcam-demo Hub pack (no clone) and drives a live Camera → ColorDetector → Rerun closed loop with bounding-box overlays. Full walkthrough: retriever.build.

Install

python -m pip install retriever-core     # runtime + `retriever` CLI; imports as `retriever`

Python 3.11+. For the bundled demos, renderers, and tests, use a source checkout: git clone https://github.com/openretriever/retriever && cd retriever && retriever install.

Quickstart

from retriever import Flow, Latest, Pipeline, Rate, Trigger, 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, _):
        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")
with pipe:
    source = Source() @ Rate(hz=2)          # runs at 2 Hz
    double = Double() @ Trigger("value")    # wakes on each Number
    source.then(double, sync=Latest())      # edge samples the latest value

pipe.run(backend="multiprocessing", duration=1.0)   # deploy
# result = pipe.step(dt=0.1)                         # ...or step in-process to debug + replay

@io typed message · Flow[I, O] node logic · flow @ clock when it runs · .then(…, sync=…) how the edge samples · pipe.run() to deploy, pipe.step() to debug and replay.

Learn more

Guide What's there
Docs home install, visual quickstart, tutorials
Concepts Flow, clocks, sync policies, IR, record/replay
Retriever Hub load packs by name from any repo — no clone
GoldenRetriever applied robot examples: perception, memory, language, sim
Discord questions, help, and community
In-process stepping, record & replay

Retriever has two execution modes on purpose. Backend execution is for realistic scheduling and deployment; in-process stepping is for debugging logic, replaying incidents, and making timing bugs inspectable with normal Python tools.

# Backend execution — realistic scheduling, process boundaries, deployment
pipe.run(backend="multiprocessing", duration=3.0)
pipe.run(backend="dora", duration=3.0)

# In-process debugging — step the graph, inspect, checkpoint, replay
result = pipe.step(dt=0.1)
print(result.executed)
pipe.close_stepper()

Given the same ordered timestamped input history — including a fixed order for equal timestamps — deterministic Flows produce the same discrete-event output trace. Live backend timing decides which history is captured; replay drives the graph from that captured history. See Runtime for the precise contract and Debug and Visualize for the workflow.

Ecosystem boundary
  • Core runtime — this repo, published as retriever-core, imported as retriever. Stays focused on the runtime.
  • GoldenRetriever — the applied examples + Hub-pack layer (robot payloads, simulator/visualization lanes). Built on the runtime, not a second one.
  • Retriever Hub — the manifest + index protocol that turns any repo into a loadable pack of Flows, types, and pipelines.
  • openretriever.org — the project home.
Contributing & development

Contributor tasks run through the same retriever command from a source checkout:

retriever install                     # set up the environment
retriever run test                    # full test suite
retriever run p0-release-readiness
retriever run public-surface-check    # external launch check

The source checkout uses Pixi as its environment/task backend, and retriever run <task> wraps it. main is canonical — a fresh clone and ordinary git pull fast-forward. See docs/contributing.md.

Community & license

Questions and help: Discord. Licensed under Apache-2.0 — see LICENSE and THIRD_PARTY_NOTICES.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retriever_core-0.0.3.tar.gz (420.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

retriever_core-0.0.3-py3-none-any.whl (475.8 kB view details)

Uploaded Python 3

File details

Details for the file retriever_core-0.0.3.tar.gz.

File metadata

  • Download URL: retriever_core-0.0.3.tar.gz
  • Upload date:
  • Size: 420.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for retriever_core-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1211dd67912a405028494655d791275c69f5f17cf83c32e67a3dca1945e429d7
MD5 e17979db0cf2acca29ddb33ca55cedef
BLAKE2b-256 66cecea22be268801e36c05e4fb2cb5552181d7c2057407ae997ed5779288537

See more details on using hashes here.

File details

Details for the file retriever_core-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: retriever_core-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 475.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for retriever_core-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6c64115679a9fc994fe71dd43e4f4451e5c36672b1b49deb7d84f301a6291792
MD5 599426e41e111391e185f69a992eca27
BLAKE2b-256 1f9a13372cb4f427d0e66840a0be2b1ce11be6c3efd183aee023db042b25a78e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page