streaming-llm-responses

Stream real-time LLM responses with lifecycle and progress events.

Updated Jan 5, 2026
One-click install
npx skills add https://github.com/hussain9491/hackathone2_phase2_Q4 --skill streaming-llm-responses-hussain9491
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streaming-llm-responses
Source: https://github.com/hussain9491/hackathone2_phase2_Q4/tree/main/.claude/skills/streaming-llm-responses
Command: npx skills add https://github.com/hussain9491/hackathone2_phase2_Q4 --skill streaming-llm-responses-hussain9491

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Real-time streaming UI patterns enable AI chat applications to emit token streams, progress indicators, and dynamic feedback during conversations, improving responsiveness and user engagement. This approach is essential when adding response lifecycle handlers, progress indicators, client effects, or thread state synchronization, and should not be used for basic chat that doesn't require real-time feedback.

Core Features & Use Cases

  • Real-time response lifecycle control with onResponseStart and onResponseEnd to manage UI locks and state during AI generation.
  • Streaming of server-to-client updates via onEffect, ProgressUpdateEvent, and ClientEffectEvent to reflect token progress and UI changes.
  • Client tools and onClientTool to query client state, plus thread lifecycle events (onThreadChange, onThreadLoadStart, onThreadLoadEnd) for stateful conversations.
  • Application patterns across UIs (interactive maps, forms, dashboards) requiring synchronized updates and live feedback.

Quick Start

Configure your chat UI component with onResponseStart/onResponseEnd, onEffect, and onClientTool handlers to stream updates and drive real-time UI.

Frequently Asked Questions about streaming-llm-responses

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stream real-time LLM responses in a chat UI?

To stream real-time LLM responses in a chat UI, configure front-end handlers like onResponseStart and onResponseEnd while the back-end emits ProgressUpdateEvent to push token streams and update the interface live.

What is the onResponseStart lifecycle handler used for in AI chat?

The onResponseStart lifecycle handler manages UI locks and state initialization when AI generation begins. It works with onResponseEnd to control the interface during streaming responses and prevent overlapping interactions.

How to implement server-to-client streaming for progress indicators?

Server-to-client streaming for progress indicators uses onEffect handlers and ClientEffectEvent emissions to reflect token progress and drive dynamic UI changes during active LLM response generation.

Can I query client state during a streaming AI chat response?

Yes, you can query client state during a streaming AI chat response by implementing the onClientTool handler, which enables server-to-client interactions and dynamic state synchronization across threads.

Does real-time streaming UI work for stateful conversations across threads?

Real-time streaming UI supports stateful conversations using thread lifecycle events like onThreadChange, onThreadLoadStart, and onThreadLoadEnd to synchronize state and updates across multiple chat threads.

When should I not use real-time streaming for AI chat?

You should not use real-time streaming for AI chat if your application only requires basic chat functionality without live feedback, progress indicators, or dynamic token updates during generation.