Level 7 Complete
You’ve mastered production streaming. Your apps no longer deliver just raw text — they provide structured real-time experiences with progress indicators, metadata, smooth output, and robust error handling.
What You Learned
Section titled “What You Learned”- Custom Data Parts: Transport structured data alongside text in the stream —
createDataStream,writeData,mergeIntoDataStream. One channel for text and metadata, synchronous and typed. - Message Metadata: Attach additional information to messages that the LLM doesn’t see — userId, timestamps, session data. Clean separation of content and app data, ideal for persistence and analytics.
- Stream Transforms: Smooth out stuttering streams with
smoothStream()and build customTransformStreampipelines — filter, transform, enrich.experimental_transformas an array for chained processing. - Error Handling: Catch errors in the stream with
onErrorinstreamText(server logging) andtoUIMessageStreamResponse(user message). Typed error classes likeNoSuchToolError, retry with exponential backoff, try/catch as a last fallback.
Updated Skill Tree
Section titled “Updated Skill Tree”Next Level
Section titled “Next Level”Level 8: Workflows — Individual LLM calls are powerful. But what if a task requires multiple steps — research, analysis, summarization? You’ll learn how to build sequential and parallel workflows, implement custom agent loops, and deliberately break out of loops when the result is good enough.