Hackathon demo kit¶
Build a clickable mobile prototype with an agent in minutes, then demo it on an emulator, simulator or phone. This guide covers a starting point (eight template prototypes), the loop for changing them, and a checklist for demo day.
Zero to prototype in 10 minutes¶
- Install AutoMobile and add it to your agent: see Install.
- Boot a device. Ask the agent to start an Android emulator or an iOS simulator, or plug in an Android phone. Prototypes run on Android devices and emulators, and on iOS simulators.
- Pick a template. Ask the agent to show one from the gallery below, for example:
Show
test/fixtures/prototype-spec/valid/template-onboarding.jsonfrom this checkout.
The agent calls the prototype tool with action: "show" and the file’s absolute path as
specPath. To write a spec from scratch, the agent reads the automobile:prototype resource,
the full authoring guide. The prototype tool lists only the spec’s top-level fields; the
agent reads automobile:prototype/spec-schema for the JSON Schema of every node, action and
field. Set AUTOMOBILE_PROTOTYPE_FULL_SCHEMA=1 in the MCP server’s environment to put that
schema in the tool definition instead; an already-running daemon does not need a restart. The server validates every spec the same way whichever form the tool lists.
- Iterate. Describe a change in plain words (“make the checkout button green, add a promo
code field”). On Android the agent updates what is on screen with
patch: content under/data, state under/state, or one node by itsid. On iOS, and for layout or theme changes, it shows the whole spec again; showing the same prototypeidreplaces it in place. - Drive it. Tap through it yourself, or have the agent tap and type with
tapOnandsendKeysusinglayer: "prototype". Every interactive node in the templates has atestTag, so a script can find it.
Template gallery¶
Each template is a complete multi-screen prototype built on a stack: push and pop between
screens, with Android Back and the iOS edge swipe going back. The files live in
test/fixtures/prototype-spec/valid/
and are validated on every change, so they stay valid as the spec evolves.
| Template | Shape |
|---|---|
template-onboarding.json |
Welcome, sign-up form, done. Field checks, a button disabled until valid, requireValid. |
template-feed-detail.json |
Feed of posts from /data with a repeat, pull to refresh, tap a post for its detail. |
template-tabbed-home.json |
Three pages in a pager driven by a bottomNav, plus a pushed settings screen. |
template-checkout.json |
Cart with a quantity stepper, delivery form with select and date picker, confirm sheet. |
template-settings.json |
Switch and radio rows, slider, reset dialog, snackbar. Values persist with storage. |
template-search.json |
Docked search bar, results list, empty state, result detail. |
template-chat.json |
Inbox and a conversation with a list pinned to the newest message and a composer. Android only. |
template-dashboard.json |
Line, bar and ring charts, a week/month switch and a start/stop timer. |
Notes on running them:
- A template that needs something the connected device lacks is refused before anything is
shown, and the error names the missing capability. Update CtrlProxy, or relaunch the iOS app with
launchApp prototype: true, then show again. - Names, posts and prices are placeholders. Ask the agent to replace them, or edit the file’s
dataandstate. - A typed value, a chosen option or a toggle reaches the agent as an event
(
prototypewithaction: "awaitEvent"). The onboarding, checkout and chat templates emitsignup_submit,order_placedandmessage_sent, so the agent can respond live in a demo.
Camera and media concepts¶
These single-flow concepts exercise device capture. A device without the named capability refuses them like any other template.
| Concept | Shape |
|---|---|
concept-voice-note.json |
Record, stop and review a voice note’s duration. Needs audioRecorder and microphone permission; emits voice_note_recorded. |
On an emulator or simulator, grant the microphone with setAppPermissions and feed a known WAV
with injectAudioInput before tapping Record.
Demo-day checklist¶
- Run offline. A prototype with no
requestactions needs no network. Save it on the device so it runs without the laptop. On Android,prototypewithaction: "save"andpin: truepins it to the launcher. With ProtoViewer installed on an Android device or iOS simulator,saveimports it into the ProtoViewer library, andaction: "open"with the returnedlibraryIdlaunches it. An iOS simulator gets a standalone app icon fromsave. - Hand the prototype to judges and teammates.
prototypewithaction: "share"and the samespecorspecPath(plusassets) writes a.automobile-protobundle on the laptop. It returnsshare.bundlePathandshare.sha256. Upload that file unchanged to any static https host you control, such as a release asset, a gist raw URL or object storage. Then callshareagain withurlset to where it is served. - The result adds
share.link(automobile-proto://import?url=…&sha256=…),share.qrPngPathandshare.qr(the QR drawn in the terminal). urlmust be https with no credentials or#fragment. AutoMobile refuses a URL whose link is too long for a phone camera to read withinvalid_url.- AutoMobile uploads nothing, and links do not expire.
- An Android ProtoViewer with URL import shows the host and hash, then opens the scanned link. It refuses a download whose hash differs. Until then, and on iOS, send the bundle file itself and open it in ProtoViewer.
- Stream to a projector. Follow WebRTC streaming to send the device screen to a browser.
- Record the submission video.
videoRecordingwithaction: "start"before you begin andaction: "stop"after.qualityPresetandmaxDurationbound size and length. - Snapshot before the pitch.
deviceSnapshotwithaction: "capture"and asnapshotNameonce the device is in its ready state. If the demo breaks,action: "restore"with the same name. SetuseVmSnapshot: trueon an emulator for a full restore. - Script an autopilot fallback. If live typing is risky, run the walkthrough with
executePlan:
name: demo-autopilot
platform: android
steps:
- tool: prototype
action: show
specPath: /absolute/path/to/template-onboarding.json
- tool: tapOn
layer: prototype
selector:
testTag: welcome_start
- tool: tapOn
layer: prototype
selector:
testTag: name_field
- tool: sendKeys
commands:
- action: type
text: Ada
- tool: observe
label: Capture the sign-up screen
- Rehearse timers.
prototypewithaction: "simulate"andadvanceTimeMsmoves prototype timers forward without waiting, so the dashboard timer can be shown mid-run on demand. It also moves a mock backend’s scripted actors ahead, so a bot reply lands on demand.
Known limits¶
- iOS prototypes run on simulators only today.
patchis Android only. iOS does not advertiseprototype_patch_v1, so every change there is a fullshowwith the sameid.- The spec is a closed vocabulary: a fixed set of node types and actions, with limits on size,
depth and counts. There is no custom code and no arbitrary views. The
automobile:prototyperesource lists every node, action and limit. - Some features are not on every platform; for example the chat list is Android only. The refusal message names what is missing.
requestactions call real endpoints. A copy imported into ProtoViewer keeps requests off until you allow network in the app.
After the hackathon¶
Turn a prototype into part of a real app with the published renderer libraries: see Embedding a prototype in an app.