Everything the interface does goes through one command bus, and a script sends the same commands. window.editorAgent is documented, introspectable and reversible, and it edits a real timeline rather than a render template.
Open the editor and run this in the page. It prints the reference and returns it, so it works as well for a model reading the result as for a person reading the console.
editorAgent.help() // the whole reference
editorAgent.help('commands') // commands, state, media, text, program, ui, frames, session, export
editorAgent.describe() // every command, its parameters, its scope, as dataThe usual way to make video from code is to describe a composition and have a server render it. That is a good way to produce a thousand similar clips and a poor way to edit one real one: there is no timeline to inspect, no footage to look at, and nothing to correct.
Here the agent drives the same editor a person uses. It can read the document, look at actual frames, find a spoken phrase, make a cut, watch what happened, and undo it. The interface is not a layer over the API: they are the same commands.
// the document, as JSON
const doc = editorAgent.state()
// find where something was said; the answer is in timeline frames
const hits = editorAgent.findText('pricing')
// one batch is one transaction and one undo unit
editorAgent.dispatch([
{ name: 'clip.split', params: { seq: 'main', track: 0, f: hits[0].startF } },
{ name: 'segment.setTransition', params: { seq: 'main', track: 0, index: 1, kind: 'dip', durF: 12 } },
], { actor: 'agent:me' })
// look at the result the way a person would
await editorAgent.frames(assetHash, 100, 160) // real frames on one canvas, captioned
editorAgent.program.snapshot() // what the monitor is showingagent: actor does not land in the undo stack a person is using.describe() returns every command with its parameters and scope, so the surface does not have to be guessed at.Three places, all on this origin, all plain text: /AGENTS.md is the reference an agent should read first, /llms.txt is the short pointer, and editorAgent.help(topic) answers in the page itself. The document in the head of every page names the API too, and there is a note in the accessibility tree saying so, because a browsing agent reads that tree rather than the source.
No account, no install, nothing uploaded. The first edit takes as long as a page load.