Introducing Swarm with Code Examples: OpenAI's Groundbreaking Agent Framework

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

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

  • @RichardOlowalu
    @RichardOlowalu 2 หลายเดือนก่อน +3

    Thank you very much Sam, this is the first content I have watched from you and I am now following. On Sunday while working with a colleague I realized I needed this functionality and here it is - amazing. Best regards, Richard

  • @epokaixyz
    @epokaixyz 2 หลายเดือนก่อน +21

    Consider this your cheat sheet for applying the video's advice:
    1. Understand routines: Define clear steps for your agents to follow, like a to-do list.
    2. Implement handoffs: Enable agents to seamlessly transfer conversations to other specialized agents.
    3. Utilize agents: Treat them as specialized workers with unique skills.
    4. Leverage tools: Equip your agents with tools that extend their capabilities.
    5. Inject context: Personalize interactions by providing agents with relevant user data.
    6. Explore the Swarm GitHub repository: Dive into the code, examples, and documentation.
    7. Experiment with OpenAI Cookbook: Find recipes and examples for building with OpenAI APIs.

  • @____2080_____
    @____2080_____ 2 หลายเดือนก่อน +3

    They’ve been great frameworks that already taken this concept to a far more mature level.
    Of course, this is stuff that we all look at and see if it’s a piece of our puzzle or we continue using what we’ve been using

    • @____2080_____
      @____2080_____ 2 หลายเดือนก่อน

      The really interesting thing that there’s been a product repo out there called “agency swarm“ that is a mature form of what open AI has put out here. 26:13

  • @JBoy340a
    @JBoy340a 2 หลายเดือนก่อน +4

    Thanks Sam. Framework looks interesting

  • @justinwinter
    @justinwinter 2 หลายเดือนก่อน +6

    Really appreciate how light weight this approach is compared to langgraph. Straight Python is a lot easier to grok than 45 layers of abstractions like some of the other frameworks

    • @samwitteveenai
      @samwitteveenai  2 หลายเดือนก่อน

      I totally agree.

    • @gremlinsaregold8890
      @gremlinsaregold8890 2 หลายเดือนก่อน

      @@justinwinter I'd agree... But problem is... Will it be around for any longer than pi*sing time? Openai themselves are not supporting it... That said it's an open source git so the code is there.

    • @justinwinter
      @justinwinter 2 หลายเดือนก่อน

      @@samwitteveenai When you get a chance, might be worth checking out phidata if you haven't already. Just did a few experiments with their framework and it has a lot of flavor of swarm but with some useful declarative abstractions. It's still lightweight enough that it doesn't get in the way. Did a very quick to-do-list tutorial recently on my channel if interested.

  • @micbab-vg2mu
    @micbab-vg2mu 2 หลายเดือนก่อน +6

    Swarm is very easy to use - I am waiting when an option of adding o1 models (as main agent) will be available.

    • @PaulHaster
      @PaulHaster 2 หลายเดือนก่อน

      Can't you just create o1 model and pass it to Swarn constructor?

  • @unclecode
    @unclecode 2 หลายเดือนก่อน

    Few more flights to state and back to your home, you will release your SAAS Flight agent business :D Beautiful content as usual. Thx Sam.

  • @vitalis
    @vitalis 2 หลายเดือนก่อน +3

    people should give agency swarm some credit as well which is what this is based on. Just doing my bit.

  • @holthuizenoemoet591
    @holthuizenoemoet591 2 หลายเดือนก่อน +3

    Cool, what are some other multi-agent frameworks? can you model economic system with multi-agents?

    • @Pennytechnews
      @Pennytechnews 2 หลายเดือนก่อน +1

      Angecy swarm

  • @apester2
    @apester2 2 หลายเดือนก่อน +1

    Handoff + Agents is the separation of concerns for the AI era.

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

    Hi Sam, Thanks. One quesiton = If an agent has 3 tools and they are to be invoked sequentially. How exactly does the output of tool 1 go into tool 2 as input? I don't see context_variable being updated. So how does that happen magically?

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

    What I'm curious about though with OpenAI's version is... what differentiates it from AutoGen or Crew AI?

    • @samwitteveenai
      @samwitteveenai  2 หลายเดือนก่อน +3

      I would say that it much more light weight than those, but it is also missing a lot of things like any state system etc.

    • @SHEIK_MOHIDEEN
      @SHEIK_MOHIDEEN 2 หลายเดือนก่อน

      Does crew ai has state system?

  • @nufh
    @nufh 2 หลายเดือนก่อน

    This is so cool.

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

    I like openAI's nomenclature of Triage, handoffs etc. However you can still do this easily using plain python. I copied this way of agent building and I am currently building a bank chatbot.

  • @drçokbilmiş
    @drçokbilmiş 2 หลายเดือนก่อน

    Is this API KEY has to be gpt-4o? If yes is there any way of using Azure api key?

  • @43seconds
    @43seconds 2 หลายเดือนก่อน +2

    But their API has rate-limits for Requests-Per-Minute. Wouldn't this completely blow that out?

    • @samwitteveenai
      @samwitteveenai  2 หลายเดือนก่อน +4

      not anymore than any other way to use/create agents.

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w หลายเดือนก่อน

    can we use RAG with this?

  • @mickelodiansurname9578
    @mickelodiansurname9578 2 หลายเดือนก่อน +1

    Basically this is one of those try and example script, rub chin, nod and move on... fine I'll do that, when I'm not busy using production ready stuff.

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

      Kinda have to checkout what they are thinking. What are you using for production?

    • @mickelodiansurname9578
      @mickelodiansurname9578 2 หลายเดือนก่อน

      @@samwitteveenai well the plan in Trello (next sprint) is CrewAI... but I'm so 'not all for' depending on new external librarys on a commercial project. The problem is every single AI leveraging library is new. The OPenAI API voice thing also looks fantastic for my use case... then again will they keep it, shelve it, change it? what? It would solve a shed load of latency issues for me... and the agent system the same.... but for all we know OpenAi just up and change direction a month from now. (Project is called BandyBuddy Sam, you can look it up online or here on YT)

    • @mickelodiansurname9578
      @mickelodiansurname9578 2 หลายเดือนก่อน +1

      tried replying there and TH-cam removed the comment... lets see how this one goes?
      Edit: okay well that posted. So the plan is crewAi, but then of course we are locked into depending on a crucial and third party library - and also the OpenAI voice thing looks fantastic for the BandyBuddy project... but again will openAi shelve that? or change it? or increase the price (and its not cheap)... but the agent thing and the voice would solve the latency issue of voice control.

    • @gremlinsaregold8890
      @gremlinsaregold8890 2 หลายเดือนก่อน +1

      ​@@mickelodiansurname9578Cool your building a karaoke app ith AI.. so when will it be ready?

    • @mickelodiansurname9578
      @mickelodiansurname9578 2 หลายเดือนก่อน

      @@gremlinsaregold8890 Well we are 'supposed to have' an MVP by the week leading up to Christmas. If you fancy yourself as a legend in your bedtime, add yourself to the waitlist... and remember... the world is your lobster!

  • @keithkeith2106
    @keithkeith2106 2 หลายเดือนก่อน

    Don’t laugh at my question! 😊 Might it be possible and practical to use swarm to calculate a multi step mathematical equation with multiple inputs?

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

    I think informing the user, if the agent has switched could be the better way. It even could prevent some anger of the user. You then can see, if the Agent didn't get your Reuest or it is another instance, where the Agent can't know. Also if the Agent is switched and you know that and the Agent is asking something, you had already answered, it is more clear, why that is. Some easy hint, like: "Agent switched." would do the job.

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

      you could certainly do this in the UI etc. that would be your choice. nothing in the framework is stopping that.

  • @tacticalgaryvrgamer8913
    @tacticalgaryvrgamer8913 2 หลายเดือนก่อน +38

    It's not a framework. It's a glorified example of super basic code. Relax.

    • @amortalbeing
      @amortalbeing 2 หลายเดือนก่อน +1

      @@NathanielKrefman would you name a few? its really appreciated

    • @tornyu
      @tornyu 2 หลายเดือนก่อน +1

      Ok sure, but it's a good design. Call it a pattern if you like but it's good!

    • @requestfx5585
      @requestfx5585 2 หลายเดือนก่อน +3

      ​@@amortalbeingcrewai, autogen, I don't know any other but there are a lot. And swarm is literally a joke, the source code is minimal, probably around 500 lines which is just nothing, you can code it yourself which I have also done and in typescript instead of python. My implementation is more versatile can use multiple models and have model fallback feature so when a model does not work it chooses a different one and auto model select feature which selects a model based on the task (not agent) since an agent does not always require the best model 10/10 times but if it does it switches

    • @amortalbeing
      @amortalbeing 2 หลายเดือนก่อน

      @@requestfx5585 thanks a lot really appreciate it 🌹

    • @theh1ve
      @theh1ve 2 หลายเดือนก่อน

      It's the most underwhelming thing ever, nothing new here move along...

  • @Osxsar
    @Osxsar 2 หลายเดือนก่อน +1

    So why is this better than using one agent?

  • @jamesgphillips91
    @jamesgphillips91 2 หลายเดือนก่อน +1

    how is this better than langchain? why would i opt to being vendor locked?

    • @samwitteveenai
      @samwitteveenai  2 หลายเดือนก่อน +3

      I wouldn't say it is vendor lock in too much, this can be changed to work with open models etc and at the end of the day it is just python. In many ways it is easier to make something custom compared to LangChain. That said if you have something that is working no need to switch

    • @jozonas
      @jozonas 2 หลายเดือนก่อน +1

      @@samwitteveenaithis. Life would be so much easier if we noticed that we don’t need to argue about what is better. Thanks for showing us another option to choose from.

    • @jamesgphillips91
      @jamesgphillips91 2 หลายเดือนก่อน +1

      @@samwitteveenai thanks for the answer. Ima try it in my next project!

  • @ibrahimhalouane8130
    @ibrahimhalouane8130 2 หลายเดือนก่อน +4

    This word sounds familiar to me! @vrsen right? building a product on top of ONE vendor's product is high business risk, unless you have a plan to survive somehow? and that's why I wrote to him to decouple his framework from the assistant api.
    Does it work with open LLMs?

    • @samwitteveenai
      @samwitteveenai  2 หลายเดือนก่อน

      out of the box doesn't work with open models but can be changed easily enough. Also there are a few OpenSwarm frameworks out there now as well.

  • @el_arte
    @el_arte 2 หลายเดือนก่อน

    That’s similar to my framework, but not as expressive or cross platform.

  • @renovacio5847
    @renovacio5847 2 หลายเดือนก่อน

    Groundbreaking?

  • @impolitevegan3179
    @impolitevegan3179 2 หลายเดือนก่อน

    Are they trying to get the open source benefits without open-sourcing their models? If so, I hope the community does not fall for it.

  • @kevon217
    @kevon217 2 หลายเดือนก่อน +1

    what does a Spanish meow even sound like?

  •  2 หลายเดือนก่อน

    Still wish we could get away from Python. It's absolutely horrible with its dependencies and versions.

    • @holthuizenoemoet591
      @holthuizenoemoet591 2 หลายเดือนก่อน +3

      what would you use instead?

    • @RichardOlowalu
      @RichardOlowalu 2 หลายเดือนก่อน

      I think that Open AI has a NODE.js example as well...

    •  2 หลายเดือนก่อน

      @@holthuizenoemoet591 Golang most probably. Builds one static executable and is fast.

  • @iceshoqer
    @iceshoqer 2 หลายเดือนก่อน

    Can we stop promoting this word, what weird word to use, Spawn, horror movie like.

    • @samwitteveenai
      @samwitteveenai  2 หลายเดือนก่อน +1

      I certainly didn't pick it. 😀

    •  2 หลายเดือนก่อน +1

      Why? It perfectly encapsulates what it is about.

    • @iceshoqer
      @iceshoqer 2 หลายเดือนก่อน

      No it doesn’t, and there are better words than one trying to sound cool.

    •  2 หลายเดือนก่อน

      @@iceshoqer Ok, whatever...