Skip to content
< all work

Agents & MCP · Open-source project · 2026

Reelkit: a video editor that AI agents edit through MCP

An open-source desktop video editor where a model edits through the same operations a person uses: 53 tools served over MCP and a CLI, one undo history, and a 25-task benchmark that grades the edit in frames.

agent-systemsmcpevaluationlocal-llms

Two small local models (Qwen3.5-4B and 9B on llama-server, a 6 GB laptop GPU) passed 95.2% and 94.2% of the edit checks across 150 real videos after the fixes the first run surfaced.

Role
Sole engineer
Stack
TypeScript · Electron · WebGL2 · WebCodecs · FFmpeg · whisper.cpp · OpenTimelineIO · MCP · llama.cpp · Zod
Three turns of one benchmark run, Qwen3.5-4B on llama-server. Footage: Sintel (c) Blender Foundation, CC BY 3.0.

Context

Reelkit is my own open-source project. It is a cross-platform video editor built so that a model edits video through the same operations a person uses, plus a benchmark that measures how well models do it. I wrote all 146 commits. It is a TypeScript monorepo: the document model, media ingest and analysis, the agent tool layer, the benchmark, the renderer, a WebGL2 compositor, timeline interchange, and the Electron desktop app.

The problem

Most AI video tools generate a finished file or run a fixed pipeline. A person cannot open the result in an editor, see each decision, and undo the one that was wrong. Agents that drive a real editor usually do it through screenshots or scripts, so nobody can say how often the edit was right.

I wanted the agent to edit a real timeline through typed tool calls, with every change landing in the same undo history as a mouse drag. Then I wanted a way to grade those edits exactly, in frames, instead of judging them by eye.

What I built

The agent layer serves 53 tools over MCP (stdio) and a reelkit CLI. They cover the project, editing (insert, trim, slip, split, ripple, speed, links), captions and markers, looking and listening (find_scenes, find_silences, measure_loudness, contact_sheet, get_frames, transcripts through whisper.cpp), music and pacing, and interchange with other editors. Any MCP client can edit a project by registering one server.

The desktop app puts a media bin, viewer, inspector, timeline, and an assistant panel in one window. The main process holds a single agent session, so the assistant and the person edit one document. The assistant runs on the Anthropic API, any OpenAI-compatible API, OpenRouter, Ollama, or a local llama-server. Its tool calls show with their arguments and results.

The benchmark, reelkit-bench, gives a model the same tools, asks for an edit in plain words, and grades the resulting timeline against ground truth in frames. Its 25 tasks run in five tiers, from a single trim to multi-step edits that need looking and listening. Where it matters it also grades the rendered sound and picture.

How it works, key decisions

  • One document, one history. Every change, from a drag or from the model, is one named operation on the same document, so Ctrl+Z undoes either. Each assistant turn ends in an edit card that can undo that turn alone.
  • Time always carries a unit. Arguments are "120f", a timecode, or "4.5s", and bare numbers are refused. The first local run showed models meaning seconds while the tools read frames, so I made the unit required.
  • Errors the model can act on. An edit that would overlap fails by default and names the modes that would work (overwrite, insert, ripple).
  • A sandbox on media. The agent reads only the project folder and the folders or files the user granted. Network and device paths are refused, and exports are written only inside the allowed folders.
  • A trustworthy score. Every benchmark task has a scripted oracle that must pass and a do-nothing baseline that must fail. On the current list the oracle passes all 25 and doing nothing passes none.
  • One renderer for everything. resolve(project, frame) turns the document into a plain-data render graph, and the WebGL2 compositor draws only that. Preview, export, and benchmark frames come from the same code. Reruns are bit-identical, and 1080p export ran at 5.5x real time.
  • Interchange with loss reports. OTIO and FCP7 XML in and out, FCPXML out, SRT and WebVTT captions. Each import or export reports what the other format cannot carry, checked against Python OpenTimelineIO.

Results

I ran a second benchmark through the real desktop app: 150 challenges on NASA footage (10 hand-built, 140 generated across 7 templates), each a short conversation typed into the prompt box. Two local models ran on llama-server on an RTX 3060 Laptop GPU with 6 GB and a 32k context window. After every turn, checks graded the edit: length, gaps, shot lengths, titles, captions, cuts between words, music under the edit.

Qwen3.5-9BQwen3.5-4B
Run 1982/1110 (88.5%)1008/1127 (89.4%)
After the fixes1062/1127 (94.2%)1078/1132 (95.2%)
Challenges passing every check95 to 11096 to 114
Time for all 150 (run 1)13.8 h8.8 h

The first run found real bugs in the model loop. One broken tool call with invalid JSON stayed in the history, and llama-server refused every later turn: 13 turns across 7 challenges were lost that way. Now such a call is kept as {}. Models also announced an edit and stopped, so a turn that leaves the timeline untouched gets one nudge to carry on or explain why it can't. On reruns, the broken-JSON runs went from 4/33 to 30/33 (9B) and 8/48 to 41/48 (4B).

The 4B model matched the 9B and was a third faster. It is weaker on long talks: on a 58-minute press conference it spent its whole call budget placing clips one at a time.

What I'd do next

  • Target cuts in the middle of a word, the 9B model's most common miss (31 checks in run 1).
  • Test whether presence penalty 1.5 causes the remaining truncated tool calls, against a run at 0.
  • Add a check for slates and leader frames, and build proxies before the turn clock starts on very long footage.
  • Run hosted models on the 25-task benchmark with several seeds, then publish the repository and the leaderboard.
Reelkit's desktop editor: media bin, viewer showing the SINTEL title over a shot, the assistant panel, and a timeline of eleven clips with a title track.
Turn 2 of a passing run: the model added the title the prompt asked for. Sintel (c) Blender Foundation, CC BY 3.0.
A list of every tool call from one turn: use_skill, project_info, find_scenes, contact_sheet, append_clips, three run_script calls, a failed import_media and get_timeline, with arguments and results.
Turn 1 of a film-trailer run as the session log records it. The model measures its pacing after each script and lands on 45.5 s with 13 shots on the third try.
The assistant panel: the prompt 'now a vertical one for shorts, under 30 seconds', a 'Worked for 1:10, 7 steps' line, and an edit card reading 'Removed 2 clips, 44.0 s to 27.0 s' with Undo this edit.
Each turn ends in an edit card that shows the change and undoes it in one click.
Dot plot of checks passed by template for Qwen3.5-9B and Qwen3.5-4B across 150 real videos, all between 86% and 100%.
The 150-video prompt-box benchmark after the fixes, by template.