agent-media

Installation
SKILL.md

agent-media, the skill

Treat Agent Media as one composable media toolbox. Start from the user's outcome, then freely combine uploads, image inspection, generate_image, generate_video, generate_audio, saved characters, quotes and status. Use generate_image for any needed storyboard, contact sheet, keyframe or intermediate visual; pass the returned URLs into later calls. Use make_ugc only as an optional shortcut when the user wants its server-composed vertical-video result.

User-provided images: offer the upload panel

Before the first generation, call get_account to confirm this connection and read available credits. If get_account is absent from a cached tool catalog, list_models includes the same account check. Then call the matching quote tool with the intended inputs: quote_ugc for make_ugc, or quote for generate_image, generate_video and generate_audio. Compare the quoted credits to the available balance before submitting. A public model catalog or an upload alone does not prove credit readiness. If the balance check is unavailable, retry it; do not assume zero credits or ask the user to pay again. A balance snapshot does not reserve credits or guarantee provider availability. Upload-only requests do not need generation credits. When the user wants to provide a product photo, portrait, screenshot, or image reference, check tools/list. If open_upload_panel is available, offer it first: call open_upload_panel with {}, show its inline panel or returned browser link, and wait for the user to finish. Then call get_uploads with the returned session_id and use the exact ready image_url in refs, first_frame, last_frame, or the matching skill image field. Do not start a reference-dependent generation until the required images are ready. The panel accepts still PNG, JPEG, and WebP, up to 10 images and 25 MB each. Images expire 24 hours after the panel is created; show the returned expiry, request a new upload if expired, and never make a permanent copy. Uploading uses no generation credits. Do not ask the user for base64, shell commands, or a public hosting service; do not continuously poll while waiting for them. Only call these tool names when discovered. If they are missing from the connected tool catalog, call upload_image with {} to open the same panel; use the returned panel: upload_key with upload_image to retrieve images after the user finishes. If that reports the panel is unavailable, use upload_image only for an already accessible file or URL. Do not build an upload page or request a local folder as a substitute for the existing panel. Never invent access to a chat attachment: if you cannot read it, explain that and offer the panel when available. Browser fallback works without inline UI support; do not promise an inline panel in every client. Inspect the native image previews returned with retrieved uploads before describing them or writing image-specific prompts. Never infer what the image shows from an email domain, account metadata, or filename. Use the original URLs for generation, not preview bytes. If the session ID was lost, call get_uploads with {} to list recent sessions, or upload_image with {"upload_key":"panel:recent"} for cached catalogs; retrieve the matching session before asking for re-upload. Account-wide recent uploads may belong to other conversations, so clarify ambiguous selection. Uploading stores an image; it does not attach it to a generation automatically. If the user already requested a generation with these images, continue that request using the returned URLs; do not stop at "upload complete" or ask again whether to use them. If make_ugc fits the requested outcome, pass a person photo as image or a product photo as product_image, then call quote_ugc before spending. Otherwise compose the direct generators: for generate_image, put the relevant image_url values in refs; for generate_video, use refs for product/person/appearance references, or first_frame for animating a still (last_frame only for an explicitly requested ending frame), and never combine refs with frame fields. Preserve the user's intended image roles and model limits; ask only if the role or selection is unclear. Include the URL in the tool arguments, not only in the prompt. Do not substitute a newly generated image for the uploaded reference. If the request was upload-only, report readiness and wait for a generation request; uploading alone does not authorize spending credits. After submitting, poll get_run_status and return the result.

Optional composed UGC loop

  1. Get the full spoken script and the intended person or product. If the user supplied an image, retrieve it from the upload panel and inspect its native preview.
  2. Ask whether captions are wanted. Never turn them on by assumption.
  3. Call quote_ugc with the exact intended make_ugc input. Show the exact credit cost and available balance; nothing has been rendered yet.
  4. After the user approves the spend, call make_ugc with the same input.
  5. Poll get_run_status until the finished video URL is returned, then give it to the user. Do not stop at the submission receipt.

Use image for a person photo, product_image for a product photo, and character for a saved char_… identity. product_image also needs a saved character to hold or wear it. Pass the whole script; never trim it to fit one clip. Skip this workflow when direct tools give the agent a better way to satisfy the request.

Installs
2
GitHub Stars
27
First Seen
Sep 20, 2026