agentleFS
Hugging FaceKnown publisherhuggingface/lerobot/AGENTS.md

lerobot

AGENTS.md28k starsChanged 2 months agoApache-2.0View on GitHub

User-facing help → AGENT_GUIDE.md (SO-101 setup, recording, picking a policy, training duration, eval — with copy-pasteable commands). LeRobot is a PyTorch-based library for real-world robotics, providing datasets, pretrained policies, and tools for training, evaluation, data collection, and robot control. It integrates with Hugging Face Hub for model/dataset sharing. Python 3.12+ · PyTorch · Hugging Face (datasets, Hub, accelerate) · draccus (config/CLI) · Gymnasium (envs) · uv (package management)

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about huggingface/lerobot

The biggest 5 of 75 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 75

Talked about on GitHub, Bluesky and Hacker News (75 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 22

17 more on Bluesky
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Imports: prefer top-level imports; relative (from .sibling import X) across sibling files within a module, absolute (from lerobot.module …

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

This file provides guidance to AI agents when working with code in this repository.

User-facing help → AGENT_GUIDE.md (SO-101 setup, recording, picking a policy, training duration, eval — with copy-pasteable commands).

Project Overview

LeRobot is a PyTorch-based library for real-world robotics, providing datasets, pretrained policies, and tools for training, evaluation, data collection, and robot control. It integrates with Hugging Face Hub for model/dataset sharing.

Tech Stack

Python 3.12+ · PyTorch · Hugging Face (datasets, Hub, accelerate) · draccus (config/CLI) · Gymnasium (envs) · uv (package management)

Development Setup

uv sync --locked                            # Base dependencies
uv sync --locked --extra test --extra dev   # Test + dev tools
uv sync --locked --extra all                # Everything
git lfs install && git lfs pull             # Test artifacts

Key Commands

uv run pytest tests -svv --maxfail=10                 # All tests
DEVICE=cuda make test-end-to-end                      # All E2E tests
pre-commit run --all-files                           # Lint + format (ruff, typos, bandit, etc.)

Architecture (src/lerobot/)

  • scripts/ — CLI entry points (lerobot-train, lerobot-eval, lerobot-record, etc.), mapped in pyproject.toml [project.scripts].
  • configs/ — Dataclass configs parsed by draccus. train.py has TrainPipelineConfig (top-level). policies.py has PreTrainedConfig base. Polymorphism via draccus.ChoiceRegistry with @register_subclass("name") decorators.
  • policies/ — Each policy in its own subdir. All inherit PreTrainedPolicy (nn.Module + HubMixin) from pretrained.py. Factory with lazy imports in factory.py.
  • processor/ — Data transformation pipeline. ProcessorStep base with registry. DataProcessorPipeline / PolicyProcessorPipeline chain steps.
  • datasets/ — LeRobotDataset (episode-aware sampling + video decoding) and LeRobotDatasetMetadata.
  • envs/ — EnvConfig base in configs.py, factory in factory.py. Each env subclass defines gym_kwargs and create_envs().
  • robots/, motors/, cameras/, teleoperators/ — Hardware abstraction layers.
  • types.py and configs/types.py — Core type aliases and feature type definitions.

Repository Structure (outside src/)

  • tests/ — Pytest suite organized by module. Fixtures in tests/fixtures/, mocks in tests/mocks/. Hardware tests use skip decorators from tests/utils.py. E2E tests via Makefile write to tests/outputs/.
  • .github/workflows/ — CI: quality.yml (pre-commit), fast_tests.yml (base deps, every PR), full_tests.yml (all extras + E2E + GPU, post-approval), latest_deps_tests.yml (daily lockfile upgrade), security.yml (TruffleHog), release.yml (PyPI publish on tags).
  • docs/source/ — HF documentation (.mdx files). Per-policy READMEs, hardware guides, tutorials. Built separately via docs-requirements.txt and CI workflows.
  • examples/ — End-user tutorials and scripts organized by use case (dataset creation, training, hardware setup).
  • docker/ — Dockerfiles for user (Dockerfile.user) and CI (Dockerfile.internal).
  • benchmarks/ — Performance benchmarking scripts.
  • Root files: pyproject.toml (single source of truth for deps, build, tool config), Makefile (E2E test targets), uv.lock, CONTRIBUTING.md & README.md (general information).

Notes

  • Mypy: one ruleset ([tool.mypy] in pyproject.toml) checks the paths in its files setting, except lerobot.rl, the vendored molmoact2_hf_model and the generated *_pb2 modules. Run it with pre-commit run mypy --all-files. Add type annotations when modifying code.
  • Imports: prefer top-level imports; relative (from .sibling import X) across sibling files within a module, absolute (from lerobot.module import X) across modules.
  • Optional dependencies: many policies, envs, and robots are behind extras (e.g., lerobot[aloha], see pyproject.toml). Guard optional imports with TYPE_CHECKING or _foo_available at module top + a require_package(...) check at use time. Reuse the _foo_available flags in utils/import_utils.py; don't call is_package_available.
  • Video decoding: datasets can store observations as video files. LeRobotDataset handles frame extraction, but tests need ffmpeg installed.
  • Prioritize use of uv run to execute Python commands (not raw python or pip).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.