An agent that creates videos through code can run a program to completion and still produce overlapping captions or narration that arrives 2 seconds after the graph. None of that triggers a runtime error. KlingAI researchers tackled this problem with VibeVideoAgent, without retraining the model. They let the agent inspect its own drafts during production, while moving intensive video and audio inspection into short-lived review calls separate from the coding context. Across all 239 tasks in VibeVideoBench, Claude Opus 5.5’s overall audiovisual quality score (L3) rose from 4.03 to 4.43.
First, what does it mean to “create videos through code”? Video generation usually brings to mind generative models that produce pixels directly, but this paper concerns a different approach. A coding agent receives a natural-language brief and source assets—documents, data tables, images, and audio—then writes and runs a rendering program. It uses tools such as HTML/Canvas, React/Remotion, Cairo, Manim, FFmpeg audio pipelines, and Blender Python. The paper calls this Vibe Video. The advantages are clear: precise control over typography, data charts, continuity across shots, and audiovisual synchronization, with an editable source project left at the end.
The problem is that fluency in programming does not reliably translate into video authoring. In software development, bugs usually surface as compilation errors or failing tests. Video defects often produce neither signal. The paper identifies three gaps.
First, successful execution tells us very little about what the viewer actually sees. A script can exit with code 0 and write a valid MP4 while a character carries a bag in their hand instead of wearing it, a 3D camera turns away from the protagonist, or labels overlap.
Second, showing raw media directly to the coder pollutes its context. Production repeatedly involves reference videos, design stills, partial shot previews, and rough cuts. Appending their frames and audio to the agent’s history makes the context grow with every render and undermines its ability to maintain code over a long project.
Third, critique at the end of the pipeline comes too late. If review happens only after a finished, full-resolution render, a basic mistake in layout, rigging, or timing can force a rewrite of the entire project. Code changes also shift cut timing, so reviewing just one clip can let an unverified fix through or miss a regression in an adjacent shot.
It is like a video editor working with their eyes closed, editing from the script alone and pressing play for the first time only after finishing. During the edit, they have no way to know that the sound and captions are out of sync.
VibeVideoAgent’s design principle is simple: borrow a pair of eyes, but keep what they see out of the workspace.
The coder—the agent writing the code—never receives raw media. Detailed audiovisual inspection is delegated to short-lived review calls that return only a compact Finding grounded in time and space. A Finding contains a standard verdict, a short summary, and evidence located by time interval, modality, and normalized bounding boxes. Frames and audio remain inside that brief call and are then discarded, keeping the coder’s context small and focused on code. This separation follows VideoNexus’s approach of keeping perceptual processing outside the planner’s context for question answering over fixed videos, but takes on additional challenges specific to authoring. Drafts change with every revision, exist on multiple clocks, and require fixes to be checked across versions.
A clever part of the design is its multi-clock draft representation. A single Media specification handles read-only references, zero-duration design stills, shot previews placed partway along the film timeline, and complete cuts. The key is distinguishing three clocks: the source clock native to the file, the excerpt clock that starts the clip shown to the model at 0, and the film clock that places a partial render within the full movie. There is an interesting reason for starting excerpts at 0: it prevents the model from hallucinating timestamps in clips that have not yet been edited into the cut. The system also uses crop-before-scale processing, cropping 1080p or 4K frames at their original resolution before enlarging them, so that small labels, subscripts, and hand movements remain legible.
Seven primitives sit on top of this representation. They work independently of the rendering stack and fall into four questions an author faces during production.
describe_media indexes scenes, text, and sounds; locate_event searches for a specified object, action, or sound, moving from a sparse scan to dense follow-up queries over candidate intervals; inspect_segment diagnoses a selected interval or pixel crop and returns up to 6 evidence frames; and transcribe_speech uploads only audio and returns timestamped, verbatim speech.check_requirement. Instead of offering an open-ended critique, it verifies one explicit, observable claim, accompanied by its source in the brief and the required modalities. A deterministic post-validator checks whether the evidence covers every required modality. For example, “the peak marker is visible when the narrator says ‘peak’” requires both audio and visual evidence. If the excerpt has no audio, or the worker cites only visual evidence, the verdict becomes uncertain. The agent must supply both streams or widen the interval before it can declare success. This is the “modality gate.”compare_media. It compares two excerpts, each on its own clock starting at 0. Reference mode compares selected properties such as layout, camera path, palette, or choreography. Revision mode pairs an excerpt of the earlier defect, after hash verification, with the new render and asks whether the issue is resolved or persists. The hash guard is crucial: if a change has not been rendered again, it changes resolved to unchanged, catching the false impression that a problem has been fixed.probe_media. This runs locally through ffprobe/ffmpeg without making any API calls. It checks decoding and measures loudness (LUFS), silent intervals, frozen frames, and loop seams—the kinds of defects a multimodal model can miss with sparse sampling.Finally, a staged production protocol determines when to inspect. The Stage 0 planning gate (plan_production) requires the agent to register requirements by quoting constraints directly from the brief before writing code, with a program checking the quotations against the original. It also requires the agent to identify the “highest-risk requirement”—the one whose failure would cause the most rework—and the smallest render that can test it. Production then proceeds through preview→assembly→revision→delivery, testing the riskiest decision in a minimal preview before moving on.
Evaluation covered all 239 tasks in VibeVideoBench. These span 12 production categories in English and Chinese, including data storytelling, paper explainers, motion graphics, interactive 3D demos, game simulations, narrative animation, reference-based reconstruction, and music-driven editing. Agents receive a natural-language brief and read-only assets. They cannot call pixel-generation APIs and must deliver a playable MP4 and an editable source repository.
The comparison isolates a single variable. Each coding model runs in its native CLI: Claude Opus 5.5 and Sonnet 5.5 in Claude Code (claude -p, effort max), and GPT-6 Astra in Codex CLI. Every run uses the same rendering libraries and read-only inputs in an isolated 16-vCPU namespace. Runs with VibeVideoAgent register the same MCP server and PreToolUse hooks, blocking direct reads of raw media, subagents, and ad hoc external API calls. This forces all perceptual processing through the seven audited primitives. The perception model is fixed at Gemini 3.8 Flash.
Two official judges, Gemini 3.8 Flash and Gemini 4 Argon, score the outputs, and their scores are averaged with equal weight. The metrics are L1, compliance with technical delivery specifications; L2, the pass rate across thousands of binary rubric items; and L3, the mean of five dimensions rated from 1 to 5: visual quality (VQ), visual aesthetics (VA), content logic (CL), timing and motion (TM), and audio quality/synchronization (AQ). It matters to distinguish what this design measures and what it does not. L1 and L2 ask, “Did it follow the specified rules?” L3 asks, “Is it good to watch?” As we will see, these do not always move in the same direction.
There is one tension in the experimental design worth addressing. The perception model, Gemini 3.8 Flash, is also one of the two judges. In effect, it scores work it has helped inspect, creating a potential source of bias. The paper reports that improvements hold under the stricter independent judge, Argon, although some detailed Argon figures are blank in the excerpt.
The two-judge average in Table 1, L3 Mean, improved for all three models. Claude Opus 5.5 went from 4.03→4.43, GPT-6 Astra from 4.03→4.27, and Claude Sonnet 5.5 from 3.97→4.10. In the same table, Opus’s L2 rubric compliance rose from 98.87%→99.35%.
The largest gains were in timing and cross-modal coordination. Audio quality/synchronization (AQ) improved the most for every model: Opus went from 3.89→4.45 (+0.56), Sonnet from 3.85→4.25 (+0.40), and Astra from 3.94→4.26 (+0.32). The abstract’s “up to +0.56” refers to Opus’s AQ score. The explanation is that native agents build FFmpeg/TTS pipelines in which narration arrives after a transition, gets cut off at shot boundaries, or leaves dead air. Modality-gated check_requirement, transcribe_speech, and probe_media expose these failures while the video is still in production.
There is a tradeoff here that deserves a candid look. While Sonnet’s L3 perceptual quality improved, its L1 fell from 99.18→95.75 and its L2 from 96.36→94.61. Opus’s L1 also dipped from 99.92→98.59, although its L2 improved. This is what the abstract means when it says that “the granularity of code revisions governs the tradeoff between rubric compliance and perceptual quality.” The telemetry in Table 2 supports this reading. Opus inspects selectively and makes small patches: 12.0 worker calls per task, revisions addressing 77.4% of failed checks, a 58.3% resolution rate on dual-clock rechecks, and 147.9k coding output tokens, the lowest of the three. Astra, by contrast, inspects frequently and patches across many revisions: 50.6 calls, 100.0% preview-gate checking, revisions addressing 84.2% of failed checks, and a 65.6% dual-clock resolution rate. More revision can improve perceptual quality while destabilizing compliance with detailed rubric items. The plan_production planning stage, incidentally, succeeded on every task for all three models.
Read without exaggeration, the result is this: adding a mid-production review loop improved overall perceptual quality across three models without retraining, with especially strong gains on synchronization problems that require sight and sound to agree. But those gains are not free. Depending on revision granularity, specification compliance can suffer.
The paper has a Limitations section, but its text was not included in this excerpt, so I will not make claims here about the limitations the authors explicitly acknowledge. Instead, these are my observations from the tables and methods.
The biggest concern is the overlap between perception model and judge. Gemini 3.8 Flash serves as both reviewer and one of the judges. The paper says the improvements hold under the independent judge, Argon, but some detailed Argon figures are blank in the excerpt, making it difficult to establish the size of the gains under the independent judge alone. Second, Sonnet’s L1 and L2 declines represent a real cost: revisions intended to improve quality can break specifications. A production deployment would likely need a separate guard that preserves a minimum L2 compliance level. Third, all reported figures use Gemini 3.8 Flash as the fixed perception model. This experiment alone cannot tell us whether other perception models would produce comparable gains.
Prior work touching this problem falls into three broad groups. The first addresses code-based video generation itself: Manim educational videos such as TheoremExplainAgent and Code2Video, OpenMotion, and the VibeVideoBench benchmark. These approaches are generally tied to a single medium or engine. VibeVideoAgent differs in that its seven primitives operate on standard image, audio, and video containers, handling 3D WebGPU/Canvas, React/Remotion, Cairo and Manim, SVG game simulations, and multitrack TTS/FFmpeg audio without engine-specific adapters.
The second group uses VLMs to inspect rendered views in 3D workflows. The paper points out that these approaches examine only “static renders of a single program state.” VibeVideoAgent addresses discrepancies in screen space over time through reference-to-draft comparisons and verification across revisions.
The third group consists of feedback-driven agents. Visual Sketchpad inspects its own sketches, while Vision-as-a-Tool inspects static HTML, SVG, and 3D assets. Generated videos are usually scored after the fact by benchmarks or multimodal judges. VibeVideoAgent’s distinction is that it uses a multimodal model during production, on bounded excerpts, under deterministic validation. Its foundation, VideoNexus, was limited to question answering over fixed videos. Authoring is different: media changes, remains incomplete, spans multiple clocks, and shifts in timing with each revision.
Picture an AI PM assembling a customer-facing product explainer video or a data storytelling piece. With the current approach, the PM agent renders a draft, adds frames and audio to its conversation history, and asks itself whether the result is right. Once the video exceeds 10 shots, that history swells into a pile of frames, pushing essential long-term context—shot order and publishing requirements—out of focus. Only after finishing does it discover that the narration is half a beat late, forcing it to rebuild the whole thing.
VibeVideoAgent changes that workflow. The PM moves the act of looking outside its own context and delegates it to a short-lived review call. What comes back is only a one-line Finding with a time, modality, and location: “At 15.2 seconds, captions and narration are out of sync by 1.8 seconds.” Requirement checks have a modality gate, so a claim that “captions match the speech” cannot pass without audio evidence. Above all, the riskiest decision—for example, the approach to speech–graphics synchronization that governs timing throughout the video—is tested in one inexpensive preview before full production begins. This aligns precisely with the working discipline ONTLE envisions for its “AI PMs on assignment”: separate the context for doing the work from the context for reviewing it, receive review results as compact reports grounded in evidence, and test decisions that are expensive to reverse on a small scale first. The pattern extends beyond video to any agent workflow that produces substantial deliverables, including reports, dashboards, and publications.
Yes. The paper explicitly describes it as a training-free framework. The seven primitives connect to native coding CLIs—Claude Code and Codex CLI—through the Model Context Protocol (MCP), without changing the coding model’s weights.
That is a valid concern. The perception model, Gemini 3.8 Flash, is also one of the two judges. The paper reports that improvements hold under the stricter independent judge, Gemini 4 Argon, but some detailed Argon figures are blank in this excerpt, so we do not establish the size of the gains under the independent judge alone here.
No. The primitives are designed to operate on standard image, audio, and video containers, so no engine-specific adapters are needed. The same seven operations work with 3D WebGPU/Canvas, React/Remotion, Cairo and Manim, SVG game simulations, and multitrack TTS/FFmpeg audio.
In Table 1, Sonnet’s L3 perceptual quality rose from 3.97→4.10, but L1 fell from 99.18→95.75 and L2 from 96.36→94.61. The paper explains that code revision granularity governs the tradeoff between rubric compliance and perceptual quality. In other words, making more numerous and more detailed revisions can improve perceptual quality while destabilizing compliance with detailed specifications.
In the paper’s setup, the primitives are exposed through an MCP server, and PreToolUse hooks block direct reads of raw media, forcing all perceptual processing through an audited path. Structurally, this makes the approach portable to an environment with “a coding agent + MCP tools + a pre-tool hook gate.” However, the reported figures use Gemini 3.8 Flash as the fixed perception model, so effectiveness with other perception models needs separate validation.