LegoFlow

Introduction

What is LegoFlow?

LegoFlow is an easy and interactive framework for code data engineering. It helps users curate coding tasks, roll out agent trajectories, convert data for training, evaluate checkpoints, and inspect the whole process through live dashboards.

The project starts from software-engineering data, where the loop is especially hard to run cleanly: useful GitHub changes have to become verifiable tasks, agents need to run in isolated environments, successful trajectories need to be filtered and converted, and checkpoints have to be trained and evaluated under traceable conditions. LegoFlow turns that loop into a guided workflow operated through coding-agent plugin skills.

Highlights

  • Agent-native Workflows: LegoFlow turns repo and PR collection, task verification, trajectory rollout, and the training-evaluation loop into prepared plugin skills. Users can drive real data production through a coding agent instead of stitching scripts together by hand.

  • Wide coverage: LegoFlow covers 8+ programming languages and 20+ task tags, with trajectory rollouts across Claude Code, OpenCode, OpenHands, and Terminus scaffolds.

  • Block-based extensibility: LegoFlow is built around blocks, the runnable units that manage repositories, scripts, configuration, artifacts, dashboards, and handoffs for one stage of the workflow.

  • Live analytics dashboards: Each major stage ships with a dashboard. The dashboards use carefully designed rubrics to track task difficulty, trajectory quality, training progress, and model performance.

  • Self-evolving loop: An agent has run the full loop, diagnosed why a first fine-tune plateaued, changed the selection rule, and lifted Qwen3.5-35B-A3B-Base from 7.6% to 64.4% on SWE-bench Verified. See the end-to-end run.

System Design

LegoFlow pipeline introduction

The overall data pipeline is organized as a tree of blocks. A block is a contract for agentic workflows and one runnable unit in the pipeline. Each block owns its config, scripts, plugin skills, artifacts, dashboard, and pinned repository dependencies. The root block orchestrates four child blocks:

  • Curator: curates high-quality SWE and coding tasks from GitHub PRs, issues, and online forums.
  • Tracer: collects high-quality trajectories with verified rewards, supporting rollouts across multiple coding scaffolds such as Claude Code, OpenCode, OpenHands, and Terminus.
  • Trainer: converts rollout traces into training-ready formats and launches end-to-end training workflows.
  • Evaluator: measures checkpoints on coding benchmarks, with rubric- and tag-level analysis.

Why Blocks?

Blocks make the pipeline easier to use and easier to change. Because every stage follows the same contract, users can operate the whole system through plugin skills, restart a failed stage from its archived state, swap one block without breaking the others, and inspect artifacts through consistent dashboards. This keeps the workflow approachable for general users while leaving room for advanced analysis and new agent-data domains. See What is a Block for the exact block anatomy and how the diagram maps onto the repository structure.

Start by Use Case

I want to...Go to
Understand why this exists at allMotivation
Install it and run somethingGetting Started
Build verified SWE tasks from GitHubCurator
Collect agent trajectories on tasks I already haveTracer
Fine-tune a model on trajectoriesTrainer
Benchmark a model or a checkpointEvaluator
Add a block of my ownAdding New Blocks

On this page