Ask a coding agent for a product video today and it has a few bad options. It can drive a timeline editor it can't see. It can write a React app and screenshot it in a headless browser, frame by frame. Or it can glue ffmpeg filters together until something renders.

nippo is a video library built for the agent instead. A video is a program. Every frame is a pure function of time. A native renderer draws it on the GPU. And the project comes with the skills an agent needs to write that program, check the frames, and render.

The nippo showcase film

Every frame of the 100-second showcase film is code, including the 3D bottle, the transitions and the synthesized score. Watch it on the site.

A video is a program

nippo is written in hd, a statically typed language that compiles to WebAssembly. Here is a title card:

fn heading() -> Child $ Drawing: text("Motion, written.", size=120.0, weight=800.0, font=FONT) .reveal_words(ms(200), ms(160), ms(420)) .style_words(.Last, color=.Some(hex(LIME))) .look(glow(24.0, strength=0.6 * progress(ms(800), ms(1600)))) fn rule() -> Child $ Drawing: width := 640.0 * Spring {}.at(now() - ms(700)) rect(0.0, 0.0, width, 6.0, hex(LIME), radius=3.0) fn card() -> Child $ Drawing: shown := column(gap=36.0, align=.Center): heading() rule() text("Videos as code, drawn on the GPU", size=44.0, font=FONT) .opacity(progress(ms(1200), ms(1900), ease=.EaseOut)) shown.center_in(1920.0, 1080.0) 

The title card, three seconds in

There is no timeline object and no animation state. progress(start, end) is 0 before a window, 1 after it, and eased between. A Spring is a function of elapsed time. The words reveal on a stagger. Each value is computed from the time of the frame being drawn, so nothing carries over from one frame to the next.

Scenes are clips with their own clocks. series plays them one after another, with overlaps and transitions. A clip can be sped up, reversed, frozen, looped or echoed, all by asking it for a different time.

How it works

The hd program describes each frame. A native renderer written in Rust draws that description with Vello on the GPU (Metal, Vulkan or DX12), then pipes the frames straight to ffmpeg. It's one process, with no browser and no screenshots.

Because frames are pure, any moment renders on its own. Previewing one moment doesn't mean playing up to it, and the same code always gives the same frame. Long videos can be split into segments that render in parallel processes.

Two more decisions keep it fast and predictable:

  • Slow work happens once. Fonts, images, footage, audio, 3D meshes and the score are prepared before the first frame. Views only draw what was prepared.
  • Checks run before pixels. A video declares what must hold: no missing glyphs, text inside the safe area, chart labels that don't overlap. check reports each failure with the time and the fix. Then the type checker reads the rest.

Looks are library code over one primitive, a WGSL shader over other nodes. Glow, blur, frosted glass, light rays and transitions are ordinary functions, and a custom shader runs on the GPU like the built-ins.

On an M3 Max, the 100-second showcase (3,000 frames at 1080p) renders in about 12 seconds.

Made for agents

hd is a new language, so no model knows it from training. nippo's starter template therefore ships two agent skills in .agents/skills/: one for hd, and one for nippo. A new project gets both, and AGENTS.md tells the agent how to work.

The nippo skill teaches a loop more than an API:

  1. hd check and hd test after every edit.
  2. check NAME runs the video's own checks and compiles its shaders.
  3. still NAME --at MS renders one frame, and the agent looks at the PNG: before a motion, during it, after it settles, and on both sides of each cut.
  4. sheet NAME --every MS lays the whole video out in one image, to show the pacing.
  5. render happens only when the frames are right.

The skill also lists the mistakes a compiler can't catch, each with the message it really gives. One example: text that names a font family the project never loaded quietly falls back to a system font, with no error and a passing check. The only way to catch it is to look at a frame, so the skill says so. Its three example projects are complete videos, and a script in nippo's repository compiles, tests and renders them against the library.

Why hd

An agent's loop is edit, check, look, repeat, so the cost of each check matters. With hd, after a one-line edit:

Step Time Peak memory
hd check of the whole 100-second film 0.05 s 43 MB
release build of the film, ready to render about 3 s under 800 MB

That footprint is small enough to run many agents side by side on one machine, each on its own scene.

Native code, without the toolchain

The renderer is native, but you don't build it. CI builds it for macOS (Apple silicon and Intel) and Linux (x86_64 and arm64) and attaches it to each release with checksums. hd fetch downloads the one for your machine, and the project's hd.sum pins its hash, so a renderer that doesn't match is refused. The renderer is also checked against a hash of the interface it was built for, so a stale build can't load. You need no Rust toolchain and no install script.

Try it

You need hd (0.0.10 or later), ffmpeg, and a GPU.

hd new -t HerringtonDarkholme/nippo-starter my-video cd my-video hd fetch hd run --release -- render hello --out hello.mp4 

Then open the project in your coding agent and ask for the video you want.