Video-Coder: Reinforcing Agentic Coding for Video Generation
Organizations: University of Central Florida · University of Würzburg · Microsoft Research · Tsinghua University ·
Abstract
Recent years have witnessed remarkable progress in video generation in terms of visual quality and temporal consistency. However, generating videos with precise spatial structure, coherent motion dynamics, and controllable scene composition remains challenging. In this paper, we introduce Video-Coder, the first attempt to train a code-driven video generation agent, which autonomously writes and executes code to construct a dynamic 3D scene (Draft Video) that provides structure and motion signals to downstream video generators. To support this paradigm, we design a dedicated data pipeline and curate two high-quality datasets, Video-Coder-SFT-6k and Video-Coder-RL-2k, which contain diverse prompts and ground-truth reference videos. We further develop the Video- Coder Harness, a unified interactive environment integrating code execution, 3D scene rendering, and execution feedback for agent training and inference. We then train Video-Coder with SFT fol- lowed by harness-native agentic reinforcement learning with dual reward feedback, which combines execution-based and video-based rewards. Additionally, we design an annealing training strategy that gradually reduces the execution reward over time, allowing the model to rely more on the video reward in the later training stages. Experiments show that Video-Coder achieves significant gains, improving Minimax-H3 by approximately 7 points on PhyGenBench and 24 points on VBench-2.0. We hope this work can serve as an open foundation for coding agents in video generation, and we fully open-source our data, models, and code
Figures & tables
| Method | Mechanics ( ) | Optics ( ) | Thermal ( ) | Material ( ) | Average ( ) |
| Pika Pika Labs (2023) | 0.35 | 0.56 | 0.43 | 0.39 | 0.44 |
| Gen-3 Runway (2024) | 0.45 | 0.57 | 0.49 | 0.51 | 0.51 |
| Kling Kuaishou (2024) | 0.45 | 0.58 | 0.50 | 0.40 | 0.49 |
| CogVideoX Yang and others (2025) | 0.39 | 0.55 | 0.40 | 0.42 | 0.45 |
| Open-Sora V1.2 Zheng and others (2024) | 0.43 | 0.50 | 0.44 | 0.37 | 0.44 |
| LaVie Wang and others (2023) | 0.30 | 0.44 | 0.38 | 0.32 | 0.36 |
| Method | Mechanics ( ) | Thermotics ( ) | Material ( ) | Average ( ) |
| Sora Brooks et al. (2024) | 62.22% | 43.36% | 64.94% | 56.84% |
| Kling 1.6 Kuaishou (2024) | 65.55% | 59.46% | 68.00% | 64.34% |
| HunyuanVideo Kong and others (2024) | 76.09% | 56.52% | 64.37% | 65.66% |
| Minimax-H3 MiniMax (2024) | 67.59% | 47.22% | 48.94% | 54.58% |
| CogVideoX-1.5 Yang and others (2025) | 80.80% | 67.13% | 83.19 % | 77.04% |
| Video-Coder-9B + Minimax-H3 | 88.67 % | 70.88 % | 75.02% | 78.19 % |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Agentic Video Generation
Agentic video generation uses AI agents to plan, create, evaluate, and refine videos through coordinated tools and feedback.
See all 45 papers