A2a Assets
Documentsa2a-assetsA2a Assets is an Agent Skill for documents published in the BuilderIO/agent-native repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use Assets from other apps or MCP hosts to generate, refine, export, and insert brand images or videos.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/BuilderIO/agent-native/blob/HEAD/templates/assets/.agents/skills/a2a-assets/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/a2a-assets, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Assets MCP Tool
Use the Assets MCP tool surface when another app or external host needs brand
imagery, video, or reusable source media and Assets owns the library. Prefer the
pure MCP generate-asset flow for human-in-the-loop generation because it can
return the inline picker. A2A remains useful for unattended cross-app
delegation, but A2A replies cannot render MCP App pickers.
Caller Flow
- For human selection, call
generate-assetwith the brief,callerAppId, andlibraryIdwhen known. It will match the library, generate candidates, and return the Assets picker filtered to the new run IDs. - For unattended A2A-style work, call
match-libraryorlist-librarieswhen the library is ambiguous, then callgenerate-image-batchwith one slot per destination, such as one hero per slide. Passsource: "a2a"andcallerAppIdwith the calling app id (slides,design,content,mail) so the Assets audit log can group cross-agent generations. - Treat image batches as complete when the action returns. Use returned
successful
imagesentries directly; only regenerate slots that returnedok: false. - For social/blog/diagram slots, call
list-generation-presetsand pass the matchingpresetIdso output rules travel with the run. - When a human designer needs to continue the work, create or update a
generation session and preserve the returned
sessionId. - For video, call
generate-videoand thenrefresh-generation-rununtil the run completes. - Preserve returned
assetId,runId,previewUrl,downloadUrl, andembedPathexactly. - Insert chosen/exported URLs into the caller's artifact. Design callers should
call
insert-assetafter the picker returns a selected asset. - On feedback, call
refine-imagewith the priorassetId,source: "a2a", and the samecallerAppId, then replace only the affected destination.
Audit Trail
Every Assets generation writes an image_generation_runs row with the prompt,
compiled prompt, model, aspect ratio, references, source app, owner, org, status,
error, output assets, and refinement lineage. Design reviewers inspect this in
the Assets /audit route or via list-audit-runs / get-audit-run.
Preview Rules
Use same-origin embed fences only when the caller can render the Assets route.
Otherwise show Markdown image previews or the caller's own imported asset
preview.