Forms instead of questions
Instead of asking question after question in chat, the agent builds a small form page from EggAPI components: pick a model, see the price, upload images. You fill it in, and the agent carries on from your input.
Make me an ad image, and give me a form to fill in
when the agent picks itShow the user a small form page instead of asking many questions in chat - compose it from EggAPI's pre-built components with one short JSON description (render_ui), let the user fill it in inside the client or in a browser, then continue from their real input and results. Use when an image or video request needs several choices (product image, brand, selling points, placement, style, model, size, duration, cost), or when the user asks for a form, page, panel or UI (表单、界面、面板、填写页).
The component contract and the full protocol are served by EggAPI itself; this skill only says when and how to use them. Reply in the user's language and label fields in that language.
Tools
The EggAPI MCP server (usually named eggapi) provides get_ui_catalog, render_ui, update_ui, get_ui_state, set_ui_values and run_ui_action. Without MCP, the eggapi CLI does the same with eggapi ui catalog|create|update|state|set|run|wait --json (API key in EGGAPI_API_KEY). If neither is available, send the user to https://eggapi.ai/docs/dynamic-ui.
Workflow
- Call
get_ui_catalogonce per conversation. For a starting point passexample(ad_image,product_main_image,image_to_video), then adapt it: examples are references, not templates to pick from. - Write the smallest page that covers the request: only the fields you still need, grouped in sections, a
model_picker(or a fixed model) with prices, acost_estimateand agenerate_buttonbound to onegenerateaction, plustask_statusandimage_galleryorvideo_preview. Pre-fill anything the conversation already tells you withvalues. - Call
render_ui. If it returnsSCHEMA_INVALID, fix each listed path and call again. - Always give the user
browser_url(it works on any device signed in to their EggAPI account). Ifui_modeisembedded, the page is also shown in the conversation. - Wait for the user. When they say they are done, call
get_ui_stateand continue from the real values, outputs and costs. Do not poll in a loop. - For changes ("add a copy field", "switch to a video ad", "hide the model choice"), send the complete new page to
update_uiwithbase_revision= the latestschema_revision, keeping existing ids so input is preserved. To hide the model choice, bind the action'smodelto{"value": "<current model id>"}and remove the picker. Tell the user whatreconcile.resetorreconcile.removedlists. - Without a browser (SSH, headless): read
fieldsfromget_ui_state, ask for the missing ones in chat, save them withset_ui_values. - Paid generation starts only from the page's button, or from
run_ui_actionafter the user explicitly agreed toestimated_cost_usd; pass that amount asexpected_cost_usd. Use a newsubmission_idper request and reuse it when retrying. If the run returnsestimate_changed, show the new estimate and ask again.
Never
- Write HTML, CSS, React or any code for the page, install dependencies, start servers or run browser tests.
- Put API keys or other secrets in a page, its values or a link.
- Call
run_ui_actionbecause a page is complete: completeness is not consent.
Edit your copy of this file to change the steps, defaults or models; the agent follows your version.