-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamlit Integration #275
Comments
Here's an example implementation by @amadad: |
The example above shows the final output but not the log messages. Need to be able to have the logs write to st.write_stream somehow. |
@tonykipkemboi do you want tackle this one? Your trip_planner_agent would benefit from this |
Using step_callback=st.write in the agent startup will get you started but there must be a more elegant way. |
|
A complete Streamlit example, with streaming chat showing all agent responses, complete with agent icons, would probably increase usage of CrewAI by 10-30% or more. Can someone just create that? Thanks Modifying the trip planner agent would be a great example. Allowing people to interact with human-in-the-loop agents is also necessary. |
Check out multi-agent-streamlit-ui by @camel-ai for inspiration |
So I played with the trip planner app last night for a few minutes trying to implement the streaming logs on the app under st.status. The challenge lies in redirecting the logger outputs from CrewAI agents into the Streamlit app in a way that allows for near real-time updates. I tried redirecting the logs to the Streamlit UI but that did not work so I ended up modifying the Crewai source code under the utilities/logger.py and was able to get some logs printed on the app but some others (the green log text in console) haven't got to it yet. This is not the best way to do this and maybe I just need a little brainstorming session with @joaomdmoura to get this part working. |
@joaomdmoura it would be great to have your input on this |
I was able to get some of the green log text in the console printed by modifying the agent.py file with the following:
|
This would be a great start. The next step would be to facilitate the human in the loop somehow. @joaomdmoura do you have a plan for this? Are you going to incorporate the change above? Thx |
PR for the suggested change here |
Thanks for getting this out @chrispangg. I barely got time to keep looking into this. |
PR merged - also added an example to the PR for printing steps in Streamlit |
@chrispangg really appreciate you implementing this @joaomdmoura It would be great to see a how-to guide for this streamlit integration |
I want to take human inputs when executing the agents. According to the documentation we can take it from the terminal by enabling hunan_input from the task. But any methods to get it from the streamlit app and give it to the agent? Any method to get user feedbacks while executing the agents? |
It would be great to see Streamlit integration with crewAI so these crews can escape from their terminals, pun intended
Related issue here
The text was updated successfully, but these errors were encountered: