How to Create Agent Swarms With the NEW OpenAI Assistants API

Поделиться
HTML-код
  • Опубликовано: 16 июн 2024
  • Build your own AI dream team and take control with OpenAI's new Assistants API. 🤖✨
    📝 Colab: colab.research.google.com/dri...
    🚀Custom AI Solutions: www.vrsen.ai/
    🤝Need help with your next AI project? calendly.com/vrsen/ai-project...
    🐦Twitter: / __vrsen__
    Into - 0:00
    Building Assistant Swarm - 0:37
    Testing Autogen 2.0 - 5:58
    Future Improvements - 7:53
    Adding New Agents - 8:43
    Conclusion - 9:25
    About: Learn how to create Agent Swarms using the new OpenAI Assistants API! Watch as we recreate AutoGen from scratch with just a few functions, featuring a stock price chart example. Discover how this highly controllable and customizable system is deployable in production. Stay tuned to find out how to add your own agents and explore the future improvements in this fascinating video tutorial.
  • НаукаНаука

Комментарии • 123

  • @agentDueDiligence
    @agentDueDiligence 7 месяцев назад +15

    Its amazing to see youtubers popping up left & right for creating some sort of agent-system by their own.
    Thank you for sharing! Very nice approach to the problem. I really like your setup, because unlike others it is easier & more transparent!!
    Best wishes, earned a sub.

  • @alive65
    @alive65 7 месяцев назад +14

    I just can’t fathom what kind of power these tools hold. I don’t see what is stopping us from creating a virtually infinite amount of online businesses that run with these agents as employees. I mean if their runrates are cents on the hour with a few thousand dollars you could test and validate hundreds of business models through cold outreach and optimise each one iteratively. Are you planning on making such an automation of automation? Since I noticed you spoke about making an open source software that uses agents to create agents, I’m sure this idea has popped up in your mind as well

    • @Don_Ocasio
      @Don_Ocasio 7 месяцев назад +4

      This is exactly the idea I had in mind when I saw chatdev but it didn't occur to me to do just use the agents to test and validate as many business ideas as possible. I want to create agents that are virtual employees, including the CEO and I would be the business owner and the human in the loop making sure everything is running smoothly.

    • @32zim32
      @32zim32 7 месяцев назад +2

      Who will buy goods if people will lost their jobs because of ai agents?

    • @vrsen
      @vrsen  7 месяцев назад +7

      Working on this project right now. Anyone would be able to create their own agency using agent swarms

    • @whatyoumissed9994
      @whatyoumissed9994 6 месяцев назад

      so you will die of hunger because an AI managed the grocery data table?@@32zim32

    • @HenryAmetistainfantil
      @HenryAmetistainfantil 2 месяца назад

      gi

  • @GeobotPY
    @GeobotPY 7 месяцев назад +8

    Literally blown away by the value of this!

  • @ozomateo
    @ozomateo 6 месяцев назад +1

    Dude, this was great. Awesome work, and kudos for both finding and dedicating the time to work on all this. Will be following along closely!

  • @juliovac2113
    @juliovac2113 6 месяцев назад +2

    this just worked better than anything!!! Insane, would love to make it able to learn to create additional tools and coordinate the team. The possibilities!!!

  • @michalbiros6221
    @michalbiros6221 7 месяцев назад +1

    You are a genius! Honestly, this is the only channel I need to subscribe....Please continue in this topic.

  • @hochiminimal2345
    @hochiminimal2345 6 месяцев назад

    Thanks so much for the great video explaining the possibility of autonomous AI assistant swarms! I appreciate you taking the time to clearly and concisely walk through how these assistants work together to accomplish tasks. Your step-by-step examples really helped illustrate the collaboration and decision-making processes. Keep up the excellent work and please continue putting out more content on the topic! I would be really interested to learn how to create an assistant that can create other assistants and tools. Stay awesome and always remember that knowledge is power ;)

  • @keithprice3369
    @keithprice3369 7 месяцев назад

    +1 for expanding on this concept and project. It has so much potential!

  • @BruceChouTW
    @BruceChouTW 7 месяцев назад +1

    This is the best video of showcasing usable AI agents in the production. It’s very detailed and intuitive.

    • @vrsen
      @vrsen  7 месяцев назад

      Glad it was helpful!

  • @justhuman9551
    @justhuman9551 7 месяцев назад +11

    Literally , 10/10 video and quality.
    Everything is on point and the editing is exellent. keep up the great work!
    P.S. i hope you actually continue working on the agent swarms idea and project and make it open source cuz its a interesting topic and powerfull tool if done correclty.

    • @vrsen
      @vrsen  7 месяцев назад +1

      Yes, I will!

  • @danielmartinezdev
    @danielmartinezdev 7 месяцев назад +6

    Awesome video, honestly you deserve more views haha, super concise and high value

    • @vrsen
      @vrsen  7 месяцев назад

      Thanks, man!

  • @bwilliams060
    @bwilliams060 6 месяцев назад +1

    I keep coming back to this video! Would love to see you build on this with more agents and get you take on ways to manage the level of human via the Assistants API. Perhaps considering retrieval and vectorstore memory? I'm going to try to build this into a Chainlit app. Cheers!

  • @caseybates4792
    @caseybates4792 7 месяцев назад +1

    Great video. And Colab. Thank you so much for this. Would love to see this turned into an open source project.

  • @TheAcSstudio
    @TheAcSstudio 6 месяцев назад +1

    this is amazing! I want to implement a single persistant thread to have multiple agents running multiple aspects of my personal life.. Its only a dream as i dont know how to code but saw some amazing things these days

  • @REveritt
    @REveritt 7 месяцев назад

    Absolutely excellent technical explanation - He makes it look easy

  • @jeromeserre
    @jeromeserre 7 месяцев назад +2

    🤯🤯🤯🤯🤯
    Reminds me of this 🤯 "robots building robots" moment in Star Wars. Applied recursively it has mind-blowing potential!
    Subscribed to your channel, you're excellent at simplifying/explaining!

  • @magicismagic123
    @magicismagic123 7 месяцев назад +2

    please never stop creating videos! SUPER GOOD!

    • @vrsen
      @vrsen  7 месяцев назад

      Of course, I won’t)

  • @eitanpython4891
    @eitanpython4891 7 месяцев назад

    Amazing video! I stumbled upon this video, and thought for sure that you'd have more subs. Hope you get the attention you deserve!

  • @MMABeijing
    @MMABeijing 7 месяцев назад

    First time see ur videos, immediate sub, no hesitation. Very good job Sir

  • @ChileNoAutogolpe
    @ChileNoAutogolpe 3 месяца назад

    Great video, I am not a programmer but a creative / psychologist type, I have developed the zero metaphor as an evolutionary concept, intially started as an emotion regulation concept, and later turned into a conceptual algorythm. More to the point, evolutionary concepts are problem solving based, where "0" represents problem resolved. This is an integral concentric idea that is both eco friendly and non-aggressive, ensuring balance. I would post more here but is not the place. Thanks again

  • @Mr6499
    @Mr6499 7 месяцев назад +1

    There is some serious content here! Great Work Arsenii, and thank you for sharing.

    • @vrsen
      @vrsen  7 месяцев назад +1

      Thank you for watching! I appreciate your support

  • @jaysonp9426
    @jaysonp9426 7 месяцев назад +1

    New subscriber! Great content man. Also 100% about scaling small AIs together instead of just one big centralized model.

    • @vrsen
      @vrsen  7 месяцев назад

      I agree)

  • @RadThings
    @RadThings 7 месяцев назад +2

    Love this video! Best explanation of swarm of agents!

    • @vrsen
      @vrsen  7 месяцев назад

      Glad it was helpful!

  • @OscarTheStrategist
    @OscarTheStrategist 7 месяцев назад +3

    New subscriber. Would be awesome to see an open source project from you and a video showcasing the "agent creator agent". Thanks for the work you put in!

    • @vrsen
      @vrsen  7 месяцев назад +1

      Noted!

  • @KaranThukral15
    @KaranThukral15 7 месяцев назад +1

    I really appreciate how you simply explained the entire assistant API workflow. I’m dont know anything about coding but i was still able to follow through!
    One question: Can you have a function to get an already created assistant? And then start thread? I dont want to create assistant everytime i start a conversation.
    Sorry I’m really new to this and using a low code platform. Thank you

    • @vrsen
      @vrsen  7 месяцев назад +1

      Yes, I should have added this to the notebook. Great suggestion. Thank you

  • @____2080_____
    @____2080_____ 5 месяцев назад +1

    I’m totally excited about agency swarm.

  • @GeorgeTrialonis
    @GeorgeTrialonis 6 месяцев назад

    Great video. I have a lot to learn from this, to say the list. Bravo! Excellent! Do more such videos!

  • @leonvanzyl
    @leonvanzyl 7 месяцев назад +2

    Very cool video and well explained. Keep going dude.

  • @employaiptyltd
    @employaiptyltd 7 месяцев назад

    Wow! Thanks for explaining this.

  • @OyvindSOyvindS
    @OyvindSOyvindS 7 месяцев назад +1

    Wow! That was a really good, no nonsense video. Very instructive. What do you think of David Shapiros approach to agent swarms? He goes for a more hierarcical approach, where agents create agents.

    • @vrsen
      @vrsen  7 месяцев назад

      I greatly respect him and his approach, but I believe for now we should be focusing on more practical ways to use them with some additional guardrails and controls.

  • @webdancer
    @webdancer 7 месяцев назад +1

    Very cool video. Liked and subscribed.
    AGI: 1 super-intelligent model controlling thousands of smaller models & tools

    • @AndrejsKarpovs
      @AndrejsKarpovs 7 месяцев назад

      Agents are relying on LLMs anyway.

  • @walberc
    @walberc 6 месяцев назад

    Great video as always. In the tests I did, I noticed that the response is a little slow. Is it something related to the API? Is there any way to make it a little faster?

  • @Evox402
    @Evox402 7 месяцев назад +8

    As always awesome Video :)
    I'd really like to see the VrsenGPT OpenSource project with multiple agents 😊
    Could you say, that a Thread is basically the chat memory?
    And can multiple assistants share one thread? For example, if we'd have a UserProxy, a coder and a reviewer and the user asks the coder to do something which should in turn ask the reviewer for feedback. Is it possible to have the coder-reviewer loop in a different thread which gets deleted later on than the user-coder interaction? Or if you add a uTester to the second thread so that the 3 of them interact via one thread and the user with via another? If yes, how would you chain this together?

    • @xsploit
      @xsploit 7 месяцев назад

      pls

    • @vrsen
      @vrsen  7 месяцев назад +1

      Yes, thread is chat memory. I believe they can be shared, but the best way to allow multi-agent conversations is through functions. Otherwise, it will be extremely confusing to determine who is who for the model. I am working on this capbility for the open source version of this project.

    • @Evox402
      @Evox402 7 месяцев назад

      @@vrsen Thanks for the answer, I'm looking forward to the project :)
      I was just thinking that there may be cases where the ManagerAssistant doesn't need the whole conversation of a Coder and a reviewer, its just interested that a certain file was created and is now available for following task. There maybe a separate thread for the CodeReview process would be smarter than to put everything in one Thread which at some point gets truncated?

  • @vazquezsebastian9764
    @vazquezsebastian9764 7 месяцев назад

    would love to see this evolve

  • @Grazh0per
    @Grazh0per 7 месяцев назад

    I tip my hat to you sir!
    Subscribed

  • @Daniel-xh9ce
    @Daniel-xh9ce 3 месяца назад +1

    great video thanks a lot !!!

  • @TheNexusDirectory
    @TheNexusDirectory 7 месяцев назад +1

    This channel is gonna blow up

  • @aimademerich
    @aimademerich 7 месяцев назад

    Phenomenal, thank you 🙏🏽

    • @vrsen
      @vrsen  7 месяцев назад

      Glad it was helpful! Have fun!

  • @danield.7359
    @danield.7359 6 месяцев назад

    Huge creative thoughts injection!

  • @colinadevivero
    @colinadevivero 6 месяцев назад

    Excellent work.

  • @newjx
    @newjx 7 месяцев назад

    I definitely want to see how an agent can create other agents and tools

  • @ViensVite
    @ViensVite 5 месяцев назад

    Phenomenal work

  • @PeterFletcherDNADeliverer
    @PeterFletcherDNADeliverer 7 месяцев назад

    Great video buddy!

  • @safaros38
    @safaros38 7 месяцев назад +1

    Great fucking content I have been trying this even before assistants came out with autogen but 8K token and memory where an issue. Assistants & 128k context fixed all that and now this is the last piece! TY!
    FYI Autogen has added assistant support but it's not too robust yet it's in beta package but it's pretty awesome. I was just planning on waiting for that to be my solution.

    • @vrsen
      @vrsen  7 месяцев назад

      Nice, thanks for the info

  • @sephirothcloud3953
    @sephirothcloud3953 7 месяцев назад

    Wow, you are great. Can your project also helps the repository of David shapiro on Agi?

  • @rafael_tg
    @rafael_tg 7 месяцев назад

    Very nice video man. Thanks for the content. Any idea how to create an efficient web scrapper and browser automation agent? As webpages' htmls are very long, they can reach context window and use too many tokens

    • @vrsen
      @vrsen  7 месяцев назад

      Yeah, that’s true. I think openai uses some form of pagination with web browsing, where the model has a capability to scroll pages

  • @shaunpx1
    @shaunpx1 6 месяцев назад

    That was a great video thank you. I do have a question what would you propose for building agents that that can access the internet to call API do post and get request bring back data to infer it. I am working on a project that is answer / question where the bot has list of predefined questions I.e (name, age, phone, address,etc) in witch it gathers data from the user instead which I have working very well. I would like to take that basic info to process. it via the APIs Do you think this is feasible with this proposed agent structure as opposed to function calling? thank for ant feedback.

  • @hedgefund996
    @hedgefund996 7 месяцев назад

    Good Educational Content

  • @Canna_Science_and_Technology
    @Canna_Science_and_Technology 7 месяцев назад +1

    FYI there is a failure of direct retrieval with GPT-4 using the new OpenAI Assistant API. GPT tokenizes text and creates its own vector embeddings based on its specific training data. The new terms and sequences may not connect well to the pretrained knowledge in GPT's weight tensors.
    There was no semantic similarity between the new API terms and GPT's existing vector space. This is a fundamental issue with retrieval augmentation systems like Rag - external knowledge is not truly integrated into the model's learned weights. Adding more vector stores cannot solve this core problem.
    The solution is to have multiple learned "knowledge planes" with trained weight tensors for specific tasks that can be switched in. This is better than just retrieving separate vector representations.

    • @vrsen
      @vrsen  7 месяцев назад +1

      Interesting, I will test this out. Thanks

  • @hamizahmed9270
    @hamizahmed9270 6 месяцев назад +1

    how can you further add new agents to this one? How would user proxy call them?

  • @ew3995
    @ew3995 7 месяцев назад

    this is awesome is it only possible to user openai models for this.? or can you also include local models

    • @vrsen
      @vrsen  7 месяцев назад

      Only OpenAI. I would not recommend creating agent swarms with any other models, because no OS models currently support function calling.

  • @intellect5124
    @intellect5124 6 месяцев назад

    Bravo!. im just looking to run open ai assistant by ingesting my docs, pdf, html file bt from your video i to some other ideas. however can u also drop a video for webbased Swarm

    • @magicismagic123
      @magicismagic123 6 месяцев назад

      im still learning, but can you tell me what kind of use cases (real world ones) I can have with agent swarms?

  • @Kivalt
    @Kivalt 7 месяцев назад

    As I was going through the code, I realized that the class SendMessage accesses two variables initialized in an outside context: "agents_and_threads" as well as "client." I was considering passing them through the __init__ during class initialization, but it seems that the code doesn't instantiate the class:
    user_proxy_tools = [SendMessage]
    tools=[
    {"type": "function", "function": SendMessage.openai_schema},
    ]
    Is there no way then to encapsulate SendMessage and such classes derived from OpenAISchema properly?

  • @javierefedos
    @javierefedos 7 месяцев назад

    I didnt understand anything. but you explained it really well. haha

    • @vrsen
      @vrsen  7 месяцев назад

      Lol, I tried

  • @playboy71322
    @playboy71322 7 месяцев назад +1

    I would love to see how we can create a 'tool maker gpt/assistant' so when there is a task needed it can create and configure an assistant for that job and add it to the chat until its job is completed an no longer needed.

    • @vrsen
      @vrsen  7 месяцев назад +1

      Yes, I am working on setting up an Open Source project. We will work on adding this gradually

  • @iphoneopengles
    @iphoneopengles День назад

    did you have to install yfinance ahead of time? because your agent doesn't have access to terminal, hence it wouldn't be able to install it on its own, right?

  • @user-cg1hh2wo3e
    @user-cg1hh2wo3e 4 месяца назад

    That’s great.
    Question: How can I find there is no temperature for openai api assistants, so how can I make answers of this system more deterministic ?

    • @vrsen
      @vrsen  4 месяца назад +1

      Unfortunately, there is no way to adjust the temperature. We have yet to see why openai has decided to do so.

    • @user-cg1hh2wo3e
      @user-cg1hh2wo3e 4 месяца назад

      Thank you, @vrsen, for the answer. I have a few questions:
      - Regarding the use of `custom_tools + files`, is there a way to use custom tools and files together? I encountered this error: 'file_ids are only supported if retrieval or code_interpreter tools are enabled.' In your system it's available, how I can see.
      - Concerning communication between agents, suppose the first agent retrieves some data that I need to use in the code_developer agent. One option is to use the main agent for transferring the data, and another is to send the data from the current agent (maybe these are wrong ways). Are there any other stable methods or best practices for doing this?
      - Lastly (perhaps), how can I create an agent for various API calls (specifically for APIs that cause GPT to start hallucinating)?

  • @parkerrex
    @parkerrex 7 месяцев назад

    This is pretty cool.

    • @vrsen
      @vrsen  7 месяцев назад

      Thanks man!

  • @Kivalt
    @Kivalt 7 месяцев назад

    Would adding more custom agents to this implementation cause the user proxy assistant to call each of those agents in a row, or does it decide if/when one of them needs to be called?

    • @iphoneopengles
      @iphoneopengles День назад

      my thinking is you want to prompt the user proxy to use it's judgement to decide which is the appropriate agent to send messages to, depending on the user query. it won't automatically just call every agent in a row

  • @cathy123183
    @cathy123183 7 месяцев назад

    I love it.......

  • @py_man
    @py_man 7 месяцев назад

    Thanks ❤

    • @vrsen
      @vrsen  7 месяцев назад

      Thanks for watching!

  • @MGeeify
    @MGeeify 7 месяцев назад

    Could you maybe give an overview as to wether Autogen ist still a useful tool or wether on should stick to the Assistants API?

    • @vrsen
      @vrsen  7 месяцев назад +2

      Unlike Assistants API, I wouldn't recommend running autogen in production. Assistants allows you to have a lot more control

    • @MGeeify
      @MGeeify 7 месяцев назад

      @@vrsen So would you say that there's nothing I would be able to do with Autogen, that isn't doable with Assistants API? I'm about to deep delve now into it and don't understand the nuances yet

  • @ghostwhowalks2324
    @ghostwhowalks2324 7 месяцев назад

    This seems to be the future of agents however how does one prevent malicious behavior of the agent. How can you stop an agent from getting poisoned input and generating code which for example can upload sensitive data to a pastebin ?

  • @M60studio
    @M60studio 7 месяцев назад

    nice one :)

  • @dappster
    @dappster 7 месяцев назад

    Keep it up

  • @shemkipruto4394
    @shemkipruto4394 4 месяца назад

    Are there no code tools that can do this?

  • @satriavi
    @satriavi 7 месяцев назад

    Liked and subscribed

    • @vrsen
      @vrsen  7 месяцев назад

      😊

  • @lucianogutierrez7676
    @lucianogutierrez7676 7 месяцев назад

    Fire

  • @newjx
    @newjx 7 месяцев назад

    any chance to integrate code interpreter and vision?

    • @vrsen
      @vrsen  7 месяцев назад +1

      Code interpreter - yes, you can have this out of the box simply by adding "tools": [
      {
      "type": "code_interpreter"
      }
      ],
      Vision API unfortunately does not support tools yet

    • @newjx
      @newjx 7 месяцев назад

      @@vrsen thank you.. Great work btw I've tested both autogen and your way and I can say your way is much better.

    • @newjx
      @newjx 7 месяцев назад

      @@vrsen sorry one more question, each type I run the code in my openai assistant tab the user proxy and code assistant are created over and over again. how do we make sure that we use the same assistants?

  • @corvox2010
    @corvox2010 Месяц назад

    Can we use local llms?

    • @vrsen
      @vrsen  Месяц назад

      Soon 😉

  • @andrewflewelling4294
    @andrewflewelling4294 7 месяцев назад

    Rumble in the (Ro) tunda!

  • @shemkipruto4394
    @shemkipruto4394 4 месяца назад

    Is there a no code way to do this?

  • @jayday9223
    @jayday9223 5 месяцев назад

    😎🍻

  • @TheDeeStain
    @TheDeeStain 7 месяцев назад

    Isn't the exact same thing as auto gpt that has been out for like 8 months?

  • @danielsddonan8384
    @danielsddonan8384 7 месяцев назад

    Can I pay someone to set this up for me

    • @vrsen
      @vrsen  7 месяцев назад

      I bet you can)

  • @brytonkalyi277
    @brytonkalyi277 7 месяцев назад +1

    °• I believe we are meant to be like Jesus in our hearts and not in our flesh. But be careful of AI, for it is just our flesh and that is it. It knows only things of the flesh (our fleshly desires) and cannot comprehend things of the spirit such as peace of heart (which comes from obeying God's Word). Whereas we are a spirit and we have a soul but live in the body (in the flesh). When you go to bed it is your flesh that sleeps but your spirit never sleeps (otherwise you have died physically) that is why you have dreams. More so, true love that endures and last is a thing of the heart (when I say 'heart', I mean 'spirit'). But fake love, pretentious love, love with expectations, love for classic reasons, love for material reasons and love for selfish reasons that is a thing of our flesh. In the beginning God said let us make man in our own image, according to our likeness. Take note, God is Spirit and God is Love. As Love He is the source of it. We also know that God is Omnipotent, for He creates out of nothing and He has no beginning and has no end. That means, our love is but a shadow of God's Love. True love looks around to see who is in need of your help, your smile, your possessions, your money, your strength, your quality time. Love forgives and forgets. Love wants for others what it wants for itself. Take note, true love works in conjunction with other spiritual forces such as patience and faith (in the finished work of our Lord and Savior, Jesus Christ, rather than in what man has done such as science, technology and organizations which won't last forever). To avoid sin and error which leads to the death of our body and also our spirit in hell fire, we should let the Word of God be the standard of our lives not AI. If not, God will let us face AI on our own and it will cast the truth down to the ground, it will be the cause of so much destruction like never seen before, it will deceive many and take many captive in order to enslave them into worshipping it and abiding in lawlessness. We can only destroy ourselves but with God all things are possible. God knows us better because He is our Creater and He knows our beginning and our end. Our prove text is taken from the book of John 5:31-44, 2 Thessalonians 2:1-12, Daniel 7-9, Revelation 13-15, Matthew 24-25 and Luke 21. Let us watch and pray... God bless you as you share this message to others.

  • @metaphysicalfuck
    @metaphysicalfuck 7 месяцев назад

    Very informative but PLEASE stop every now and then for a breather
    If you say or read what you need to say all in a single line it sounds very monotone and lord knows 2023 human brains cannot consume more than 50 seconds of content like this lol

  • @klammer75
    @klammer75 7 месяцев назад

    Awesome! Keep going!!🥳🤩🦾

  • @chukypedro818
    @chukypedro818 6 месяцев назад +1

    I tried all the questions in the notebook but the assistants could solve only the first question.
    Questions.
    1. What is today's date?
    2. Compare the year-to-date gain for META and TESLA.
    3. Plot a chart of their stock price change YTD and save to stock_price_ytd.png.