MuJoCo Rollout Dataset
Open-source full-stack sample (Next.js 16 + FastAPI) that rolls out reinforcement-learning policies in MuJoCo Playground, renders each episode to video, and streams the video plus per-step state, action and reward arrays and a summary JSON to Backblaze B2 for behavioral-cloning and offline policy analysis.
Built for: Robotics and reinforcement-learning developers, and AI coding agents, who want to generate rollout datasets from MuJoCo Playground and keep the video, trajectory arrays and summaries in their own B2 bucket.

What it's built with
Each piece of the stack, and the job it does in this project.
- Next.js 16 + React 19
- Dashboard, Rollouts, Dataset and Bucket Explorer UI
- Tailwind CSS v4 + shadcn/ui
- Design tokens and reusable interface primitives
- TanStack Query + Recharts
- Client data fetching, caching, and charts
- FastAPI + Pydantic v2
- Typed Python API with a strict layered architecture
- MuJoCo Playground (mujoco + mujoco-mjx + jax) + imageio
- Policy rollout, physics simulation and MP4 rendering engine
- boto3 + Backblaze B2
- S3-compatible object storage for video, arrays and summaries
- pnpm workspaces
- TypeScript and Python monorepo workflow
Core capabilities
What the project does out of the box, before you write any code of your own.
Rollout configuration
Create, edit, list and delete rollout jobs with their environment, episode count, resolution, camera and policy.
Policy rollout and rendering
MuJoCo Playground rolls out a policy, records per-step state, action and reward, and renders each episode to MP4 — running locally on CPU by default.
B2 dataset write
Per episode, the MP4 plus state/action/reward .npy arrays and a summary JSON are streamed to Backblaze B2 through the S3-compatible API.
Dataset explorer
Browse rollouts and episodes, play rendered video inline, and download trajectory arrays via presigned URLs.
Bucket explorer
Browse the full B2 bucket: list, preview, download and delete objects.
Dashboard and observability
Rollout and episode stats, cumulative reward and storage used, plus structured JSON logging, a health B2 connectivity check and a metrics endpoint.
A closer look
More screens from the running project.



Choose it for the right job
MuJoCo Rollout Dataset is a head start for a specific shape of project, not a supported, general-purpose product.
Use it when
- You want to generate reinforcement-learning rollout datasets from MuJoCo Playground and keep the video, trajectory arrays and summaries in your own B2 bucket.
- You need a working full-stack pattern (Next.js + FastAPI + boto3) for any local ML producer that streams large artifacts to object storage.
- You want to browse and play rendered episodes and download per-step arrays through presigned B2 URLs.
- You plan to extend the sample with an AI coding agent and value explicit repository context and architecture boundaries enforced by structural tests.
Choose another path when
- You need a supported product, guaranteed maintenance, or a service-level agreement.
- You expect the rollout engine to run on serverless — MuJoCo Playground is a native JAX/MJX stack, so a hosted deploy configures and browses rollouts while you run the render engine locally or on a self-hosted API.
- You need production authentication, multi-tenancy, or billing to work without further engineering; the deployed API is unauthenticated and bucket-wide.
- You only need generic B2 file browsing without an ML producer — a simpler sample such as the vibe-coding-starter-kit is a better fit.
Project status and support
Report repository defects and feature requests through the GitHub Issues page; this is an unsupported open-source sample with no service-level agreement.