LeAgents — agentic orchestration for the LeRobot pipeline: collect -> train -> eval -> improve
Project description
LeAgents
Agentic orchestration for the LeRobot robotics pipeline — an orchestrator drives an automated collect → train → eval → improve loop over LeRobotDataset v3.0, with a deterministic loop controller, a constitution safety gate, verification gates before promotion, and (M2) a dashboard for visualizing the flow.
Architecture, research grounding (verified 2023–2026 papers), and roadmap: DESIGN.md.
Status — v0.0.4
| Milestone | Scope | Status |
|---|---|---|
| M0 | Sim-only loop on LIBERO: seed dataset → SmolVLA fine-tune → lerobot-eval gate → promote/iterate/escalate/rollback |
✅ pipeline verified end-to-end on a real GPU (PushT + LIBERO smoke configs); full-scale training run pending |
| M1 | DexFlyWheel-style self-improvement, RoboGene-style task curation, policy escalation, OKF knowledge layer (Karpathy-wiki-style, DESIGN.md §3.6) + provider-agnostic LLM proposer | 🚧 knowledge layer + LLM adapter landed |
| M2 | Flow dashboard (Rerun episode replay, WandB curves, OTel agent traces) | 🚧 flow view v1 landed: runs → cycles → decisions live, eval chart, event log, knowledge browser (leagents dash) |
| M3 | Real robot: teleop collection, HIL-SERL adapter (requires lerobot ≥ 0.6.0, see CVE note in DESIGN.md §6) | planned |
What works today: the full loop state machine with budgets, the constitution gate, SQLite job store, JSONL event log, subprocess wrappers for lerobot-train / lerobot-eval, the OKF knowledge layer (knowledge/ pages with provenance, updated every cycle, linted), the DexFlyWheel data path (success-filtered rollout harvesting → accumulated mix → adaptation training), and a provider-agnostic LLM adapter (llm: anthropic:*|openai:*[@base_url], or none at all — every flow has a deterministic fallback). All covered by tests that run without a GPU or lerobot installed.
First full-scale autonomous run (2026-07-04)
One M0 run on a single RTX 5070 Ti (16 GB), fully autonomous — 3 cycles, 6.1 GPU-hours, zero human intervention, every decision/event/knowledge-page update logged:
| Cycle | Data | Train | LIBERO spatial eval (100 episodes) | Decision |
|---|---|---|---|---|
| 0 | 40 episodes | 20k steps from smolvla_base (loss → 0.030) |
0% success — arm reaches targets, never completes | promote (baseline) |
| 1 | 80 | 20k steps, continued from the blessed checkpoint | 0% | iterate |
| 2 | 160 | 20k steps | 0% | iterate — the escalate_floor guard correctly refused to escalate a 0%-plateau to a bigger policy |
The 0% success is the expected outcome of the data budget, not a pipeline failure: 4→16 episodes per task versus the ~50-per-variation guidance the design research verified for SmolVLA. This run validates the loop — budgets held, weights carried over, and the decision function behaved exactly as specified. The next run scales the data schedule to 200→500 episodes (20→50 per task).
Quickstart
pip install -e ".[dev]"
pytest
# dry run — no GPU, no lerobot; synthetic eval scores exercise the decision logic
leagents run -c configs/m0_libero.yaml --dry-run
# real run (Linux; needs a GPU and the LIBERO extras)
pip install -e ".[lerobot]"
leagents run -c configs/m0_libero.yaml
# inspect runs, cycles, decisions, blessed checkpoints
leagents status
# flow dashboard — runs, cycle pipeline, decisions, eval chart, events, knowledge
pip install -e ".[dash]"
leagents dash # → http://127.0.0.1:8321
How the loop decides
Each cycle trains a candidate checkpoint and evaluates it on LIBERO. The decision is a pure function of success-rate deltas vs. the blessed baseline (leagents/orchestrator/decision.py):
- promote — candidate beats baseline by ≥
promote_delta; it becomes the new blessed checkpoint - iterate — small improvement; collect more data on failing task variations
- escalate — plateaued for
plateau_cycles; move up the policy ladder (SmolVLA → π0.5) - rollback — regression; the blessed checkpoint stands
Control flow is deterministic Python persisted to SQLite — LLM agents (task proposal, curation; M1) only make proposals inside the gates, never control-flow decisions.
Layout
leagents/
├── orchestrator/ # loop controller, decision logic, constitution gate, proposer
├── agents/ # data / train / eval / improve agents (LeRobot CLI wrappers)
├── contracts/ # typed records: DatasetRef, CheckpointRecord, EvalReport
├── events/ # JSONL event bus (dashboard reads this in M2)
└── store/ # SQLite job store (runs, cycles, checkpoints)
configs/ # m0_libero.yaml, constitution.yaml
tests/ # loop e2e with fake runners — no GPU needed
License
Apache-2.0
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 Distribution
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 leagents-0.0.4.tar.gz.
File metadata
- Download URL: leagents-0.0.4.tar.gz
- Upload date:
- Size: 46.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcb7851b753deeb68ee1cfe0ccba53b23e491451e7cdacb9cdbd4ad1debb0f90
|
|
| MD5 |
6428e28cca7973a0143dd63b94c9bd94
|
|
| BLAKE2b-256 |
ea5db01624bce410f3ef4236a7bf6922f1b37bf16f12550c3e303ea175476f69
|
File details
Details for the file leagents-0.0.4-py3-none-any.whl.
File metadata
- Download URL: leagents-0.0.4-py3-none-any.whl
- Upload date:
- Size: 45.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f4c978307bb8496ac7275be53dd31f389b53edd2afce1823c94085c27039f5f
|
|
| MD5 |
e915f5ba581f539b7e8bc3409e0fca3c
|
|
| BLAKE2b-256 |
85e28fabc2349cceb230b42524b3d03edb55cce04d6f02a8a725cbdec4fcef67
|