Transcription
[Music] Hello all and welcome back to my YouTube channel.
So today we are going to see an interesting topic. We will be comparing three multi-agent frameworks: CRAI, Langraph, and Autogen. And we will be seeing how exactly these three frameworks are similar to each other or different to each other, and which framework we should use to solve which use case.
Now, as we all know, agentic AI is booming into the market, and there is a lot of hype going around. And that is where a lot of agentic AI frameworks are getting evolved. And it has become very important, or it becomes very necessary, to understand these frameworks. And because whenever you are working into organizations or whenever you are building any project, this framework matters a lot. And that's the reason it is always better you should thoroughly understand each framework and then selectively choose a framework wisely to solve your particular use case.
So let's start with our today's comparison. So first one we have on the list is Langraph. As we all know, Langraph again is a very popular framework. All these three frameworks are very popular, and all these frameworks support multi-agent capability. Langraph is a subset of Langchain. As we all know, Langchain is an organization which is working into the AI field. They are delivering very good solutions in order to help the community, and all these three services are open-source services. So, as these frameworks are open source, that is where there is a lot of competition going around in the market, and each framework is trying to prove themselves. And in order to grab audience attention, they are trying to prove that how these frameworks are better than other frameworks.
So basically, Langraph is dependent on a DAG kind of structure. What exactly is DAG? DAG is nothing but a directed acyclic graph. So basically, as you can see in the name itself, you have "graph," meaning these Langraph agentic frameworks, we need to define them in the form of a graph. So basically, in a graph, you know that a graph has nodes and edges, right? So here, "nodes" meaning nothing but you can put it as an agent, or you can mark that as a tool. That's how the nodes behave. And "edges" is nothing but the communication that you can derive between these agents and tools. And as it is a multi-agent framework, so it becomes very necessary to manage the conversation that is going around between, or that is happening between, the agents. And Langraph provides a very good framework in order to manage that conversation. So whenever you have a task like some conditions, that if a particular condition is true, you should select this path; if not, you should select another path, in those kinds of workflows, Langraph works very well.
Moving to the next one, CrewAI. Again, CrewAI is an open-source framework which is developed by the organization CrewAI. And as its name suggests, meaning the group of agents. So that's how the name is given: group of agents. And the group of agents come together in order to break a complex problem into simple problem statements and then solve by assigning individual agents to that. Now, in CrewAI frameworks, it is mostly suitable whenever you have a role-based kind of task. For example, let's say you have a task where you want to read a document, you want to summarize the document, and you want to get approval for that document, and that's how you can, and later on, you can publish the document. So in these cases, each agent has its fixed role. In those cases, your CrewAI agent works very well, where your individual agent has its individual functionality, and it manages that functionality only. It is built in order to complete that functionality itself. So in those cases, CrewAI agent works very well.
Moving to the next, we have Autogen. Again, Autogen is an open-source framework which is developed by Microsoft. And in Autogen, again, it supports a very good framework in order to build your custom agentic framework. So whenever you have a custom-related task, let's say you have an email sending task, let's say you have your regular chat-based applications, or let's say you have regular conversation type of agents, then a summarizer agent, a research agent, then you can go ahead and use the CrewAI or Langraph filter services. But if you want to perform your custom task, then you should think about Autogen. Now, custom task in the sense, let's say you have custom Python functions written. Then, in order to execute those functions, Autogen supports a very good dependency. Like, it has a very good integration with tools. You can easily integrate Python functions as a tool and you can pass that to Autogen, and you don't need to manage those tools in integration or tool calling. So Autogen manages it very well. Autogen has a very good feasibility in managing those tools. So in those cases, like whenever you have a custom task, definitely we should think of Autogen as an agentic framework.
Also, in Autogen, if you want any human input in between, let's say you have built an agentic conversation, and in some cases, let's say you want human feedback into the loop, then in those cases, Autogen works very well. If you want to build a reactive kind of framework, let's say one agent is asking questions to another agent, another agent is handing over that question to a third agent, it may be requesting a human to interrupt in between. If you have such kind of use cases, then Autogen works very well. And Autogen also supports a group chat functionality where you can have a manager agent, and that manager agent can assign tasks to individual agents and it manages the workflow.
So that's how, like, these three frameworks are. All the three are best as per their use cases. It's just we need to select the framework based on our use case.
So here you can see an example of how exactly the Langraph looks like. You can see you have a start point, then you can see you have an agent, this is another node, and then that agent is having the feasibility to call the tools and then have a feasibility to end. So you can see how exactly the conversation is defined with the help of these edges, and that's how Langraph has more control over building complex workflows. So whenever you have complex workflows, go ahead and select Langraph as a tool. But again, with Langraph, you need to be, you need to write a lot of code, and you need to be very good in writing the code because whenever we are talking about building a complex framework, again, the code behind that is also complex.
So coming to Autogen, as we have seen, you can see Autogen can easily manage different different agents together, and it can distribute the tasks, and you can have a manager agent in order to manage that task. Then in CrewAI, again, you can see you have an agent, it's LLM, then a second agent, it's LLM, and you can have a tool integration also. You can do a memory management, and then you can perform a task, and these are the defined tasks, and you can get a final outcome.
So the final outcome of all agentic frameworks is the same: that you need to break down the problem statement, a complex problem statement, assign individual agents to complete that individual task, and get a final task done. So it works on a similar principle. It's just their underlying structure is different. It is like learning a Python. It is like learning a programming language, right? You can learn any programming language, and the base behind the language is the same. The output that you are going to get out of the programming language is the same: that you will be writing code in order to complete a task, right? It's just their syntax will be different. Their way of writing the code is different. Similarly, here the output of all these agentic frameworks is the same. The goal is the same. It's just their underlying structure is different. The way you are calling the agent is different. The way you are handling the conversation between them is different.
Okay, let's go ahead and see this particular comparison. So as you can see, Autogen, it is Microsoft's powerful chat-based system. Mostly whenever you want to build a chat-based kind of system, we prefer Autogen, and it supports enterprise workflows. So if you want to build any custom applications for enterprises, definitely Autogen is a good choice.
Coming to CrewAI, it is basically for role-based agentic frameworks. And if you want to build quick MVPs, meaning if you want to build a quick minimum viable product, if you want to showcase quick wins, then definitely CrewAI is a good choice. As a beginner, most of the developers select CrewAI as their starting point because building an agentic framework with CrewAI is simple as compared to Autogen and Langraph.
Coming to Langraph, you can see it is a graph-style management. We need to write nodes and edges. We need to define that, and that's how we can define complex workflows. And mostly Langraph is suitable whenever you want to deal with complex workflows.
Moving ahead, as you can see, CrewAI is easy to set up, and that's where most of the developers select this as their first preference. And Autogen and Langraph, they require a bit of configuration before use. Because for Autogen also, you need to set up Autogen, and let's say if you want to enable code execution compatibility, if you want to have different Docker execution, then Autogen supports that. Similarly, Langraph also supports that, and that's the reason some configurations are required. But with CrewAI, the setup is very easy, as it is an independent agentic framework. It is not dependent on Langraph or any other agentic framework. This is a completely independent framework.
Okay, also, I forgot to mention one point. For all these agentic frameworks, you can have open-source models. Also, you can have paid version models. Like in CrewAI also, you can integrate those models. You can have GPT models integrated. You can have third-party tools like Grok. You can integrate. Then, also you can use Llama models. Similarly, in Autogen and Langraph, again, it provides the visibility to use your local models. You can use your Llama models. You can use any models from Hugging Face library, or also you can use GPT and the advanced models. And the same is the case with Langraph. There are no restrictions from the model perspective.
Coming to the final comparison, let's understand which framework is good from the criteria perspective. So if you are thinking from the easy-to-use perspective, Autogen, you can see, is balanced. It is not too complex and not too easy. Simple framework building is very easy in Autogen. But if you want to build custom applications, then you need to be focused on Autogen, and then it becomes a bit tricky. But yeah, again, with this, you can maintain a balance. Like, you can build complex workflows as well, as it is a bit easy to build with. You can see it is a three-star rating, meaning it is very easy to build. But again, as it is very easy to build, it is a bit lagging in complex workflows. And Langraph, if you can see, it is not as easy as compared to these two. Building a simple workflow is again very easy in Langraph. But if you are going one step ahead, the management of tools, the management of handling the conversation is a bit tricky in Langraph. You need to define all the conditions, like if conditions, you need to properly define them into Langraph, or else your communication gets disturbed between the agents. And as your number of agents grows, Langraph complexity also grows. But that is not the case with Autogen. If your number of agents are growing, the management of or the conversation management is very easy in Autogen and CrewAI.
Coming to memory handling, all three support memory handling. With Autogen, again, it maintains a balance. It manages the conversation of chats. It also manages the conversation of like individual conversations for a user, or if there are multiple sessions for a single user, it can manage that. So memory management is pretty well handled in Autogen. With CrewAI, it lags in memory management as compared to Autogen and Langraph. With Langraph, memory management is very good because, in Langraph, you might be knowing that Langchain, they have their own Python libraries in order to capture the memory, and they can capture long-term memories as well. Long sequential conversations can be easily captured. That is not the case with Autogen. After a point, Autogen can start forgetting the previous past memories. But with Langraph, definitely that feasibility is there.
Coming to tool usage, Autogen beats CrewAI and Langraph because Autogen has a very good feasibility where it can capture, where it can integrate multiple tools. You can write custom Python functions, and it can be easily integrated with the agent. You can have different different agents and different tools across these different agents, and you don't need to actually work on managing that tool integration because Autogen provides a very good feasibility where it can easily adapt these tools and it can manage the conversation that is happening, and it also decides whether to call that particular tool or not based on the user question. But with CrewAI, again, tool integration is quite good. It maintains a good balance. And similarly with Langraph. Langraph also, you can write your Python functions, and that it can easily integrate. But again, as I mentioned, in Langraph, you need to manage those edges and the conditions, and with a higher number of agents and tools, it becomes a bit complex.
And at the end, finally, coming to the workflow design, you can see Autogen again manages a balanced workflow design. You can build complex workflows as well. CrewAI is not good for complex workflows. Langraph is good for complex workflows. So if you total see, Autogen out of 12, it has 9 out of 12 stars. CrewAI, it has 7 out of 12 stars. And Langraph has again 9 out of 12 stars. So Autogen and Langraph are on the same line. But if you see in most of the cases, Autogen, you can see, right? It is easy to use. Its memory handling is also possible. Tool usage is also possible. Workflow design is also very good. And that is where Autogen is beating CrewAI and Langraph in the enterprises because most of the enterprises like to build their agent framework with the help of Autogen because it provides very good workflow design. It is easy in building. Also, it has strong tool usage, as well as memory is also managed properly in Autogen.
But yeah, like based on your use case, based on your interest, there is no hard rule that you should go for Autogen, CrewAI, or Langraph. If you are really new, if you don't have much coding experience, definitely go ahead and start with CrewAI. Once you get to know about how agentic frameworks can be built, how the agent conversation works, then you can go one step ahead, you can start using Autogen. If you are learning Autogen, then no need to go for Langraph as well. But if you want, after CrewAI, you can start learning Langraph as well. But if you are good in coding, you can directly jump to Langraph.
One point I want to talk about Langraph is, as Langraph comes under Langchain, and I have seen that they keep upgrading their libraries, and most of their tool functionalities, their agent conversation functionalities, they keep duplicating that. In a month or within two to three months, there are a lot of upgrades that are happening. But Autogen is kind of stable, as it is developed by Microsoft. There are no deprecation issues that I have seen as of now. But yeah.
So there's no hard and fast rule, as I mentioned earlier. Based on your use case, we should select the framework. And at the end, what matters is the solution that you are building, and how that solution you can easily scale. That is what matters.
So if you want to learn Autogen, then I have already covered a playlist. You can go ahead and check out that playlist. The link is available in the description below.
So yeah, that's all for this particular video. I hope you really enjoyed this particular video. Please like the video, subscribe to my YouTube channel, and I'll see you soon in the next video. Thank you so much.