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 any run can be recorded and replayed exactly.

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 same graph in-process to debug, or run it on a backend to deploy; every run records and replays exactly.

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()

The same timestamped input trace yields the same output trace regardless of backend — that determinism is what makes local stepping, record, and replay well-defined. See Debug and Visualize.

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.2.tar.gz (420.0 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.2-py3-none-any.whl (475.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for retriever_core-0.0.2.tar.gz
Algorithm Hash digest
SHA256 508b48af16c89156db38c9558fc142f957ceefd7f300dad5b48dfcd54e7cb702
MD5 78100b9fa2cd1d20ad4430b79c2b0ddb
BLAKE2b-256 26fbff9911995277b4e3755d782ac6f3af97716ce09074c4d85689a44e7d843b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for retriever_core-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4fb16649e64aa44c49cab331fef6076f5e275d5a9f4a757907ce0c5f9b3e7a79
MD5 18de61866036ec87e211a0c1caf4fa4e
BLAKE2b-256 2cd952af9e5a05fa3ddd562b28e2ae7f9cd9056c8eb9b1ca65edff1b0f50c54d

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