← Back to Blogs
I Built a Video Editor Where the AI Has to Ask Before It Publishes

I Built a Video Editor Where the AI Has to Ask Before It Publishes

6 min read
TrueForgeAI AgentsVideo EditingYouTubeHackathon

How I built Greenlight, a cloud video editor where TrueForge can research, cut, render, and stage a YouTube video without hiding the work or taking away creator control.

I gave an AI the ability to research a topic, edit a timeline, render the result, and upload it to YouTube.

Then I spent most of the hackathon making sure it could not quietly do something stupid.

That became Greenlight, a cloud video editor built for the TrueForge Agent Harness Hackathon. It has a normal multi-track timeline, a program monitor, media bins, captions, audio controls, thumbnails, and YouTube release tools. Beside all of that sits a Producer agent that can operate the same project.

The important bit is not that the agent can edit. Plenty of demos can turn one prompt into an MP4.

The important bit is that you can see what it researched, inspect the sources behind a claim, review its script, preview its edits, reject a bad change, refresh the page mid-run, and still come back to the same work.

Why I built it this way

One-prompt video generation looks great until the model gets a fact wrong, uses media with a mystery license, ruins a cut you liked, or publishes under your name.

I did not want another black box with a progress spinner.

I wanted the agent to work like a very fast producer sitting beside an editor. It can do the boring parts, but the project remains understandable and editable by a human.

So Greenlight has one rule at its core: AI work and manual work must resolve to the same project state.

If I drag a clip, Greenlight commits a typed edit operation. If the Producer trims that clip, it proposes the same kind of operation and pauses on a preview. Accepting either change creates an immutable revision. Undo still works. There is no secret second timeline living inside the chat.

What TrueForge actually does

TrueForge is the runtime behind the Producer. It is not just the model endpoint.

It owns the long-running session, the root agent, child research threads, questions, approvals, tool calls, and reconnect flow. Greenlight projects those events into a production conversation instead of dumping protocol logs into the UI.

For the demo I can type one normal prompt:

Make a punchy 40-second explainer. Use real Pexels footage and OpenMoji.

The Producer then builds a visible plan and works through it. It researches the topic in bounded child threads, writes a sourced script, pauses for script approval, finds licensed footage, attaches OpenMoji graphics, generates narration scene by scene, measures captions, builds the cut, mixes music, creates three thumbnail candidates, renders, and runs release checks.

Refresh the browser during research and the same TrueForge turn keeps going. That tiny moment is one of my favorite parts of the demo because it proves the agent is not a frontend trick.

The boundary that kept the project sane

TrueForge decides what to do. Greenlight owns the side effects.

I exposed one Greenlight MCP server with typed tools for project state, artifacts, editing, media search, voice, transcription, rendering, quality checks, OAuth, and YouTube staging. The model only sees immutable artifact IDs. It never sees a server path, API key, OAuth token, or shell command containing user data.

That split made failures much easier to reason about. The agent can suggest a transition, but the editor contract still checks whether both clips are real adjacent items at the persisted cut. It can request a render, but the render tool still checks evidence coverage and the current revision. It can prepare a release, but the first upload is always unlisted.

Autonomy lives inside a hard boundary. That is the whole product.

The video pipeline

The final demo project is a 40-second explainer about why phones slow down when they get hot.

It uses real Pexels clips, an OpenMoji visual, six separate Kore narration takes, measured captions, licensed background music with ducking, and three generated thumbnail options. Each narration take belongs to one scene, so changing scene four does not force me to regenerate one giant audio file.

Remotion renders the locked content package on the VPS. FFmpeg and Greenlight's quality checks inspect the actual output for an audio stream, duration, dimensions, black frames, captions, and release metadata. The resulting artifact is what gets staged to YouTube.

The Release panel keeps the boring but dangerous details together: evidence, captions, audio, black frames, metadata, render, disclosure, thumbnail choice, channel connection, and destination.

Public and scheduled release require approval for the exact locked snapshot. Change the edit, thumbnail, metadata, or render and that approval becomes stale. Good. It should.

What was genuinely hard

Rendering video was not the hardest part. Making a long agent run readable was.

TrueForge exposes a real event stream. A real run has retries, child work, large MCP responses, questions, approvals, and tool results. Showing all of it verbatim would turn the Producer panel into developer logs. Hiding all of it would make the agent look fake.

I ended up building a projection layer that keeps the useful story: the plan, meaningful progress, sources, documents, creator decisions, applied changes, failures that affect the creator, and final outcomes. Routine protocol noise stays quiet.

The second hard part was refusing to add fallbacks. A fake success path is tempting during a hackathon. Greenlight fails clearly instead. If measured word timing is missing, a word-accurate edit does not pretend. If a provider is unavailable, the UI says what capability is blocked. If a transition points at the wrong items, the contract rejects it before the project changes.

Qodo found the bugs I had stopped seeing

I kept the whole build in one long pull request: aryan877/greenlight#1.

Qodo reviewed it repeatedly while the product changed. The useful findings were not style comments. It caught unsafe media redirects, child-process cleanup bugs, upstream streams that kept running after the client disconnected, and transition references that could break after deleting a clip.

Each serious finding became a fix and a regression test. Then I ran the full gate again and asked Qodo to review the new commit.

That loop made the code better in a way a last-minute badge never would.

What I learned

An agent does not become trustworthy because its prompt says "be careful."

It becomes trustworthy when the system around it owns state, validates actions, remembers decisions, and makes the dangerous moments obvious to a human.

TrueForge gave me the durable agent loop. Greenlight turned that loop into an editor people can actually inspect and control.

The result is not an AI that makes videos while you look away. It is an AI you can work beside.

That is a much harder product to build.

It is also the one I would trust with my channel.

Try the live build at greenlight.aryankumar.dev. The judge login is prefilled.

Comments (0)

Loading comments...