Command Palette
Search for a command to run...
VibeVideoAgent: Closing the Perceptual Loop for Code-Driven Video Generation
VibeVideoAgent: Closing the Perceptual Loop for Code-Driven Video Generation
Xuanyu Zheng Luoyuan Zhang Yancheng Long Haoyang Xu Muxi Diao Yuzhe Chen Kaiyu Jiang Bin Wen Tingting Gao
Abstract
Code-driven video generation asks a coding agent to write and run rendering programs. This gives exact control over typography, data visualizations, synchronized audio, and multi-shot scenes, and it leaves an editable project behind. A program that exits cleanly can still render overlapping labels, a camera aimed away from its subject, broken object interactions, or narration that drifts out of sync, and none of these raise a runtime error. Feeding rendered frames and audio back into the coding session bloats its long-horizon context, while critiquing only the finished full-resolution render turns early design mistakes into costly rewrites. We introduce VibeVideoAgent, a training-free framework that lets coding agents inspect their drafts throughout production. Multimodal perception runs in short-lived contexts kept apart from the coder and returns compact, grounded Findings. Seven primitives operate on a unified multi-clock representation of assets and drafts: they explore media from coarse to fine, verify quoted requirements with evidence from every required modality, compare a draft with a reference or an earlier revision on separate clocks, and measure stream signals locally. A lightweight staged protocol has the agent test its riskiest decision on a minimal preview first. On all 239 VibeVideoBench tasks, with matched agent runtimes and a fixed perception model, VibeVideoAgent improves holistic audiovisual quality (L3) for Claude Opus 5.5 (4.03 → 4.43, while L2 rubric compliance rises from 98.87% to 99.35%), GPT-6 Astra (4.03 → 4.27), and Claude Sonnet 5.5 (3.97 → 4.10), with the largest gains in audio–visual synchronization (up to +0.56). Controlled ablations show that each component contributes, and trajectory audits show that the granularity of code edits governs the trade-of between rubric adherence and perceptual quality.
One-sentence Summary
Researchers at KlingAI Research propose VibeVideoAgent, a training-free framework that closes the perceptual loop for code-driven video generation by letting agents inspect drafts throughout production with short-lived multimodal perception, compact, grounded Findings, seven primitives, and a staged minimal-preview protocol, improving holistic audiovisual quality (L3) on all 239 VibeVideoBench tasks for Claude Opus 5.5, GPT-6 Astra, and Claude Sonnet 5.5.
Key Contributions
- VibeVideoAgent is a training-free framework that lets coding agents inspect their drafts during production by running multimodal perception in short-lived contexts separate from the coder and returning compact, grounded Findings, so rendered media do not bloat the coding context.
- The framework provides a unified multi-clock representation of assets and drafts plus seven primitives for coarse-to-fine exploration, modality-gated verification of quoted requirements, reference-to-draft and cross-revision comparison on separate clocks, and local stream-signal measurement, together with a staged protocol that tests the riskiest decision on a minimal preview first.
- On all 239 VibeVideoBench tasks with matched agent runtimes and a fixed perception model, VibeVideoAgent improves holistic audiovisual quality (L3) for Claude Opus 5.5 from 4.03 to 4.43, GPT-6 Astra from 4.03 to 4.27, and Claude Sonnet 5.5 from 3.97 to 4.10, with audio-visual synchronization gains up to +0.56. Controlled ablations show each component contributes, and trajectory audits link code-edit granularity to the trade-off between rubric adherence and perceptual quality.
Introduction
Code-driven video generation treats video creation as programming: a coding agent writes and runs rendering software from a natural-language brief and raw assets, producing both a playable video and an editable source project. This matters because pixel-space video generators produce compelling motion but offer little control over exact typography, faithful charts, multi-shot continuity, precise audio-visual synchronization, or fine-grained edits. The main challenge is that coding agents often succeed at writing code yet fail at authoring video, since a valid render does not reveal viewer-facing defects, feeding raw media back to the agent pollutes long-horizon context, and end-of-pipeline review arrives too late to catch regressions across edits. The authors introduce VibeVideoAgent, a training-free framework that gives coding agents perceptual feedback during production without placing raw media in the coding context, using a unified multi-clock draft representation and seven primitives for exploration, requirement verification, media comparison, and local signal probes.
Method
The authors introduce VibeVideoAgent, a framework that enables a general-purpose coding agent to evaluate its own video drafts without modifying model weights or binding to a specific rendering library. The core innovation lies in a decoupled perceptual loop that prevents raw media tokens from inflating the agent's reasoning context.
As shown in the figure below:
In a traditional coupled multimodal loop, inspecting media appends massive amounts of raw visual and audio tokens to the context, which degrades performance over long-horizon programming tasks. To circumvent this, the authors employ a decoupled approach where raw media never enters the main context Ct. Instead, each perceptual query is routed to a stateless worker Φ or a local deterministic analyzer Ψ within an isolated, short-lived context. These modules return a compact, structured Finding ft:
ft=Φ(E(Mt,σt),qt)where E(Mt,σt) extracts a bounded excerpt under a sampling specification σt, and qt is a focused query. The resulting Finding contains a typed verdict, a summary, and localized evidence, keeping the primary context small and focused on code.
To handle production media that exist at various stages of completion and run on different clocks, the system utilizes a Unified Multi-Clock Draft Representation. A single Media specification σ reconciles three coordinate systems: the source clock, the excerpt clock, and the film timeline. This specification enforces several invariants, including crop-before-scale magnification to preserve fine details, adaptive sampling and modality routing, and immutable snapshots with provenance caching via SHA-256 hashing.
The framework provides seven stack-agnostic perception and verification primitives, organized around four core production questions. For exploration, tools like describe_media and locate_event perform coarse-to-fine sampling. For verification, check_requirement tests explicit observable claims against the draft. A deterministic post-validator maps the model's raw response to a final verdict vfinal:
vfinal={uncertainv^if V=∅ or Mreq⊆μ(V),otherwise,ensuring that the required modalities are actually cited in the evidence. For comparison, compare_media aligns two excerpts on separate clocks to check reference matching or verify repairs. Finally, probe_media runs locally using ffprobe and ffmpeg to detect signal-level issues like corrupt packets, loudness deviations, or dead air without making any API calls.
To orchestrate these tools, the authors design a lightweight Staged Production Protocol guided by a local planning ledger. The process begins with a plan gate where the agent records a structured plan, separating user requirements from creative choices and identifying the highest-risk requirement. The workflow then progresses through minimal preview, rough-cut assembly, targeted repair, and verified delivery. In the targeted repair stage, an uncertain verdict prompts the agent to refine the inspection parameters rather than guessing an edit, while a failed verdict directs the agent to patch the specific issue and re-render the affected slice. This structured pipeline ensures that the agent systematically validates cross-modal timing and signal compliance before final submission.
Experiment
The experiments evaluate VibeVideoAgent on VibeVideoBench, a 239-task benchmark across diverse production categories, where coding agents must generate rendering software and MP4 outputs under controlled single-variable comparisons against native CLI baselines. Results show that the agent improves all tested coding models, with the largest gains in temporal and cross-modal quality such as audio-video sync, timing, and motion, and the benefits hold across both judges and CLI runtimes. Component ablations indicate that the full system performs best, while removing requirement checking, media comparison, media probing, or the staged protocol degrades distinct aspects of compliance, coherence, playability, and repair reliability. The perception layer also decouples rich media context into compact findings, reducing coding-session costs while improving rubric outcomes.
Adding VibeVideoAgent improves the dual-judge L3 mean for every coding model, with the largest gains in temporal and cross-modal dimensions, especially audio-visual quality. The improvements are consistent across both judges, not only the judge tied to the perception model. Native agents often produce valid pipelines but miss narration drift, shot-boundary cuts, or dead air, which modality-gated checks help detect. L3 mean improves for Claude Opus 5.5, GPT-6 Astra, and Claude Sonnet 5.5, with the largest gain for Claude Opus 5.5. Audio-visual quality improves the most for every tested model, followed by temporal and cross-modal alignment. Claude Opus 5.5 reaches the highest L3 mean with VibeVideoAgent, and under the Argon judge its narrative animations hit perfect rubric scores on all relevant tasks. GPT-6 Astra shows the largest L1 rubric gain among the three models and resolves the highest rate of dual-clock rechecks. Claude Sonnet 5.5 improves on L3 dimensions but trades off some L1 specification and L2 rubric score. Gains are not tied to one judge; improvements appear under both Gemini 3.8 Flash and Gemini 4 Argon judges. Native agents often write valid FFmpeg or TTS pipelines but leave narration drift, cut off audio at shot boundaries, or dead air, which check_requirement, transcribe_speech, and probe_media expose.
Telemetry separates the three backbones into distinct repair behaviors: Claude Opus 5.5 is selective with the least coding output, Claude Sonnet 5.5 emits the most coding output but has the lowest dual-clock resolution, and GPT-6 Astra performs extensive perception and repair with the highest preview-gate and dual-clock resolution. Perception is decoupled from the coding session, keeping stored findings far smaller than the sampled media while the preview gate and dual-clock steps track whether failed checks converge through edits. The upfront planning step succeeds across all models. The three backbones show distinct repair styles: Claude Opus 5.5 uses selective, low-output edits; Claude Sonnet 5.5 produces the most coding output but resolves the lowest share of dual-clock rechecks; GPT-6 Astra makes many more worker calls and findings. Perception workers sample large frame and audio volumes outside the coding session, while stored findings remain a small fraction of that media, keeping coding context compact. GPT-6 Astra checks every preview gate, edits the largest share of failed checks, and resolves the highest dual-clock rate. Claude Opus 5.5 has high preview-gate adherence on trajectories with accepted worker findings but much lower adherence across all tasks.
Ablation results on a treatment-blind subset indicate that the full system achieves the highest rubric compliance and overall L3 quality, while each removed primitive creates a distinct weakness. Removing check_requirement mainly lowers coherence and visual alignment, removing compare_media mainly lowers repair and timing quality, and removing probe_media mainly lowers playability. Removing the staged protocol while keeping all primitives also lowers rubric and overall L3 quality, and an Argon L2 comparison indicates that perceptual feedback improves compliance and quality together only when edits stay local. The full system has the highest L2 rubric and L3 mean among the compared variants. Each primitive removal produces a distinct failure pattern: check_requirement affects coherence and visual alignment, compare_media affects visual/temporal/audio repair quality, and probe_media affects playability.
Experiments evaluate VibeVideoAgent across three coding backbones using dual-judge L3 metrics, telemetry, and treatment-blind ablations. Adding VibeVideoAgent consistently improves L3 quality, especially temporal and cross-modal audio-visual dimensions, under both Gemini judges, while native pipelines often miss narration drift, shot-boundary cuts, and dead air that modality-gated checks catch. Telemetry reveals distinct repair behaviors among Claude Opus 5.5, Claude Sonnet 5.5, and GPT-6 Astra, and ablations show that removing check_requirement, compare_media, or probe_media creates specific weaknesses in coherence, repair or timing, and playability, with staged local edits plus perceptual feedback yielding the highest rubric and L3 quality.