glove-video gives agents a workflow for producing video: maintain creative direction, generate shots, inspect the actual results, revise failures, and deliver approved selections.
A short campaign may need a recurring character, consistent locations, several shots, revisions, and a final review. Provider jobs take time, and a failure halfway through the sequence should not require regenerating every successful shot.
glove-video is available on npm. The published 0.1.4 package includes prompt pipelines, reusable character and scene libraries, stored assets and recipes, an OpenRouter generation adapter, resumable shot flows, and optional review-gated delivery.
pnpm add glove-videoMount it on a Glove agent with mountVideo, supplying a model adapter, asset storage, and a continuity library. Add flow storage for sequences and a video-capable reviewer when delivery should depend on inspection. The video guide has the complete setup.
Imagine a three-shot film for a lakeside lodge: a traveler arrives, walks toward the water, and settles on a terrace.
The brief establishes the story. The workflow carries the information needed to make its separate shots belong together.
A saved character can describe appearance and performance, including how the person moves. A saved scene can describe the setting, lighting, visual style, and ambient motion.
The prompt pipeline expands those definitions into each shot. Structured beats provide a timeline for actions, while additional passes can supply camera direction or a house style. An optional model-backed enhancer can further develop the prompt.
Each stage records a trace, so the application can inspect how the original intent became the submitted request. Generated assets retain their recipes and lineage, supporting regeneration with a revised direction.
These mechanisms make continuity requirements explicit. They cannot guarantee that a generative model will satisfy them, which is why inspection remains part of the workflow.
The final pipeline stage, fitVideoToModel, checks the request against the adapter’s declared capabilities. Duration, aspect ratio, resolution, reference roles, audio, seeds, negative prompts, and candidate counts can vary between providers.
When the stage reduces a request to fit those capabilities, it records the change in the recipe trace. That makes a dropped reference or adjusted duration visible during debugging.
The bundled openrouterVideo() adapter submits a generation job, polls its status, downloads the completed media, and returns bytes with provider job identifiers and usage information.
The directing agent works with asset IDs and metadata. The asset store holds the video bytes.
This boundary also allows custom adapters. The package contract has optional extension and transformation operations, but those depend on the adapter implementing them. The bundled OpenRouter adapter currently implements generation; it does not implement extend or transform.
Image references can come from another store through a host-supplied resolver. That provides a bridge to glove-image, for example when a project first creates a character reference or opening frame and then uses it in a video request.
A video flow describes shots and their dependencies. For the lodge film, the application might define:
Dependencies establish order. A continuity relationship can also pass the first output of a preceding shot forward, either as a reference or through an adapter’s extension operation.
Those options remain subject to provider capabilities. The package does not automatically extract a final frame from the preceding clip.
Before execution, the runner validates the dependency graph. Each run retains an immutable copy of its definition and saves state before and after each shot. Execution is sequential.
If the third shot fails after the first two have been saved as successful, resuming skips those completed shots and retries the unfinished work. Recovery follows the saved checkpoints: an interrupted shot whose success was not recorded may need to run again.
With review configured, generated videos remain internal drafts. The directing agent receives their identifiers and metadata, but generation does not immediately expose them as user-facing media.
The review tool sends the stored video bytes to a separate, video-capable model. It can also include relevant identity, style, and first-frame images, allowing the reviewer to compare the result with visual references.
For the lodge film, the reviewer might identify a changing jacket, unstable movement, or a terrace shot that fails to match the brief. Its response includes a score, pass-or-revise decision, structured issues, temporal evidence, and actionable revision guidance.
Glove then applies the delivery policy deterministically. Delivery requires a passing decision, a score at or above the configured threshold, and no major or critical issue. A reviewer cannot offset a blocking defect with a high overall score.
The directing agent decides how to respond: regenerate with feedback, compare another candidate, or use a supported transformation. The revised asset goes through review again.
A flow delivery gate checks every selected shot and supports explicit reviewed replacements. One failed or unreviewed shot holds the sequence.
Enable review and route presentation through the delivery tools to use this gate. The model supplies the assessment; the host’s score threshold and issue policy decide whether that assessment permits delivery.
In-memory stores are supplied for prototypes and tests. Production applications can implement asset storage over object storage and persist libraries, reviews, flow definitions, and checkpoints in a database.
User-facing media references travel through renderData, separate from the ordinary tool data supplied to the directing model. The package defines video, gallery, and flow rendering shapes, but does not yet include a React renderer.
It also leaves editing and assembly to other tools. Concatenation, transcoding, audio mixing, and frame extraction belong in glove-env-media or another media service.
Start with one shot, a reusable visual reference, and a review rubric. Once that loop works, expand it into a flow. The package guide covers the tools and storage contracts; the video gallery shows a recorded production workflow with candidates and review decisions.