Dayward AIWeChat Mini Program
All courses

7 days · about 30 hours

Frontend Agent UX in 7 Days: From Streaming to Generative UI

For React developers: in seven days, hand-build an agent workbench in the browser. Align with the open AG-UI protocol and turn a raw event stream into an interface that renders without jank, pauses for approval, replays history, and reads correctly to a screen reader.

Sign in and link WeChat to share one free article per day across both platforms. Unlock more with rewarded videos in the mini program.

Start day one

By the end

A portfolio-ready agent workbench: jank-free streaming, approvable tool calls, collapsible reasoning, replayable state, generated interface blocks, branchable sessions, and correct screen reader announcement

No agent frontend SDK, everything hand-written. Build on the event model of the open AG-UI protocol, then work through streaming performance and stability, tool call visualization and interrupt-based approval, reasoning and shared state, the three generative UI paradigms and their security boundaries, long tasks and session control, and finally accessibility and a performance budget

View account and linked status →7 days · about 30 hours

Week 1

From a Raw Stream to an Accessible Agent Workbench

01
D1🔒 Locked

What Makes Agent Frontends Hard: an Event Protocol and Your First Stream in the Browser

Start with the three things that separate an agent interface from an ordinary chat interface, meet AG-UI as the open event protocol between backend and frontend, then read your first stream in the browser with plain fetch and ReadableStream, and understand why EventSource fails at step one.

02
D2🔒 Locked

Streaming Without Jank: Render Storms, Incremental Markdown, and Scroll Anchoring

Models emit dozens to hundreds of deltas per second, and the naive approach re-renders React on every one of them while dragging down the input the user is typing into. Work through render storms, incomplete Markdown, and stolen scroll position so streaming stays smooth even in long sessions.

03
D3🔒 Locked

Tool Call Visualization and Humans in the Loop: Interruption Is Not Local Interception

Merge the three-part tool call events into a stateful card so users can see what the agent is doing, then implement human-in-the-loop approval and get right the thing most teams get wrong: approval is an interrupt and resume of a run, not a modal the frontend throws up to block a request.

04
D4🔒 Locked

Reasoning and Shared State: a Collapsible Thinking Panel and Incremental Sync

First render the model's reasoning as a collapsed-by-default panel, then introduce what really separates an agent frontend from a chat interface: a state shared with the backend, seeded by full snapshots and updated by JSON Patch, so the interface can show progress that lives outside the transcript.

05
D5🔒 Locked

Three Paradigms of Generative UI: From Component Mapping to Declarative Interfaces

There are three ways to let an agent decide what the interface looks like, handing control progressively from the frontend to the model. Implement all three, focusing on their security boundaries and why the most flexible one is usually the most dangerous in production.

06
D6🔒 Locked

Session Control and Long Tasks: Stopping, Retrying, Branching, and Subagents

Turn one-shot question and answer into a session people can actually work in: stop mid-run, retry after failure, edit and resend the last turn, branch from any point. Then handle progress for long tasks, subagent visualization, and how to resume a cut stream without producing duplicate messages.

07
D7🔒 Locked

Accessibility and Performance Budgets: Making Streaming Interfaces Work for Everyone

Streaming output is a disaster for screen readers, and pointing a live region at the streaming element is both the most common and the most wrong fix. Solve it with sentence-level announcement, set a performance budget for the whole workbench, and package seven days of work into a portfolio project.