Chapter 11: The Worka SDK for A2UI
TL;DR
- Worka v2 uses A2UI, a structured UI schema.
- You build views using SDK builders, not React.
- Views can be static (
init_views) or dynamic (worka_uiresponses). - UI actions call tools with structured inputs.
Worka UI is built around A2UI, a stable JSON schema rendered by the host. The SDK provides typed builders so you can construct UI trees in your language of choice.
A2UI Builders
Use the SDK’s builder API to assemble view trees (rows, columns, text, buttons, forms, etc.). This avoids running untrusted frontend code and keeps UI deterministic.
Static vs Dynamic UI
- Static views are returned from
init_viewsand cached by the host. - Dynamic views are returned inline in tool responses using the
worka_uifield.
UI Actions
Buttons and inputs can trigger tool calls. Actions are defined as structured payloads, and the host routes them to your pack’s MCP tools.
This architecture keeps UI safe, predictable, and portable across desktop and mobile.