assistant-stream
What it is and what it does
assistant-stream is a Python package that adds server-side streaming capabilities to Starlette-based backends, designed to work with the assistant-ui React library for building AI chat applications. It handles the server-side mechanics of streaming responses from language models or AI backends to connected clients in real time, complementing the React frontend's ability to display streaming messages as they arrive.
The package sits in the backend layer of an AI chat stack: you use it to stream responses from your LLM or AI service through a Starlette web server to the browser. It abstracts away the complexity of managing persistent connections and chunked response delivery, letting you focus on the business logic of generating chat responses. With only Starlette as a runtime dependency, it has minimal install friction and integrates into existing Python web applications.
Use it for:
- Stream LLM responses in real time from a Python backend to a React chat interface without waiting for the full response to generate.
- Build a production chat service where users see tokens or message chunks arrive progressively, improving perceived responsiveness.
- Integrate with Vercel AI SDK or LangGraph backends to stream tool calls and structured outputs to the frontend as they execute.
- Add streaming to an existing Starlette application without replacing the entire web framework or rewriting request handling.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides server-side streaming support for AI chat applications built with Starlette, enabling real-time message delivery to React frontends.
Yes, if you are building a Python backend for an AI chat application using Starlette and need server-side streaming. The package has low install friction, active maintenance, no known vulnerabilities, and a permissive MIT license. It is a focused tool for a specific use case (streaming responses to assistant-ui frontends) rather than a general-purpose library, so install it only if you are actually building that stack.
Install
assistant-stream on PyPI
pip
pip install assistant-streamuv
uv add assistant-streampoetry
poetry add assistant-streamInstalling assistant-stream
Before you install
Low friction install with a single runtime dependency (starlette). Active maintenance with recent releases; last commit 2026-08-14 and 11656 GitHub stars indicate ongoing development.
License in practice
MIT license permits commercial and private use with minimal restrictions; permissive treatment means you can integrate this into proprietary applications without licensing obligations.
Quickstart
pip install assistant-stream
from assistant_stream import StreamingResponse
from starlette.applications import Starlette
app = Starlette()
@app.route('/chat', methods=['POST'])
async def chat(request):
return StreamingResponse(generate_stream())
Requires Python 3.10 or later (package specifies >=3.10,<4.0).
Verify before relying
- Whether this package provides the complete streaming infrastructure or is a thin wrapper around Starlette's native streaming capabilities.
- What specific streaming protocol or format (SSE, chunked transfer, etc.) is used for message delivery.
- Whether integration with the React assistant-ui library requires additional setup beyond this package.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — starlette |
| Maintenance | actively maintained — 10 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 91,292/month — #13,527 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: assistant_stream-0.0.36-py3-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
sse-starletteProvides Server-Sent Events streaming for…
permissive · top 1,000 on PyPI
omnigent-ui-sdkProvides terminal UI components built on Rich…
unclear · top 15,000 on PyPI
vannaVanna converts natural language questions into…
permissive · top 15,000 on PyPI
livekit-plugins-openaiIntegrates OpenAI's Realtime, Responses, LLM,…
permissive · top 5,000 on PyPI
livekit-plugins-googleIntegrates Google Cloud AI services (Gemini,…
permissive · top 5,000 on PyPI
shinychatshinychat provides a chat UI component for…
permissive · top 15,000 on PyPI
agent-framework-chatkitBridges Microsoft Agent Framework agents with…
permissive · top 15,000 on PyPI
ag-ui-langgraphBridges LangGraph agent workflows to the AG-UI…
permissive · top 15,000 on PyPI
pipecat-ai-prebuiltProvides a lightweight, ready-to-use web UI for…
permissive · top 15,000 on PyPI
uipath-langchain-clientProvides LangChain-compatible chat models and…
unclear · top 15,000 on PyPI