
Introducing Swarm: OpenAI's New Multi-Agent Orchestration Framework Learn The Fundamentals Of Becoming An AI Engineer On Scrimba; https://v2.scrimba.com/the-ai-engineer-path-c02v?via=developersdigest My AI-powered Video Editor; https://get.descript.com/n6dxd9jp6ouy In this video, I introduce 'Swarm,' an open-source, experimental multi-agent orchestration framework released by OpenAI. I explain its goal of simplifying agent creation and coordination for scalable solutions with agent handoffs as a unique feature. Swarm operates entirely within a client's application, offering full control and visibility, unlike the assistance API. I highlight how easy it is to set up using provided examples and encourage viewers to share their thoughts and creations in the comments. 00:00 Introduction to Swarm 00:21 Overview of Swarm's Features 00:56 Swarm's Agent Coordination and Execution 01:55 Differences from Assistance API 02:26 Getting Started with Swarm 03:16 Basic Examples and Use Cases 04:21 Encouragement to Explore and Conclusion
--- type: transcript date: 2024-10-12 youtube_id: 82FSnDcw72k --- # Transcript: OpenAI Swarm: New Open-Source Multi-Agent Framework Released in 5 Minutes in this video I'm going to be showing you swarm which is a new open source repository that was just released this Friday night from the team over at open AI they say it's an ergonomic lightweight multi-agent orchestration framework they do mention that it is currently experimental and it's intended to explore the ergonomic interfaces for multi-agent systems I'm just going to go over this at a high level what's nice with this is it does look like they're trying to aim for what looks to be a simple approach to creating a agents and orchestrating agents typically we only really see sdks that are open source I know Whispers open source but in terms of models and stuff like that we don't see a whole lot of so it is nice that they are putting this out there they're not just keeping this agentic orchestration system internally and that they're putting it out there for people to explore and experiment with at first glance it does look like it is a pretty nice way to potentially set up agents so they mentioned swarms focus on making agent coordination and ex execution lightweight highly controllable and easily testable it accomplished this through two primitive abstractions agents and handoffs they mention an agent encompasses instructions and tools and can at any point choose to handoff a conversation to another agent so they mentioned that these Primitives are powerful enough to express Rich Dynamics between tools and networks of Agents allowing you to build scalable real world Solutions while avoiding a steep learning curve one thing to note they do say this swarm agents are not related to the assistance API that API is largely built for these turn-based chat conversation applications that's where something like that can be useful it really seems to be built for scenarios that involve a lot of independent capabilities that are difficult to necessarily just encode in a single prompt you have these smaller nodes or these agents that each have specialized skills where it is different from the assistance API is this runs entirely on the client application whatever you're building this isn't something that's abstracted away this is something you have total control on and visibility on which is a little bit different from their release of 01 we can't actually see what 01 is thinking we just know that it's doing some sort of thinking and iteration that's the nice thing with this is it isn't just corned off within the API and we don't know what's happening in this case we have all of the visibility right it's an open source project we can essentially do whatever we want with it within the repo there's really good instructions in terms of how to get started it does seem to be really well documented I'm not going to be showing you how to set this up in this video but here you can see you can essentially just import the library initialize swarm from there you have a number of different variables whether the agent has particular tools or context that it has access to and by the looks of it it's set up in a way where it's very familiar to something like if you've used the chat completions API so you have your messages there definitely are some notable differences with this but it is very familiar to something like the chat completions API so you have your messages but you also have some new aspects of actually having to hand off different messages to the other agents that are within your application you still have access to function calling within the agents probably the biggest thing to understand is this idea of handoffs between the different agents there you're just going to have to remember to pass the different agents depending on the states let's just take a look at some of the basic examples here so within the repo there are a ton of different examples I'd encourage you maybe start out and check out the basic folder here here we can see that we initialize the Swarm we Define two different agents so it's one that speaks English one that speaks Spanish then we have our handoff function here and then to bind the handoff function so we're going to be appending this transfer to Spanish agent and here so we have the user message so I guess the idea is if the user is speaking in Spanish it's going to run and automatically hand that off to the Spanish agent so out of first glance you can probably start to get some ideas on how this could be useful and with what looks to be about 20 lines of code if we removed whitespace here it's pretty simple to set up this orchestration framework there's also some other examples here I'm not going to be going over all of these within this video but there are a ton here there's a function calling example to get the weather and how you can tie that into an agent I'd really encourage you check this out let me know in the comments of the video what you think of this if you've tried it let me know what you are building with this otherwise I just wanted to do a really quick one showing you and pointing you in the direction of swarm check it out let me know what you think but that's it for this video if you found this video useful please like comment share and subscribe otherwise until the next one
Weekly deep dives on AI agents, coding tools, and building with LLMs - delivered to your inbox.
Free forever. No spam.
Subscribe FreeNew tutorials, open-source projects, and deep dives on coding agents - delivered weekly.
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.