The 7 must-know AI agent frameworks

The 7 must-know AI agent frameworks

This feature is an excerpt from my free newsletter, Building AI Agents. If you’re an engineer, startup founder, or businessperson interested in the potential of agentic AI, subscribe to the newsletter and follow me here on LinkedIn!

If you’re looking to build AI agents but don’t know where to start, look no further.

Agent frameworks are software libraries that abstract away much of the boilerplate code you have to write to get an agent up and running. It’s common for agent builders to debate whether frameworks are necessary at all—writing your own custom code can give you greater control and can be done more quickly than ever now with increasingly powerful coding assistants.

But if you want to get a prototype running as fast as possible, to build sprawling multi-agent systems that fit intricately together, or to easily take advantage of pre-packaged capabilities like memory, code execution, and more, frameworks are the way to go.

What follows is a roundup of what are arguably the seven best-known and most widely-used agent frameworks for Python, the most common programming language used to build AI systems. Don’t know Python? No problem, developers are starting to roll out frameworks for just about every language imaginable — JavaScript, C#, Java, Rust, and more. And if you’re not a programmer at all, there are a whole other set of low-code/no-code tools available.

But for the Python folks, these are all good places to start:

LangGraph (by LangChain)

Built on top of the LangChain LLM framework, it instantiates agents as graphs, with information flowing between connected nodes.

Pros: extensive set of built-in capabilities like memory, integrations with many other tools, APIs, and LLM providers, and an enterprise focus

Cons: complex and dependent on often buggy LangChain

AutoGen (by Microsoft)

Developed as the first open-source agent framework by a major tech company, and later forked into the “official” Microsoft version and an open-source spinoff, AG2.

Pros: solid all-around, while low-code AutoGen Studio makes building easier

Cons: smaller community than LangGraph/LangChain and CrewAI

CrewAI

Built around the concept of “crews” of agents that are given roles and backstories, and function like actual teams of workers by roleplaying their assigned jobs.

Pros: simple to get started and targeted towards enterprise use-cases

Cons: fewer built-in tools than other major frameworks like LangGraph, and its enterprise features are not entirely open-source

SmolAgents (by Hugging Face)

Hugging Face’s minimalist framework, with a core library of just around 1,000 lines of code, operating through code-as-action, in which the agent primarily acts by writing and executing its own code.

Pros: ultra-simple and lightweight, while code-as-action gives considerable versatility and power

Cons: minimal feature set, and unpredictable results from the agent’s code

OpenAI Agents SDK

OpenAI’s official agent framework, in which agents utilize handoffs, taking turns performing tasks and then giving control to another agent.

Pros: easy to use, official support from OpenAI and integration with many of its tools, and can use other providers’ LLMs

Cons: centered around OpenAI, with fewer built-in features like connectors than LangChain or LlamaIndex

Agent Development Kit (by Google)

Google’s recently released framework, which is already seeing rapid adoption.

Pros: extensive enterprise integrations, particularly for Google Cloud, and can use other providers’ LLMs

Cons: steeper learning curve than other frameworks, integrations center around Google products

LlamaIndex

Originally intended to connect LLMs with external data and to facilitate retrieval augmented generation (RAG), but recently pivoted to facilitating agents via Agent Workflows, which function similarly to CrewAI’s crews.

Pros: excels in data integrations and RAG due to its heritage, and has a large and active community

Cons: data integrations have a steep learning curve, making it less-than-ideal for agentic workflows not centered on external data

It seems like a new agent framework comes out every day, creating a risk of analysis paralysis: everyone wants to use the “best” framework, but its impossible to keep track of all of them.

Luckily, although there are meaningful differences between them, they all do broadly the same things. If you want to get started with an agent framework, use this piece as a guide to just pick one, and get started. You probably can’t go wrong with any of these seven.

Happy coding!

  • OpenAI plans agentic device to rival the smartphone
  • 601 AI use-cases from the worlds leading organizations
  • Is “freelance agent builder” a viable career?
  • Stargate and the AI Industrial Revolution

Read about these and more in the latest issue of Building AI Agents!

Agentic AI is causing Organizations to go more lean today in terms of headcount, bring more productivity for the workforce, besides other great things it does. Enterprise AI Agent architectures need to be retrainable based on activity - and reconfigurable by a business manager based on activity - like customer chatbots - on an AI agent architecture, need to detect spikes in complaint types, regional spikes, spikes in a short time on number of complaints in a particular area and start answer etc. So if a particular API access issue complaints spikes in a short time, besides a generic AI generated answer email, another email/chat msg needs to go to the customer saying "Hey Julie, The issue you mentioned seems to be raised quite a bit by an online subscribers last 6 hours or so, we will get on it immeiately andfix it at our end shortly" - Simple sweet, Not rocket-science tech - but things like this can add miles to Cust Sevs systems. Come, let us show you how you can build a retrainiable Agentic AI architecture for your b Customer Service Leaders, Marketing Heads, or even HR Heads. #AIAgents #AgenticAI #RetrainableAI #AIforBusiness Info@AIforBussiness.com or Contact@AIforBussiness.com (Regular + WhatsApp) +91-98922-38621

Like
Reply

Michael CunninghamThis is a timely and important discussion, Michael. Navigating the landscape of AI agent frameworks can be challenging, and your insights on the pros and cons of each contender will be invaluable for many in the field. I look forward to diving into your analysis and considering how it might inform our own decisions in this rapidly evolving space.

Like
Reply

To view or add a comment, sign in

More articles by Michael Cunningham

Others also viewed

Explore content categories