Replies: 1 comment
-
|
Hey @vpm238 , I feel like streaming is more like a UI state. Just like components have a loading or error state, the A2UI shouldn't compromise too much for streaming. The append I proposed is just to cut down on the amount of data transferred. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all 👋 — first-time poster here. I've spent the past few days building A2UI agents on both native (SwiftUI) and the browser (using
@a2ui/lit+ a custom catalog extension), and I kept running into the same three gaps around progressively rendering LLM-streamed data into surfaces. I wrote them up as a small draft RFC with a live, interactive demo, and wanted to share it here for feedback before taking it further.There's meaningful overlap with @Emiyaaaaa's #727 (Incremental Streaming Support via
updateDataModel) — that post was actually the nudge that made me write this up as something shareable rather than vendor-specific notes.The three gaps
Each of these is solvable per-client today, but inconsistent across clients. Today every renderer invents its own answer; I'd like the protocol to nail down a default.
1. Pending state for unresolved bindings
A surface can arrive ahead of its data (skeleton-first).
{path: "/reply/headline"}resolves toundefinedfor a few seconds. Clients render this as blank / spinner / shimmer / error / "null" — whatever the author thought of. Proposal: standardize on a shimmer placeholder as the default behavior, with an explicit opt-out.2. A
streaminglifecycle flag onupdateDataModelWhile a value is mid-stream vs. final, renderers need to know. Typewriter cursor, disabled actions, a11y live-region announcements — all of these want a protocol signal, not a heuristic. Proposal: an optional
streaming: true/falsefield onupdateDataModel.3. An
appendpatch opThis is basically @Emiyaaaaa's #727. Streaming a 10,000-char response today takes ~500 KB on the wire because every delta re-sends the accumulated value. With
append, ~10 KB. I've written it up as part of the same document because it completes the picture with the other two — happy to fold it back into #727 if that's preferred.All three are additive and backward-compatible
v0.9 servers/clients ignore the new fields and keep working. An upgraded client against a v0.9 server degrades gracefully. No breaking changes.
Live demo + implementations
Each proposal has a stage showing the rendered UI on the left and the exact wire messages on the right — poke the buttons, see the effect + the bytes saved.
RFC.md@a2ui/web_core+@a2ui/litwith a custom extended catalog, live at https://vpm238.github.io/a2ui-starter-web/What I'd love feedback on
streamingflag — should it also coverupdateComponents(for progressive tree growth), or is data-only the right scope?Thanks for reading — excited to be part of the conversation.
Beta Was this translation helpful? Give feedback.
All reactions