Interactive UI (render_ui)
Myrm ships a declarative UI artifact pipeline: the agent calls render_ui, the server emits a UI_UPDATE SSE event, and the WebUI renders interactive components inline in chat.
Enable the tool
- Open Agent settings in chat.
- Turn on Interactive UI (
render_ui). - On first run with a workspace, the server seeds
.agent/docs/A2UI_REFERENCE.md(full props manual).
A2UI v3.1 behavior
| Topic | Behavior |
|---|---|
| Component whitelist | 23 UIComponentType values (enum SSOT, front + back) |
| Progressive spec | Simple UIs (text + field + button) need no extra read; for table / chart / tabs or 3+ components, the agent should file_read_tool .agent/docs/A2UI_REFERENCE.md first |
| Validation | Fail-closed — unknown type, empty components, invalid graph (root_ids/children), or malformed actions return structured tool errors (no silent skip) |
| User actions | Button / form submissions flow back as UIActionEvent and continue the agent loop |
Delivery pipeline (SSE)
Tool execution may run in a LangGraph child asyncio task whereArtifactContext ContextVars are not visible. Myrm stashes UI artifacts by assistant message_id (run-level bind + post_run pop) so UI_UPDATE SSE still reaches the WebUI before MESSAGE_END. Covered by integration wiring tests and a real LLM agent-stream E2E (not mocked on the critical path).
JSON shape (adjacency list)
vs competitors
| Product | In-chat generative UI |
|---|---|
| Myrm | 23 typed components, SSE artifact, progressive spec, fail-closed validation |
| OpenClaw / Codex / Claude Code | No first-class in-chat form renderer |
| CopilotKit AG-UI | Web protocol catalog (~19 basic widgets); no Myrm-style workspace spec seed + enum gate |
| Hermes | Text suggestions; no structured chat UI artifact |
ask_question_tool instead of building a full UI.
See also: Agent configuration — tool loading.