Kling Open-Sources VibeVideoAgent to Close Perceptual Loop for Code-Driven Video

Original title: 可灵开源VibeVideoAgent:为基于Coding的视频生成构建感知闭环
78AI Score

Kling AI introduces and open-sources VibeVideoAgent, a training-free, renderer-agnostic framework that lets coding agents such as Claude Code and Codex perceive and hear their own rendered drafts during Code2Video tasks, then locate and fix issues like misplaced entities, off-target camera moves, subtitle occlusion and audio-visual desync. Across all 239 VibeVideoBench tasks it improved overall audio-visual quality for Claude Opus 5.5, GPT-6 Astra and Claude Sonnet 5.5, with the largest gains in audio-visual sync. The design offloads frame-level monitoring to a dedicated observer, feeding the coding agent only concise, localizable feedback.

Full Report

Contents7 sections

Let coding agents "see and hear" the drafts they render throughout the production process and locate and fix issues.

The first author of this paper, Zheng Xuanyu, is the Tech Leader of the Video Understanding Group at Kling AI Kling-Keye and an expert in multimodal large model algorithms. He is a core contributor to the Keye-VL series, with research focusing on general video understanding, video agents, and Code2Video. The corresponding author is Wen Bin, Tech Leader of Kling-Keye.

Using coding agents like Claude Code and Codex for Code2Video tasks is becoming a new way of creating: layout, charts, camera movement, and voiceover are all precisely controlled by code, and an editable source code is left behind. But when it comes to real-world deployment, a problem quickly emerges—code runs successfully, but the video may not be shot correctly: entities are offset, the camera deviates from the subject, subtitles are occluded, and the narration lags two seconds behind the charts. These problems do not throw errors, so the coding agent has no way to notice them.

Recently, Kling AI proposed VibeVideoAgent, a training-free framework that is not bound to any rendering engine, enabling coding agents to "see and hear" the drafts they render throughout the production process and locate and fix issues. Across all 239 tasks in VibeVideoBench, it improved the overall audiovisual quality of Claude Opus 5.5, GPT-6 Astra, and Claude Sonnet 5.5 across the board, with particularly notable gains in audio-visual synchronization.

The core idea is intuitive: the coding agent does not need to stare at every frame itself. Instead, like a director, it delegates the "watching" task to an on-call monitor and only receives concise, locatable feedback.

Background: Three Blind Spots of Code2Video

In ordinary software development, code defects are often exposed through compilation failures or test errors; but code-driven video generation has three blind spots that such feedback cannot reach:

  1. Running successfully does not mean shooting correctly: The rendering script exits with zero errors and outputs a valid MP4, yet the visuals and audio are misaligned, occluded, or visually broken.
  2. Directly "watching" blows up the context: During repeated rendering of previews and rough cuts, stuffing raw frames and audio into the conversation history quickly drags down long-horizon code maintenance.
  3. Reviewing at the end is too late: Reviewing only after the full video is rendered means early layout or character design mistakes often lead to a complete rewrite; and changing code causes the entire timeline to drift, so reviewing a single segment easily misses unfixed defects or regressions in adjacent shots.

Figure 1 | Left: Traditional coding agents either deliver blindly or stuff raw media into the context and review at the end; Right: VibeVideoAgent isolates raw media outside the coding context and continuously returns concise feedback at each stage of production.

Method: Separating "Watching" from "Writing",

Seven Tools Adaptable to Any Rendering Stack

The core of VibeVideoAgent is decoupling perception from coding: the coding agent never directly touches raw frames or audio. Instead, it calls ephemeral multimodal perception models (fixed to Gemini 3.8 Flash in the paper) and local signal tools via MCP, receiving only concise feedback (Finding) with timestamps, spatial boxes, and clear conclusions. Raw media is discarded after use, achieving 6.5x context compression in a single round on a set of diagnostic tasks and 12x on long-horizon paper explanation tasks.

The framework works through three layers of mechanisms:

  • Unified multi-clock representation: Reference materials, design stills, local shot previews, and full rough cuts are uniformly addressed, automatically converting between source clock, clip clock, and final timeline, with native-resolution crop-and-zoom and file hash caching.
  • Seven engine-agnostic tools: Covering four types of operations—exploring materials and drafts from coarse to fine (global indexing, event localization with 8 fps automatic fine inspection, local Q&A, and audio-only transcription); verifying user requirements item by item, where evidence must cover all required modalities, and any missing one is judged as "uncertain"; comparing reference materials or old and new versions on their respective independent clocks to confirm that changes have actually taken effect; and local FFmpeg zero-model-cost detection of decoding, loudness, silence, frozen frames, and loop seams.
  • Risk-first staged workflow: Before writing code, decompose requirements and lock down the steps with the highest rework cost, validate them with a single still or short preview first, then proceed in order to rough cut, targeted repair, and final delivery.

Because the tools operate directly on standard audio, video, and image files, there is no need to write adapters for any rendering engine. A single interface can serve pipelines such as HTML/Canvas, Three.js, Manim, and FFmpeg/TTS, and plug directly into Claude Code and Codex.

Figure 2 | VibeVideoAgent architecture: three-clock media specification, seven engine-agnostic inspection tools, and a staged production workflow with a traceable ledger.

Experiments: Three Frontier Models Improve Across the Board,

"The More Local the Edit, the Better the Result"

On VibeVideoBench, which contains 12 Chinese and English categories and 239 tasks, each model was evaluated in pairs against the official native version within the same sandbox, taking the average of two judges: Gemini 3.8 Flash and the independently stricter Gemini 4 Argon.

Table 1 | Main experimental results on the 239 tasks of VibeVideoBench (average of two judges; L1/L2 are percentages, L3 is scored 1–5).

  • Audio-visual quality improved across the board, with audio-visual synchronization gaining the most: The average L3 score rose significantly across all three models — Claude Opus 5.5 climbed from 4.03 to 4.43 (+0.40), while its L2 detailed-criteria pass rate reached the highest in the field at 99.35%; GPT-6 Astra rose from 4.03 to 4.27 (+0.24), with L2 rising to 99.15% and its L1 compliance rate reaching the highest in the field at 99.51%; Claude Sonnet 5.5 rose from 3.97 to 4.10 (+0.13). For all three, the largest gain was in audio-visual synchronization (Opus +0.56, Sonnet +0.40, Astra

  • Edit granularity determines whether detailed criteria and quality can both improve: Opus 5.5 exercised restraint, making small, precise patches, producing the least output code yet achieving gains in both L2 and L3; GPT-6 Astra performed high-frequency verification and multi-round local patching, achieving the highest fix-confirmation rate (65.6%); while Sonnet 5.5 often rewrote the entire script, which improved pacing and audio-visual synchronization but lost some static details. Only when paired with localized edits can the perception loop simultaneously improve both doing it as required and making it look good.

  • Every component is indispensable: On a 36-question pre-hoc blind-selected, capability-stratified subset, the full version was optimal on both L2 (99.50%, +3.44 pp) and all L3 dimensions (4.40, +0.56). Removing the requirement check caused the largest drop in the detailed-criteria pass rate; removing the dual-clock comparison reduced the post-failure revision rate from 94.0% to 78.3%; removing local signal detection caused the sharpest decline in L1 technical compliance (-2.62 pp); and eliminating the staged preview gating turned early design risks into costly late-stage rework.

Table 2 | Component ablation results on the 36-question pre-hoc blind-selected diagnostic subset (Claude Opus 5.5).

Real Case: Closed-Loop Repair of a 20-Second Life Short Film

In task W0448 (a 20-second, six-stage, dialogue-free short film that loops seamlessly from head to tail around a red button), the agent first used a single still frame of a character lineup to verify the highest-risk item — "cross-age character consistency" — and only after passing did it render the 600-frame final cut. In the rough cut that exited with zero errors, the system caught three silent defects: in the youth stage, the backpack was held in hand rather than worn on the shoulder; in the family stage, the laptop was not closed and the child did not run in from off-screen. After locally patching the code, the agent confirmed the fix via dual-clock comparison and delivered after passing local decoding and seam detection; for windows with incomplete evidence, it honestly returned "uncertain." Ultimately, the task's detailed-criteria pass rate rose from 76.0% to 96.0%, with context compression of 5.5×.

Figure 3 | Top: the real closed-loop trajectory of W0448; bottom: the same set of tools, with no adaptation needed, can serve different rendering stacks such as interactive 3D, long-horizon audio-visual synchronized narration, and reference-guided reconstruction.

Open Source and Outlook

VibeVideoAgent has been fully open-sourced under the MIT license; a few commands are all it takes to integrate it into Claude Code or Codex, and it ships with the PreToolUse constraint configuration used in the paper's evaluation. Going forward, the team will continue to explore directions such as localized editing guidance for small and medium-sized coding models, adaptive preview scheduling, open-source perception models, and 4D film previsualization.

Image

© THE END

For reprinting, please contact this official account for authorization.

Submissions or press inquiries: [email protected]

Open in WeChat