Getting Started with AI Agents: An Overview of Popular Agent Frameworks

This article explains how agentic frameworks transform AI development by enabling autonomous, reasoning systems, compares leading open‑source options such as LangChain, LangGraph, CrewAI, Microsoft Semantic Kernel, AutoGen, Smolagents and Phidata, and provides a step‑by‑step LangGraph tutorial with code examples and a comparison table.

AI Algorithm Path
AI Algorithm Path
AI Algorithm Path
Getting Started with AI Agents: An Overview of Popular Agent Frameworks

Agentic frameworks (agent frameworks) represent a paradigm shift from static, predefined AI workflows to dynamic systems that can perceive environments, reason, and act autonomously. By leveraging large language models (LLMs), these frameworks decompose complex tasks into smaller subtasks handled by specialized agents, making them suitable for advanced scenarios like dynamic decision‑making and real‑time problem solving.

What Is an Agent Framework?

Unlike traditional AI applications that rely on fixed pipelines, an agent framework introduces autonomous components that can sense context, perform reasoning, and execute actions. The frameworks manage workflow orchestration, tool integration, and state handling, allowing developers to focus on application logic.

Popular Agent Frameworks

LangChain – A robust, adaptable framework that simplifies LLM‑driven application development with a rich toolset and abstraction layers for complex reasoning and external API interaction.

LangGraph – An extension of LangChain that adds state‑managed, multi‑agent capabilities, supporting planning, environment awareness, self‑reflection, and collaborative workflows.

CrewAI – Designed for role‑playing AI agents, enabling teams of agents with distinct responsibilities to cooperate on complex, multi‑domain tasks.

Microsoft Semantic Kernel – Bridges traditional software development with AI by providing lightweight SDKs for seamless LLM integration across languages and environments.

Microsoft AutoGen – An open‑source framework from Microsoft Research focused on building advanced multi‑agent systems with modular, extensible components.

Smolagents – A cutting‑edge open‑source project that offers a modular toolkit for constructing collaborative multi‑agent systems, including multimodal support.

Phidata – A multimodal agent framework that integrates memory, tool calling, and visual UI components, and pioneers agent‑driven retrieval‑augmented generation (Agentic RAG).

Framework Comparison

A comparison table (illustrated in the image below) evaluates each framework on dimensions such as multimodal support, autonomous decision‑making, and human‑in‑the‑loop collaboration, highlighting the strengths of AutoGPT, Smolagents, and Phidata for real‑time data processing, distributed task coordination, and dynamic knowledge retrieval.

Deep Dive: LangGraph

LangGraph, developed by the LangChain team, lets developers build single‑ or multi‑agent applications using a graph‑based architecture. The core concepts are:

Graph Structures – Consist of Nodes (individual workflow units, implemented as Python functions) and Edges (directed connections that control information flow).

Node Types – Can represent LLM calls, tool invocations, data transformations, or user interactions.

Edge Types – Simple edges pass data linearly; conditional edges enable branching based on runtime results.

State Management – A centralized state object synchronizes information across nodes, storing conversation history, context data, and internal variables.

Getting Started with LangGraph

Install the latest package: pip install -U langgraph Import required modules and define a state schema:

from typing import Annotated
from typing_extensions import TypedDict
from langgraph.graph import StateGraph, START, END
from langgraph.graph.message import add_messages

class State(TypedDict):
    # 'messages' stores the chatbot conversation history.
    # 'add_messages' appends new messages to the list.
    messages: Annotated[list, add_messages]

graph_builder = StateGraph(State)

Instantiate an LLM (example uses Anthropic's Claude model):

# pip install -U langchain_anthropic
from langchain_anthropic import ChatAnthropic
llm = ChatAnthropic(model="claude-3-5-sonnet-20240620")

Define a chatbot node that calls the LLM and returns updated state:

def chatbot(state: State):
    response = llm.invoke(state["messages"])
    return {"messages": [response]}

graph_builder.add_node("chatbot", chatbot)

Connect the start and end points:

graph_builder.add_edge(START, "chatbot")
graph_builder.add_edge("chatbot", END)

Compile the graph: graph = graph_builder.compile() Optional: visualise the graph (requires additional dependencies):

from IPython.display import Image, display
try:
    display(Image(graph.get_graph().draw_mermaid_png()))
except Exception:
    pass

Run an interactive loop that streams user input through the graph:

while True:
    user_input = input("User: ")
    if user_input.lower() in ["quit", "exit", "q"]:
        print("Goodbye!")
        break
    for event in graph.stream({"messages": [("user", user_input)]}):
        for value in event.values():
            print("Assistant:", value["messages"][-1].content)

This minimal example demonstrates how to construct a LangGraph‑based chatbot, manage state, and extend the workflow with additional nodes, tools, or more sophisticated LLMs.

Conclusion

Agent frameworks are reshaping AI system design by enabling autonomous reasoning, planning, and dynamic interaction. The article introduced the concept, surveyed the most popular libraries, compared their strengths, and provided a hands‑on LangGraph tutorial covering graph architecture, state handling, and practical code. As AI continues to evolve, frameworks like LangGraph, LangChain, CrewAI, and others will be essential for building the next generation of adaptive, efficient intelligent applications.

LangChainAgent FrameworksAutoGenLangGraphCrewAISmolagentsMicrosoft Semantic KernelPhidata
AI Algorithm Path
Written by

AI Algorithm Path

A public account focused on deep learning, computer vision, and autonomous driving perception algorithms, covering visual CV, neural networks, pattern recognition, related hardware and software configurations, and open-source projects.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.