How to stream CrewAI Agent steps and thoughts in a Streamlit app [Code Included]

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024

ความคิดเห็น • 46

  • @firetownplatformfinders3996
    @firetownplatformfinders3996 7 หลายเดือนก่อน +3

    I have been looking for something like this for a while. Thanks you so much for sharing.

    • @tonykipkemboi
      @tonykipkemboi  7 หลายเดือนก่อน

      Awesome! Glad you hear you find it useful. Thank you 🙏

  • @abutispinach
    @abutispinach 7 หลายเดือนก่อน +2

    this was what i been looking for , well description even for us non coders

    • @tonykipkemboi
      @tonykipkemboi  7 หลายเดือนก่อน

      Thank you for the feedback! Glad you find it useful.

  • @Talking2Wall
    @Talking2Wall 4 หลายเดือนก่อน +1

    This is exceptionally clear and easy to understand, Thank you!

    • @tonykipkemboi
      @tonykipkemboi  4 หลายเดือนก่อน

      @@Talking2Wall glad you enjoyed it.

  • @spigg777
    @spigg777 6 หลายเดือนก่อน +1

    Well Done Mister, been playing with the crewai Trip planner, Sreamlit is a great UI am going to it, Asante sana

  • @andydataguy
    @andydataguy 6 หลายเดือนก่อน

    Stoked to see where you take this in the next iteration brother 🙌🏾
    Maybe some interesting hierarchical systems

  • @yuzual9506
    @yuzual9506 7 หลายเดือนก่อน +1

    i will stay tuned, sur!!! thx for your work, i want to developp this for my university for research papers

    • @tonykipkemboi
      @tonykipkemboi  7 หลายเดือนก่อน

      Awesome! Thank you. That would be really cool.

  • @AIdevel
    @AIdevel 7 หลายเดือนก่อน +2

    This is really excellent video , I have been thinking about similar UI to adapt it to automate processes

    • @tonykipkemboi
      @tonykipkemboi  7 หลายเดือนก่อน

      Thank you. Let me know how that goes, good luck!

  • @sircaju
    @sircaju 8 หลายเดือนก่อน

    @Tony, you save my day. I was looking to a example on how to have streamlit and crewAI interaction, not only at the end, but during the process. Very nice demo. I will use it as my default to my experiments. Thanks.

    • @tonykipkemboi
      @tonykipkemboi  8 หลายเดือนก่อน

      Awesome! I am glad to hear you find it useful! I saw a lot of questions around this and decided it was a good idea to work on it. Excited to see what end up building. Let me know if there's any other thing you'd like for me to cover.

  • @ruozhufeng9008
    @ruozhufeng9008 7 หลายเดือนก่อน +2

    Fantastic tutorial!❤

  • @kubaD2000
    @kubaD2000 7 หลายเดือนก่อน +2

    Amazing. Would it make sense and be doable to display agents chat in the st.chat_messages component? So like even each agent would have individual icon and name?

    • @tonykipkemboi
      @tonykipkemboi  7 หลายเดือนก่อน +2

      Thank you! Yes, it is possible. I'll be working on another agent tutorial that will be more updated and use chat as well as a better parsed out agent process.

  • @LuigiLoiacono-v9t
    @LuigiLoiacono-v9t 8 วันที่ผ่านมา

    nice work. you mentioned costs only for gpt (although 3.5 should be free), but what about scraper and BROWSERLESS, they do add costs to use cases?

  • @Vishnu-c2o
    @Vishnu-c2o 5 วันที่ผ่านมา

    looks like the step_callback is not working anymore. Is it a version issue? I'm on 0.76.9

  • @thefutureisbright
    @thefutureisbright 8 หลายเดือนก่อน +1

    Nice tutorial 👍

  • @thealwayssmileguy9060
    @thealwayssmileguy9060 7 หลายเดือนก่อน +1

    Which LLM do you use for the agents? I am curious about the costs

    • @tonykipkemboi
      @tonykipkemboi  7 หลายเดือนก่อน

      I used GPT-3.5 for this demo. Yes, it can be costly if the agents have long running processes. Another alternative is to use local models through Ollama or Groq while it's still free.

  • @yazanrisheh5127
    @yazanrisheh5127 5 หลายเดือนก่อน +1

    Can you show how to integrate human input on streamlit

    • @tonykipkemboi
      @tonykipkemboi  5 หลายเดือนก่อน

      We're thinking the same. Adding human input to Streamlit is challenging due to the nature of the apps running from top to bottom each time there's an intereaction. So if we add human feedback and submit, it will rerun our code again from top to bottom instead of picking up from where we left of. I'm still trying to get it to work and will let you know if I get it working.

    • @yazanrisheh5127
      @yazanrisheh5127 5 หลายเดือนก่อน +1

      @@tonykipkemboi Wouldn't it work if you set it to a session state in this case?

    • @tonykipkemboi
      @tonykipkemboi  5 หลายเดือนก่อน

      @@yazanrisheh5127 it would still not work since it will restart the process from the beginning regardless. It will not save the stage in session state and be able to start from there after human input. I'm still investigating a way to do this that is more cleaner.

  • @pierre-louis4519
    @pierre-louis4519 6 หลายเดือนก่อน

    🤔.... Say that I am a professional who is traveling. Is there any possibility to implement something like : OK I am occupied during this period of time in the day, what can I do before and afterward ?

    • @tonykipkemboi
      @tonykipkemboi  6 หลายเดือนก่อน

      Good question. Yes, you can add that to the box on the sidebar with any special things for context to the agent. Things like your hobbies or anything that you want the agent to be aware of when creating your itinerary.

  • @Guna-nm6be
    @Guna-nm6be 8 หลายเดือนก่อน

    I have a question
    Open ai api key is need

    • @tonykipkemboi
      @tonykipkemboi  8 หลายเดือนก่อน

      Yes, you'll need OpenAI key for this but you can also use Ollama instead if you want to use a local model and reduce/cut out costs. GPT-4 has better results though. I'm actually experimenting with using Groq API to see if I can reduce the latency/wait times of the agents work. Would be much fun to have results much faster and not wait for too long.

    • @kubaD2000
      @kubaD2000 7 หลายเดือนก่อน

      @@tonykipkemboi How about gpt3.5. ? Are there any cons in using it for testing/learning? I think it cost multiple times cheaper than version 4.

  • @phani3519
    @phani3519 27 วันที่ผ่านมา +1

    hey can I pass extra parameters to the callback function lets say I want to save the output in a file, I want to give the filename how can we do it?
    agent = Agent(
    role=task_info.agent.role,
    goal=task_info.agent.goal,
    backstory=task_info.agent.backstory,
    verbose=False,
    llm=get_llm(),
    step_callback=write_callback_to_file(file_path="output.txt")
    )
    def write_callback_to_file(step_output, file_path: str = "output.txt"):
    with open(file_path, 'a') as file:
    file.write("---
    ")
    # some logic I want to do
    can we do something like this?

    • @tonykipkemboi
      @tonykipkemboi  27 วันที่ผ่านมา

      @@phani3519 so the CrewAI codebase has changed quite a lot that I might need to update this code.

    • @phani3519
      @phani3519 27 วันที่ผ่านมา

      @@tonykipkemboi oh that's unfortunate, i tried looking at the documentation but didn't find any leads for the following, anything help would be greatly appreciated

    • @tonykipkemboi
      @tonykipkemboi  25 วันที่ผ่านมา

      @@phani3519 no, I meant I will need to update the tutorial on my end.

    • @nandanayak-f2g
      @nandanayak-f2g 14 วันที่ผ่านมา +1

      @@tonykipkemboi it will be very helpful if you could do that! cheers, thanks for all your work

    • @tonykipkemboi
      @tonykipkemboi  14 วันที่ผ่านมา

      @@nandanayak-f2g coming soon