-
-
Studio landing: select one of 16 UGC ad templates and begin with a single creative brief.
-
Three-angle persona enrolment captures front, left, and right references for consistent identity.
-
Enrolment preview: webcam calibration creates reusable persona references for the production run.
-
Live studio state graph streams planning, generation, review, and retry steps from Firestore.
-
Vision Critic Inspector compares each take against the brief, persona geometry, and Look Bible.
-
Two-stage pipeline critiques affordable storyboard stills before rendering approved frames to video.
-
Decoupled controls keep camera, lighting, and likeness independently adjustable across a production.
-
Delivered multi-cut hero-ad preview: the final character-consistent UGC video output.
-
Studio-review preview: the agent critiques a take and autonomously triggers an informed reshoot.
-
Drift comparison: Restage preserves likeness across wide, selfie, product, and application shots.
-
Geometric drift breakdown: Restage locks stable facial landmarks across takes and camera angles.
-
Global Look Bible locks location, lighting, wardrobe, and palette across independently generated shots.
-
Google Cloud architecture: Next.js, Cloud Run, Firestore, Gemini, Veo, and storage roles.
-
Two-stage architecture comparison: inspect storyboard frames before expensive video rendering.
Restage — autonomous UGC video production
Restage is an autonomous AI agent studio that turns a one-sentence creative brief into a broadcast-ready, multi-cut UGC video ad with a character-consistent persona.
A typical video-generation workflow produces isolated clips that drift in identity, lighting, and product context. Restage treats an ad as a structured production job instead of a single prompt: it plans a shot list, builds a shared Global Look Bible, generates storyboard frames, critiques every take against the brief and persona references, automatically reshoots weak shots, and renders only approved cuts.
The problem
UGC ads are expensive and slow because they require a person, scheduling, licensing, and reshoots whenever the creative changes. One-prompt video generation also struggles with the core requirement of a real ad: multiple complementary cuts that keep the same person, product, palette, and lighting.
What the agent does
Enrolls a persona with front, left, and right camera angles, plus optional voice capture. Plans the production from a short creative brief using one of 16 UGC formats, producing an ordered shot list and shared look constraints. Generates economical storyboard stills before expensive video work. Inspects each take with a multimodal vision critic for brief adherence, likeness, lighting, and scene consistency. Acts on its own verdicts: a failed shot triggers one targeted, critic-guided reshoot; approved shots advance to render. Delivers a multi-cut video ad while preserving usable approved clips if a later clip fails.
The result is a Taskmaster agent, not a chat wrapper: it converts a goal into a stateful production workflow, decides whether a result meets the brief, and performs bounded corrective action without asking the user to drive each step.
Google AI and Google Cloud
Google GenAI SDK (@google/genai) for model access Gemini 3.7 Flash for the autonomous planner, vision critic, and identity checks Gemini 3 Pro Image for high-fidelity storyboard stills Gemini 3.5 Flash Lite for script decomposition and prompt optimization Veo 3.1 Fast for frame-to-clip motion synthesis Google Cloud Run for the containerized application runtime Cloud Firestore for durable runs, plans, node state, and real-time subscriptions Firebase Storage for enrolment media and generated frames Firebase Hosting/Auth for the web application Google Cloud Text-to-Speech for generated narration
Production architecture
The Next.js 16 application keeps model credentials server-side in API routes. A run is persisted as a Firestore-backed state graph, so the studio can display progress in real time through Firestore subscriptions and recover cleanly after a page refresh. The orchestrator stores each attempt as a node, keeps generated media out of Firestore documents, enforces a bounded retry policy, and preserves approved partial output when later work fails.
Evidence and reproducibility
Live app: https://restage-studio.web.app Demo video (3m 17s): https://www.youtube.com/watch?v=7j_91W_by7o
The repository includes step-by-step local setup and Cloud Run deployment instructions. To run locally: clone the repository, change to restage/web, run npm install, copy .env.example to .env.local, and run npm run dev. For static verification, run npm run typecheck and npm run build from web/.
Visual proof
The gallery documents the complete workflow: studio landing and templates, three-angle persona enrollment, live state graph, vision-critic inspection, two-stage and Cloud architecture diagrams, Global Look Bible, drift comparison and morph breakdown, decoupled controls, and delivered ad previews.
Privacy and responsible operation
Restage separates avatar media, generated frames, run state, and finished clips by storage role. The code is designed to keep credentials server-side, encrypt user-provided Gemini keys at rest, and avoid placing large inline media in Firestore documents. The agent uses a bounded retry policy so correction cannot become an unbounded cost loop.
Complete project image gallery
Product workflow
Agent and infrastructure evidence
Why the agent corrects instead of merely generates
Built With
- cloudflare-r2
- firebase
- firebase-storage
- gemini-3-pro-image
- gemini-3.5-flash-lite
- gemini-3.7-flash
- google-cloud-firestore
- google-cloud-run
- google-cloud-text-to-speech
- google-genai-sdk
- next.js-16
- react-19
- typescript
- veo-3.1-fast
