Project Page | Paper | Real-Robot Quick Start | Simulation
Recursia improves a shared executable Python stack from source-task feedback, then reuses the frozen stack on new task compositions. Improvements persist as programs rather than model-weight updates.
This repository provides experiments on a Franka FR3 with a Franka
Hand, including a Skill Document Only (SD-only) baseline, and simulation
experiments under recursia/sim/: RSI on LIBERO-90 and zero-shot evaluation on
LIBERO-Long-Pro with rule-based, one-shot and closed-loop inference.
Create the environment for the Franka FR3 workspace:
git clone https://github.com/cocacola-lab/Recursia.git
cd Recursia/recursia/real
conda env create -f environment.yml
conda activate recursiaFollow the real-robot setup guide to configure your station and install/start SAM3 and Contact-GraspNet. Once ready, run the first source chunk:
python run_agent.py rsi init --campaign logs/my_campaign
OPENFORGE_ALLOW_PHYSICAL_MOTION=1 python run_agent.py rsi source \
--campaign logs/my_campaign --method recursia --chunk 1 \
--config config/rsi_fr3_station.local.yamlSee Run for the remaining chunks, SD-only baseline, and target evaluation.
Reproduce the small interim LIBERO-Long-Pro evaluation (100 episodes) of the frozen N20 shared stack with closed-loop inference (reference: 35/100). Clone the repository, export your key, and give Claude Code one sentence:
git clone https://github.com/cocacola-lab/Recursia.git && cd Recursia/recursia/sim
export ANTHROPIC_API_KEY=... # used only by the local model proxy
claude "Set up the simulation and run the N20C interim Long-Pro evaluation, then report the success rate."Claude Code follows recursia/sim/CLAUDE.md:
- fetches the pinned simulators and models, builds the environments and runs the tests;
- starts the perception servers and the evaluation;
- reports the result from
results/REPORT_auto.md.
You need Linux with NVIDIA GPUs, uv, and access to the gated SAM3 weights. The run takes about 2.5 h on 5 GPUs and costs about $15–20.
Manual commands
cd Recursia/recursia/sim
bash scripts/fetch_third_party.sh
uv venv .venv-libero --python 3.12 && source .venv-libero/bin/activate
uv sync --locked --active --extra libero --extra contactgraspnet --extra dev && deactivate
bash scripts/write_libero_config.sh
uv venv .venv-vlmproxy --python 3.12 && uv pip install --python .venv-vlmproxy/bin/python3 "anthropic>=1.11"
.venv-libero/bin/hf auth login
tmux new -d -s recursia-perception "bash scripts/start_perception_servers.sh --gpu-sam3 0 --gpu-graspnet 1; sleep infinity"
GPUS="3 4 5 6 7" bash rsi/evaluation/harness/quickstart.sh closed interimLLM and grasp sampling are not seed-controlled, so expect roughly 35–42.
The same tool runs the other two inference methods: quickstart.sh rule (the stack's own rule-based driver) and quickstart.sh oneshot. recursia/sim/README.md covers the full setup, all three evaluation methods, and new RSI debugging runs.
Selected successful Recursia target executions on Franka FR3. Videos play at original speed and concatenate recorded action segments; unrecorded perception and model-wait intervals are omitted. Click a preview to open the full MP4. Animated previews below run at 4x speed.
| Task | Composition | Video |
|---|---|---|
| T1: Shared basket | Place both the mug and the carton of milk in the basket. | ![]() Watch T1 |
| T2: Reassigned plates | Place the blue mug on the left plate and the white mug on the right plate. | ![]() Watch T2 |
| T3: Bowl--mug dependency | First place the bowl on the plate, then place the mug in the relocated bowl. | ![]() Watch T3 |
Recursia/
├── recursia/
│ ├── real/ # Physical RSI runner, tools, configs and tests
│ │ ├── cap/
│ │ ├── config/
│ │ ├── patches/
│ │ ├── robot/
│ │ ├── tools/
│ │ ├── environment.yml
│ │ ├── pyproject.toml
│ │ └── run_agent.py
│ └── sim/ # Simulation: LIBERO runtime (cap/), RSI debugging and evaluation (rsi/), scripts, tests
├── assets/media/ # Selected target demonstration videos
├── LICENSES/
├── LICENSE
├── NOTICE
└── README.md
Logs, raw experiment recordings, model checkpoints, local station configurations, papers, and independent experiment protocol documents are excluded from this repository. Runtime prompt code required by the agents is included.
See CONTRIBUTING.md. Run the offline tests from recursia/real/ when
changing the physical runner, and .venv-libero/bin/python3 -m pytest -q from recursia/sim/ when changing the simulation
workspace. Keep simulation dependencies and coordinates
separate from real-robot configuration.
For questions about Recursia, please contact wjhan@bjtu.edu.cn or chenyangzhi@bjtu.edu.cn.
Inherited ASPIRE copyright notices are retained. Project material is available under the Apache License 2.0, subject to component-specific terms. See NOTICE and the license inventory.
If you find Recursia useful in your research, please cite:
@misc{chen2026learningcomposerecursiveselfimprovement,
title = {Learning to Compose: Recursive Self-Improvement of Shared Executable Stacks for Zero-Shot Long-Horizon Robot Manipulation},
author = {Yangzhi Chen and Feiran Liu and Zishuo Wang and Zijian Jin and Xin Zhu and Lecheng Ruan and Wenjuan Han},
year = {2026},
eprint = {2610.24464},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
url = {https://arxiv.org/abs/2610.24464}
}

