Brief to Storyboard to Template Render
The reliable agent loop separates intent, composition choice, execution, and review. Each stage produces a small artifact that a human or a later agent can inspect before the next irreversible step.
Input contract
Require a structured brief with audience, duration, aspect ratio, approved claims, visual assets, destination CTA, and review owner. Unknown facts remain explicit gaps; the agent must not turn a plausible guess into a product claim.
Tool sequence
- Use
list_templatesorsearch_catalogto discover candidates. - Use
get_templateto read variables and required media before filling anything. - Use
get_layer_capabilitieswhen the brief asks for effects or transitions. - Use
measure_textfor dense copy and reject a layout that cannot fit its bounds. - Produce a storyboard artifact with scenes, copy, media, assumptions, and unresolved review questions.
- Wait for approval, then call
render_templateorrender_jsonwith an idempotency key. - Poll with
get_render_status, then requestget_download_urlonly for a completed job.
Output and evaluation schema
Store the brief, selected template id and version, variable map, storyboard, render job id, status history, and reviewer decision. Evaluate factual fidelity, asset provenance, text fit, timing, accessibility, and CTA destination separately. A successful API response is an execution result, not a quality or publishing verdict.
Review and redaction
The review gate checks claims, prices, names, media rights, captions, and the final destination. Redact API keys, private source URLs, customer identifiers, and sensitive transcript text from prompts, logs, screenshots, and evaluation fixtures. Keep a sanitized error and the schema path so a failure can be debugged without retaining the secret.
Failure modes and recovery
If template discovery returns no compatible candidate, change the brief or use a lower-level VideoJSON composition; do not silently drop a required scene. If text measurement fails, shorten or restructure the copy. If rendering fails, preserve the job id and status reason, fix the input, and retry with a new review decision rather than looping automatically.
Tested version and next step
This pattern was checked against MCP server v1.0.2 and the tool contract on 2026-08-05. Start with the installation guide, then compare the product video agent example for a concrete brief and review checkpoint.