Sidekick’s Improved Streaming Experience - Shopify
Aug 1, 2023

Summary
This post details the technical implementation of an improved streaming experience for Sidekick. It introduces a buffering Markdown parser that uses a finite state machine (FSM) implemented in a Node.js Transform stream to handle ambiguous Markdown sequences, preventing rendering jank. It also describes an asynchronous content resolution and multiplexing strategy using Server-Sent Events, where tool content (referred to as 'cards') is resolved asynchronously and multiplexed into the main LLM response stream. This allows for immediate rendering of the initial LLM response while placeholders are populated with resolved card content, improving perceived performance and user experience.
More from the AI Assistant (Sidekick) Capabilities and Training trail
- Gisting: Compressing LLM Agent context to ↑ throughput and ↓ cost (2026) - Shopify
- Sidekick's continual learning loop (2026) - Shopify
- Building an agentic harness that outlasts the model (2026) - Shopify
- Teaching Sidekick to say no: automated data curation with LLM judge consensus (2026) - Shopify
- Building a Magic Mirror: AI retail experiences with Remix (2026) - Shopify