📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

OpenAI Swarm, LangGraph, AutoGen, & CrewAI: Which AI Agent Framework Wins?

Getting Started with Jeff7:40

Transcription

This is the year of AI agents. You've probably heard this one a lot lately, and honestly, that's why I decided to make this video. That's because there are so many agentic frameworks to choose from, and just a few days ago, even OpenAI introduced Swarm, their take on multi-agent systems. So, which framework do you think should take the first spot?

First, let me say that I appreciate you joining me today. If you're new here, my name is Jeff, and I'll help you integrate AI into your app. We're going to look at the most popular frameworks today: AutoGen, CrewAI, LangGraph, and OpenAI Swarm. And there's one more secret framework that I'll save for the end, so make sure to stick around.

Let's start with AutoGen. AutoGen is built by Microsoft, and they're constantly improving it. It's a framework where agents can generate, fix, and run code in Docker containers. AutoGen Studio, their no-code tool, makes it easier to manage and debug these systems. It's a great option if you like a visual approach. The framework also supports .NET C#, though it's not as fully developed as the Python side just yet. AutoGen works best with the latest models; older ones like GPT-3.5 Turbo sometimes struggled with tasks. It may have a bit of a learning curve, but you get a lot of flexibility and plenty of conversation patterns to work with.

Now, if we head over to the official repo, the documentation is pretty clear and it has some useful examples to get you started. You can see the Python examples here, and the C# examples just below. The project has about 32,000 stars, and the latest commits were made just a few hours ago. If you look at the issues tab, you can see there are about 550 open tickets and over 1,200 closed ones, covering bugs, enhancements, and other updates. So, it's a very active project and definitely worth checking out.

All right, let's head over to CrewAI. And CrewAI is one of my personal favorites when it comes to ease of use. Setting up agents is straightforward and beginner-friendly. That said, as you start digging deeper and customizing things, it can get more complex. I actually follow the founder on X, and he's everywhere, super active. He even teamed up with Andrew Ng to create a really solid course on CrewAI.

Now, CrewAI is built on top of LangChain, which has its pros and cons. The good part: LangChain is an established framework with tons of community support, documentation, and useful tools. The downside is that it adds another dependency to your project, which means there's a higher chance of something breaking with future updates. If we take a quick look at their GitHub, the documentation is clear with working examples to get you started quickly. They even have YouTube tutorials at the bottom of the page. Although, where's my video, guys? Overall, it's a healthy project with frequent commits, 20,000 stars, 127 open issues, and 717 closed ones, covering bugs, feature requests, and other updates. So, it's definitely worth keeping an eye on.

Okay, now let's take a look at LangGraph. And LangGraph is newer than AutoGen and CrewAI. I recently released a tutorial on it, and honestly, once I got it up and running, it wasn't too difficult. But the documentation is a bit of a hit or miss, sometimes outdated or missing key details. That said, it's getting rapid updates, and after the initial confusion, everything clicked for me. It also supports JavaScript, just like its parent project, LangChain, which is a nice bonus. I would describe LangGraph as a low-level framework that gives you a lot of control over each element, and this makes it powerful, especially when you're setting up more complex workflows. On GitHub, it's got about 6,000 stars, 43 open issues, 243 closed ones, and a lot of recent commits. There are working code examples, but it's not the easiest framework to work with initially.

Now, check out my LangGraph video. I'm pretty sure that'll get you up and running in no time. I'm going to leave a link in the description so you can check it out. One cool thing to keep in mind is LangGraph Studio. It's a new specialized IDE that lets you visualize, interact with, and debug your agent workflows. You get visual graphs, the ability to edit states, and run your graph without restarting the whole thing. Definitely something to watch as it evolves.

All right, here's what everybody's been talking about recently: OpenAI Swarm. It's new, and it's still experimental. When I first dug into the code, it reminded me of CrewAI. The structure is clean and easy to work with, which makes it perfect for experimentation. I thought it would work seamlessly with the Assistants API, but it doesn't, which would have been a nice touch. Now, Swarm isn't meant for production use just yet, and OpenAI makes that clear. So, feel free to experiment, but don't expect the same level of support or community backing that you'd get from more established frameworks.

Now, it's also good to point out that Swarm is definitely the most lightweight of all the options we've covered so far. Looking at the repo, it's already got almost 13,000 stars, which is quite impressive considering it was just released a few days ago. Now, unlike other frameworks, though, you don't see a lot of recent commits, which kind of makes sense because this is new and not meant for production. Now, looking at the issues tab here, we have seven open issues and four closed ones. But yeah, in terms of features and capabilities compared to the others, it's just not there yet. We'll just have to wait and see how this evolves.

All right, here's the gist of it. AutoGen really shines when it comes to autonomous code generation. Agents can self-correct, rewrite, execute, and produce some pretty impressive code, especially when it comes to solving programming challenges. I've got a whole AutoGen playlist, so check that out. I'll leave a link in the description. If you're looking to get started quickly, CrewAI is probably the easiest. It has great documentation, tons of examples, and a solid community. I've also got CrewAI videos to guide you through, so make sure to check those as well. The link is also in the description.

Now, LangGraph, to me, offers more control and is great for complex workflows. While it works fine for simple applications like the two-node graph that I showed in my tutorial (also the link is in the description), it really excels in more complicated workflows, especially if you need retrieval augmented generation or RAG and are juggling multiple tools and scenarios. As for OpenAI Swarm, I'm still testing it. So, like I mentioned earlier, it is the simplest, cleanest, and most lightweight of the bunch. That also means it comes with the most limitations. It's not ready for production use. Things could change quickly, though, since this space moves super fast.

And finally, the secret framework I teased at the beginning of the video: It's no framework. Here's the thing: sometimes we overcomplicate stuff. Not every problem needs agents, frameworks, or even AI. You could just build it yourself. Now, frameworks are helpful, but often bulky. Sure, they save you time, but what if you only need 1% of what they offer? Of course, everyone's situation is different. You might be building a prototype, or maybe you don't care about dependencies or costs, or maybe your technical manager read that some framework is the thing right now and you're feeling the pressure to use it. Either way, it's worth thinking about whether you really need a framework for your project or if it's better to build it yourself.

But who knows, right? Well, only you know. That's why only you can make the choice. But if you've made it this far, well, first, thank you, and please subscribe because you'll help the channel grow. And second, you now have a good idea of which way to go based on your situation. So, let me know in the comments how it goes. Thank you for watching, and I'll see you soon.