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

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025

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

  • @RichardOlowalu
    @RichardOlowalu 3 месяца назад +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

  • @____2080_____
    @____2080_____ 3 месяца назад +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_____ 3 месяца назад

      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

  • @epokaixyz
    @epokaixyz 3 месяца назад +20

    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.

  • @wesleymogaka
    @wesleymogaka 2 месяца назад +1

    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.

  • @JBoy340a
    @JBoy340a 3 месяца назад +4

    Thanks Sam. Framework looks interesting

  • @justinwinter
    @justinwinter 3 месяца назад +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  3 месяца назад

      I totally agree.

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

      @@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 3 месяца назад

      @@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.

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

    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 3 месяца назад +3

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

  • @micbab-vg2mu
    @micbab-vg2mu 3 месяца назад +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 3 месяца назад

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

  • @apester2
    @apester2 3 месяца назад +1

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

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

    This is so cool.

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

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

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

    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?

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w 3 месяца назад

    can we use RAG with this?

  • @vbywrde
    @vbywrde 3 месяца назад +2

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

    • @samwitteveenai
      @samwitteveenai  3 месяца назад +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 3 месяца назад

      Does crew ai has state system?

  • @Sonic2kDBS
    @Sonic2kDBS 3 месяца назад +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  3 месяца назад +2

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

  • @mickelodiansurname9578
    @mickelodiansurname9578 3 месяца назад +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  3 месяца назад +2

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

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

      @@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 3 месяца назад +1

      tried replying there and RUclips 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 3 месяца назад +1

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

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

      @@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!

  • @drçokbilmiş
    @drçokbilmiş 3 месяца назад

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

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

    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?

  • @tacticalgaryvrgamer8913
    @tacticalgaryvrgamer8913 3 месяца назад +39

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

    • @amortalbeing
      @amortalbeing 3 месяца назад +1

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

    • @tornyu
      @tornyu 3 месяца назад +1

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

    • @requestfx5585
      @requestfx5585 3 месяца назад +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 3 месяца назад

      @@requestfx5585 thanks a lot really appreciate it 🌹

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

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

  • @Osxsar
    @Osxsar 3 месяца назад +1

    So why is this better than using one agent?

  • @jamesgphillips91
    @jamesgphillips91 3 месяца назад +1

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

    • @samwitteveenai
      @samwitteveenai  3 месяца назад +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 3 месяца назад +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 3 месяца назад +1

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

  • @43seconds
    @43seconds 3 месяца назад +2

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

    • @samwitteveenai
      @samwitteveenai  3 месяца назад +4

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

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

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

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

    Groundbreaking?

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

    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 3 месяца назад +1

    what does a Spanish meow even sound like?

  • @ibrahimhalouane8130
    @ibrahimhalouane8130 3 месяца назад +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  3 месяца назад

      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.

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

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

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

      what would you use instead?

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

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

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

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

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

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

    • @samwitteveenai
      @samwitteveenai  3 месяца назад +1

      I certainly didn't pick it. 😀

    •  3 месяца назад +1

      Why? It perfectly encapsulates what it is about.

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

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

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

      @@iceshoqer Ok, whatever...