Skip to content

armnet-runtime

armnet-runtime is installed inside your runtime containers. It provides:

  • the @main decorator
  • the Context object passed to runtime functions
  • ctx.cell helpers such as reset
  • ctx.volume for the mounted user volume
  • the armnet-runtime container entrypoint
  • guarded LeRobot/robot import replacement for remote cell execution

Runtime programs usually look like:

from armnet_runtime import Context, main


@main
def run(ctx: Context) -> dict:
    ctx.report_progress("hello")
    return {"ok": True}

The @main decorator marks the function the platform should run. Your Dockerfile should call:

CMD ["armnet-runtime", "/app/main.py"]

The runtime entrypoint imports your file, finds the decorated function, builds a Context, and calls the function.

Connecting to Robots

Use ctx.cell.robot_port and other ctx.cell fields when constructing robot configs. In a managed cell this value may be a connector endpoint rather than a physical serial or network interface; the runtime import replacement routes hardware calls through the managed cell.

See Context for the full object reference.