Poll A2UI Events
a2ui_poll_eventsRetrieve and consume browser UI events like button clicks and text changes to react to user interactions. Use peek to inspect events without removing them.
Instructions
Poll for UI events from the browser (button clicks, text input, etc.).
Events are consumed when polled (unless peek=true). Use this to react to user interactions.
Event types:
tap: Button was clicked (payload: { action?: string })
change: TextField value changed (payload: { value: string, dataBinding?: string })
Example response: [ { "eventId": "abc-123", "surfaceId": "my_form", "componentId": "submit_btn", "eventType": "tap", "timestamp": 1234567890, "payload": { "action": "submit" } } ]
To enable events on components, set onTap=true (Button) or onChange=true (TextField).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| peek | No | If true, peek at events without consuming them | |
| surface_id | No | Filter events by surface ID (optional, returns all if not specified) |