The idea
A full-screen, transparent HTML page lies over the 3D digital human. Only your buttons, sliders and panels are visible and clickable; everywhere else clicks reach the 3D scene. Each control calls an MCP command. Because it is plain HTML, an AI agent can change it while it runs, and you keep several designs as versions.
Binding controls to commands
No script is needed for the common cases:
<div class="ui-panel" data-glass>
<button data-mcp-tool="aimigo.audio.setMuted" data-mcp-input='{"muted":true}'>Mute</button>
<input type="range" min="0" max="100"
data-mcp-tool="aimigo.audio.setVolume" data-mcp-arg="volume" data-mcp-scale="0.01"
data-mcp-get="aimigo.audio.getVolume" data-mcp-get-path="volume" data-mcp-refresh-on="settings">
<input type="checkbox" data-mcp-tool="aimigo.ui.setFullscreen" data-mcp-arg="fullscreen">
</div>| Attribute | Meaning |
|---|---|
data-mcp-tool | command called on click (buttons) or on change (inputs) |
data-mcp-input | fixed input as JSON |
data-mcp-arg, data-mcp-scale | name of the input field that gets the control's value (range/number × scale, checkbox → true/false, others → text) |
data-mcp-tool-on, data-mcp-tool-off | two commands for a toggle |
data-mcp-get, data-mcp-get-path, data-mcp-refresh-on | read the current value into the control at start, after own calls and on these events |
data-mcp-state | set by the runtime during a call: busy, ok, error (style it with CSS) |
data-glass | the panel gets the glass background rendered by the app |
Scripts use AimigoUI.call(command, input) and AimigoUI.on(eventName, fn).
Rules
- The page background stays transparent; put controls into
.ui-panel(or[data-ui]) containers. Everything outside stays click-through. - Clicks run with the role User: bind only commands your end users may use (permissions).
- Designs are stored as versioned variants on the device; one is active. Commands:
aimigo.htmlui.setHtml,aimigo.htmlui.patch,aimigo.htmlui.variants.save,aimigo.htmlui.variants.activate(role Customer).
The complete instructions for an AI designer are the skill html-ui-design-binding (aimigo.skills.get { id: 'html-ui-design-binding' }, see skills).