Every other tool asks an agent to write React, TypeScript or a binary timeline. HyperFrames asks for HTML. The success rate on first generation is the difference between a demo and a product.
Trillions of training tokens are HTML. Models produce it accurately, in volume, with self-correcting structure. React, generators, and timeline JSON are all more error-prone.
Frames are computed, not played. The renderer sets time, reads pixels, advances. No race conditions, no flaky CI, no “why is this frame black?”
Drive HyperFrames from your tool-use loop with the CLI, JSON-RPC, or HTTP — whichever your agent runtime prefers. Progress events stream back so the agent can self-correct.
A minimal end-to-end loop: prompt the model, lint the output, render an MP4. Lint catches malformed timing or missing assets before the renderer ever opens Chromium — the agent can read the issues back and self-correct.
// agent-render.ts
import Anthropic from "@anthropic-ai/sdk";
import { renderHtml } from "hyperframes";
const client = new Anthropic();
const SYSTEM = `
You write HyperFrames HTML compositions.
Each scene uses <div data-start="0" data-duration="N">.
Return only HTML. No commentary, no markdown fences.
`;
const draft = await client.messages.create({
model: "claude-opus-4-7",
system: SYSTEM,
max_tokens: 4000,
messages: [
{ role: "user", content: "A 6-second cinematic title card for 'Northwind 2.0'." },
],
});
const html = (draft.content[0] as { text: string }).text;
// Lint before render — catches bad timing, missing assets, malformed HTML.
const { ok, issues } = await renderHtml.lint(html);
if (!ok) throw new Error(issues.join("\n"));
const mp4 = await renderHtml({ html, width: 1920, height: 1080, fps: 30 });
await Bun.write("northwind.mp4", mp4);Wire HyperFrames into your tool-use loop in under fifty lines.