{"id":44298,"library":"assistant-stream","title":"assistant-stream","description":"assistant-stream is a Python library for building real-time streaming AI assistants with WebSocket connections. Current version is 0.0.32, pre-release, with daily updates. It provides a simple API for streaming text, tool calls, and events from language models directly to frontend interfaces.","status":"active","version":"0.0.32","language":"python","source_language":"en","source_url":"https://github.com/assistant-ui/assistant-ui","tags":["streaming","assistant","websocket","real-time"],"install":[{"cmd":"pip install assistant-stream","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from assistant_stream import AssistantStream","symbol":"AssistantStreamResponse","correct":"from assistant_stream import AssistantStreamResponse"},{"symbol":"create_run","correct":"from assistant_stream import create_run"},{"symbol":"RunController","correct":"from assistant_stream import RunController"}],"quickstart":{"code":"import asyncio\nimport os\nfrom assistant_stream import AssistantStream, create_stream\n\nasync def main():\n    async def stream_handler(event):\n        print(event)\n\n    stream = create_stream(\n        openai_api_key=os.environ.get('OPENAI_API_KEY', ''),\n        model='gpt-3.5-turbo'\n    )\n    assistant = AssistantStream(stream=stream, handler=stream_handler)\n    await assistant.send_message(\"Hello!\")\n\nasyncio.run(main())","lang":"python","description":"Basic asynchronous streaming assistant example using OpenAI."},"warnings":[{"fix":"Wrap code in async functions and use asyncio.run(). Change function calls to await.","message":"In version 0.0.30, the library moved from a synchronous to an asynchronous API. All functions now require asyncio context.","severity":"breaking","affected_versions":"<0.0.30"},{"fix":"Use 'create_stream(openai_api_key=..., model=...)' instead of 'create_stream(api_key=...)'.","message":"The function 'create_stream' changed signature in 0.0.32: parameter 'api_key' renamed to 'openai_api_key', and 'model' parameter added as required.","severity":"breaking","affected_versions":">=0.0.32"},{"fix":"Always pass both 'stream' and 'handler' to AssistantStream constructor.","message":"AssistantStream requires a 'stream' object and a 'handler' async callable. Forgetting to provide both will raise TypeError at runtime.","severity":"gotcha","affected_versions":">=0.0.30"},{"fix":"Replace 'create_assistant' with 'create_stream'.","message":"Function 'create_assistant' is deprecated in favor of 'create_stream' since version 0.0.30.","severity":"deprecated","affected_versions":">=0.0.30"}],"env_vars":null,"search_vec":"'0.0.32':25 'ai':17 'api':36 'assist':2,5,18,52 'assistant-stream':1,4 'build':12 'call':41 'connect':21 'current':22 'daili':30 'direct':47 'event':43 'frontend':49 'interfac':50 'languag':45 'librari':10 'model':46 'pre':27 'pre-releas':26 'provid':33 'python':9 'real':14,55 'real-tim':13,54 'releas':28 'simpl':35 'stream':3,6,16,38,51 'text':39 'time':15,56 'tool':40 'updat':31 'version':23 'websocket':20,53","created_at":"2026-06-07T12:49:27.157342+00:00","updated_at":"2026-06-07T12:49:27.157342+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/assistant-ui/assistant-ui","github":"https://github.com/assistant-ui/assistant-ui","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}