# Streaming crew.kickoff on streamlit

**URL:** <https://community.crewai.com/t/streaming-crew-kickoff-on-streamlit/5448>\
**Category:** CrewAI Community Support\
**Created:** [April 22, 2025, 9:53am UTC](https://community.crewai.com/t/streaming-crew-kickoff-on-streamlit/5448 "2025-04-22T09:53:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alireza\_Kashani](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/alireza_kashani/32/3313_2.png) [@Alireza\_Kashani](https://community.crewai.com/u/Alireza_Kashani)\
**Post date:** [April 22, 2025, 9:53am UTC](https://community.crewai.com/t/streaming-crew-kickoff-on-streamlit/5448/1 "2025-04-22T09:53:26Z")

</div>

Hi,

I have a streamlit that dump the output of `crew.kickoff` as simple as the following

```auto
if user_input := st.chat_input("Type your question here..."):
    # Add user message to chat history
    st.session_state.conversation_history.append({"role": "user", "content": user_input})

    # Display user message in chat message container
    with st.chat_message("user"):
        st.markdown(user_input)

# # Generate AI response
    with st.spinner("Thinking..."):
        result = crew.kickoff(inputs={
            'conversation_history': st.session_state.conversation_history,
            'user_input': user_input,
            'system_prompt': sys_prompt
        })

# # Display AI response in chat message container
    with st.chat_message("assistant"):
        st.markdown(result)

    # Add assistant response to chat history
    st.session_state.conversation_history.append({"role": "assistant", "content": result})

```

I have spent hours already how to progressively stream the output;  
there is a component offered by streamlit called [st.write\_stream](https://docs.streamlit.io/develop/api-reference/write-magic/st.write_stream); but it expect a generator; I wonder if there is a snippet that can help me to get it to work.

I already have

```auto
llm = LLM(
    model="openai/gpt-4o",
    stream=True # Enable streaming
)

```

and my agent is empowered by that.  
I can see in the console the output is printed as streaming but that’s not the case on `streamlit` itself
