AI Agent Framework Research Notes

AI Agent Framework Research Notes

Last updated: 2026-04-30

As AI Agent technology evolves at a rapid pace, new agent development frameworks keep appearing. This document surveys and compares six of the most widely adopted Agent frameworks available today, helping developers choose the right tool for their use case.


Table of Contents


I. Framework Overview Comparison

Dimension LangGraph CrewAI LlamaIndex Dify OpenAI Agents SDK Google ADK
Developer LangChain Inc. CrewAI Inc. LlamaIndex Inc. LangGenius OpenAI Google
Latest Version v1.1.10 v1.14.3 v0.14.6 v1.6.0+ v0.14.6 v1.31.1
License MIT MIT MIT Dify License (Apache 2.0+) MIT Apache 2.0
Language Python / JS Python Python / TS Visual (multi-language SDK) Python / JS Python / Java / Go / TS
Core Philosophy Graph orchestration Role-playing teams RAG + Agent Low-code platform Minimal multi-agent Code-first
Model Support Model-agnostic Model-agnostic Model-agnostic Model-agnostic 100+ LLMs Model-agnostic
Learning Curve Steep Moderate Moderate Low Low Moderate
Best For Complex stateful workflows Multi-role collaboration RAG + Agent Rapid prototyping / non-technical users OpenAI ecosystem apps Google ecosystem apps

II. LangGraph

2.1 Introduction

LangGraph is a low-level orchestration framework developed by the LangChain team, specifically designed for building long-running, stateful AI Agents. It draws design inspiration from Google’s Pregel and Apache Beam.

Core positioning: rather than abstracting away prompts or architecture, LangGraph provides low-level infrastructure that gives developers fine-grained control over agent workflows. It is already used in production by companies such as Klarna, Replit, and Elastic.

Project Info Details
Latest Version v1.1.10 (2026-04-27)
License MIT
Install pip install -U langgraph
GitHub langchain-ai/langgraph
Docs docs.langchain.com/oss/python/langgraph

2.2 Core Architecture

LangGraph models agent workflows as a Graph, built from three core components:

  • State: A shared data structure, typically defined using TypedDict or a Pydantic Model
  • Nodes: Functions that encode agent logic — they receive the current state and return an updated state
  • Edges: Functions that determine the next node, supporting conditional branching or fixed transitions

2.3 Key Features

  • Persistence: Saves the graph state as a checkpoint after each execution step; supports in-memory, Redis, and other backends
  • Human-in-the-Loop: Uses interrupt() to pause execution and wait for human input before resuming
  • Streaming: Supports multiple streaming modes including values, messages, and updates
  • Subgraphs: Supports nested graphs where subgraphs have their own independent checkpoints and interrupt capabilities
  • Time Travel: Can rewind to any historical checkpoint, with support for forking and replaying
  • Visualization: After compilation, can generate Mermaid diagrams to visualize the workflow structure

2.4 Code Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from typing import Literal
from langgraph.graph import StateGraph, MessagesState, START, END
from langchain.messages import SystemMessage, HumanMessage, ToolMessage

# Define tools
def multiply(a: int, b: int) -> int:
"""Multiply two numbers."""
return a * b

def add(a: int, b: int) -> int:
"""Add two numbers."""
return a + b

tools = [multiply, add]
tools_by_name = {tool.name: tool for tool in tools}

# Define nodes
def llm_call(state: MessagesState):
"""LLM decides whether to call a tool"""
return {
"messages": [
llm_with_tools.invoke(
[SystemMessage(content="You are a helpful arithmetic assistant.")]
+ state["messages"]
)
]
}

def tool_node(state: dict):
"""Execute tool calls"""
result = []
for tool_call in state["messages"][-1].tool_calls:
tool = tools_by_name[tool_call["name"]]
observation = tool.invoke(tool_call["args"])
result.append(ToolMessage(content=str(observation), tool_call_id=tool_call["id"]))
return {"messages": result}

# Define conditional edge routing
def should_continue(state: MessagesState) -> Literal["tool_node", END]:
last_message = state["messages"][-1]
if last_message.tool_calls:
return "tool_node"
return END

# Build and compile the graph
builder = StateGraph(MessagesState)
builder.add_node("llm_call", llm_call)
builder.add_node("tool_node", tool_node)
builder.add_edge(START, "llm_call")
builder.add_conditional_edges("llm_call", should_continue, ["tool_node", END])
builder.add_edge("tool_node", "llm_call")

agent = builder.compile()

# Run
result = agent.invoke({"messages": [HumanMessage(content="Add 3 and 4, then multiply by 5.")]})

2.5 Strengths and Limitations

Strengths: Fine-grained control, stateful execution, native human-in-the-loop, fault-tolerant recovery, time-travel debugging, framework-agnostic

Limitations: Steep learning curve, lots of boilerplate code, best experience requires the LangSmith ecosystem, fast-moving release cycle


III. CrewAI

3.1 Introduction

CrewAI is a Python framework for orchestrating multiple autonomous AI Agents, built entirely from scratch with no dependency on LangChain or any other framework. Its core idea is to simulate real team collaboration through role-playing.

Project Info Details
Latest Version v1.14.3 (2025-04-24)
License MIT
Install pip install 'crewai[tools]'
GitHub crewAIInc/crewAI
Docs docs.crewai.com

3.2 Core Concepts

  • Agent: Identity and behavior defined through role, goal, and backstory
  • Task: A concrete unit of work; can specify the assigned agent, context dependencies, and output format
  • Crew: A collection of collaborating agents, defining the execution process and memory configuration
  • Tools: A rich set of built-in tools (search, file read/write, code execution, etc.) with MCP integration support
  • Process: Either Sequential or Hierarchical (automatically creates a Manager Agent)

3.3 Key Features

  • Role-playing design: Intuitive role definitions that closely mirror real team collaboration
  • Collaborative workflows: Agents can delegate tasks to one another and pass context between them
  • Four memory systems: Short-term memory, long-term memory, entity memory, and contextual memory
  • Flows: Enterprise-grade event-driven workflow orchestration, supporting @start, @listen, and @router decorators
  • Checkpoint & Fork: Supports saving, restoring, and branching execution state
  • YAML-driven configuration: Agents and tasks can be defined via YAML files

3.4 Code Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from crewai import Agent, Task, Crew, Process

# Define Agents
researcher = Agent(
role='Senior AI Researcher',
goal='Discover the latest development trends in the AI Agent space',
backstory='You are an experienced researcher with a knack for spotting cutting-edge technology developments.',
verbose=True,
memory=True,
)

writer = Agent(
role='Technical Report Writing Specialist',
goal='Transform research findings into clear, well-structured reports',
backstory='You are a technical writing expert who excels at turning complex information into readable reports.',
verbose=True,
memory=True,
)

# Define Tasks
research_task = Task(
description='Conduct comprehensive research on {topic} and gather the latest development trends.',
expected_output='A detailed list of research findings with 10 key points',
agent=researcher,
)

writing_task = Task(
description='Write a complete technical report based on the research findings.',
expected_output='A complete report in Markdown format',
agent=writer,
context=[research_task],
output_file='report.md',
)

# Assemble the Crew and run
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, writing_task],
process=Process.sequential,
verbose=True,
)

result = crew.kickoff(inputs={'topic': 'multi-agent collaboration systems'})

3.5 Strengths and Limitations

Strengths: Fully standalone with no external dependencies, intuitive role-playing design, four memory systems, YAML-driven configuration, active community (100,000+ certified developers)

Limitations: Python only, high API overhead for multi-agent collaboration, complex to debug, enterprise features require a paid plan


IV. LlamaIndex

4.1 Introduction

LlamaIndex (formerly GPT Index) is an open-source framework that started out focused on RAG (Retrieval-Augmented Generation) and has since expanded into a document intelligence and OCR platform. Founded by Jerry Liu in 2022.

Project Info Details
Latest Version v0.14.6
License MIT
Install pip install llama-index
GitHub run-llama/llama_index
Docs developers.llamaindex.ai

4.2 Core Concepts

  • Workflow: An event-driven orchestration mechanism where steps are defined using the @step decorator
  • Context: A global runtime context that coordinates data passing between steps and supports persistence
  • Event-driven architecture: StartEvent → custom events → StopEvent, forming a directed graph
  • AgentWorkflow: A high-level abstraction that automatically selects the appropriate agent type based on LLM capabilities

4.3 Agent Types

Type Use Case Characteristics
FunctionAgent When the LLM supports function calling Uses native function calling directly — most efficient
ReActAgent When the LLM does not support function calling Executes via the ReAct (Reasoning + Acting) loop
CodeActAgent Scenarios that require code execution Generates and executes code via <execute> tags

4.4 Key Features

  • RAG + Agent integration: RAG is a first-class capability, not an add-on; supports 130+ data formats
  • Multi-agent collaboration: Native support for multi-agent handoff mechanisms
  • Context persistence: Workflow state can be serialized and restored, suitable for production environments
  • LlamaParse: Enterprise-grade document parsing and OCR
  • 300+ integration packages: Covers mainstream LLMs, vector databases, and data sources

4.5 Code Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
import asyncio

# Build a RAG index
documents = SimpleDirectoryReader("data").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()

# Define tools
def multiply(a: float, b: float) -> float:
"""Multiply two numbers."""
return a * b

async def search_documents(query: str) -> str:
"""Search documents for answers."""
response = await query_engine.aquery(query)
return str(response)

# Create the agent
agent = FunctionAgent(
tools=[multiply, search_documents],
llm=OpenAI(model="gpt-4o-mini"),
system_prompt="You are a helpful assistant that can calculate and search documents.",
)

# Run
async def main():
response = await agent.run("What did the author do in college? Also, what's 7 * 8?")
print(response)

asyncio.run(main())

4.6 Strengths and Limitations

Strengths: Deep RAG + Agent integration, flexible event-driven architecture, 300+ ecosystem integrations, multi-agent support, LlamaParse enterprise-grade parsing

Limitations: Steep learning curve, relatively heavy framework, TypeScript version has incomplete feature coverage, fast release cycle with frequent breaking changes, enterprise features require a paid plan


V. Dify

5.1 Introduction

Dify (Do It For You) is an open-source LLM application development platform positioned as an agentic workflow builder. It combines Backend-as-a-Service with LLMOps, enabling both non-technical users and developers to rapidly build AI applications.

Project Info Details
Latest Version v1.6.0+
License Dify Open Source License (Apache 2.0+)
Deploy docker compose up -d
GitHub langgenius/dify
Docs docs.dify.ai

5.2 Core Features

  • Visual workflow builder: Drag-and-drop canvas supporting parallel processing, conditional branching, and loop nodes
  • Agent strategies: Supports Function Calling, ReAct, and custom strategy plugins
  • RAG pipeline: A complete data source → processing → knowledge base → retrieval flow
  • Model management: Seamless integration with hundreds of LLMs, with model switching and performance comparison
  • Prompt IDE: An intuitive prompt authoring interface
  • LLMOps: Monitor and analyze application logs and performance

5.3 Agent Strategies

Strategy Use Case
Function Calling Models with native tool calling support (e.g., GPT-4, Claude)
ReAct Models without native function calling, or when explicit reasoning traces are needed
Custom Strategy Plugin Complex behaviors requiring multi-turn tool calls, etc.

5.4 How to Create an Agent

Dify uses a visual / no-code approach:

  1. Create an “Agent” type application in Dify Studio
  2. Select an LLM model
  3. Set the Agent strategy (automatically detects Function Calling support)
  4. Choose from 50+ built-in tools or add custom tools
  5. Write a system prompt
  6. Preview and debug, then publish with one click

5.5 Integration Capabilities

  • API: Full RESTful API with SSE streaming support
  • SDK: Node.js, PHP, and Java clients
  • Plugin system: Six plugin categories — models, tools, agent strategies, extensions, data sources, and triggers
  • MCP integration: Native support for the Model Context Protocol
  • Deployment: Docker Compose, Kubernetes, Terraform, AWS CDK

5.6 Strengths and Limitations

Strengths: Low-code / no-code, ready out of the box (50+ built-in tools), rapid path from prototype to production, multi-model support, active community (800+ contributors)

Limitations: Limited customization flexibility (less than code-first frameworks), execution subject to step/time limits, license is not pure Apache 2.0, risk of platform lock-in, advanced reasoning modes are less mature than dedicated frameworks


VI. OpenAI Agents SDK

6.1 Introduction

OpenAI Agents SDK is a lightweight multi-agent framework officially released by OpenAI, evolved from the internal Swarm experimental project. Its core philosophy is minimalist design — building complex workflows from just a few concepts: Agent, Handoff, Guardrail, and Tool.

Project Info Details
Latest Version v0.14.6 (2026-04-25)
License MIT
Install pip install openai-agents
GitHub openai/openai-agents-python
Docs openai.github.io/openai-agents-python

6.2 Core Concepts

  • Agent: An LLM configured with instructions, tools, guardrails, and handoff capabilities
  • Runner: The agent executor, providing run() (async), run_sync() (synchronous), and run_streamed() (streaming)
  • Handoff: Task delegation between agents; the receiving agent inherits the full conversation history
  • Guardrails: Safety rails in three categories — input guardrails, output guardrails, and tool guardrails
  • Tools: Supports function tools, MCP tools, OpenAI hosted tools, and Agent as Tool

6.3 Key Features

  • Minimalist design: Few core primitives, gentle learning curve
  • Provider-agnostic: Supports 100+ LLMs via any-llm / LiteLLM
  • Three-layer guardrails: Safety validation at the input → output → tool level
  • Built-in Tracing: Visualize and debug agent execution flows
  • Realtime Agents: Build voice agents (gpt-realtime-1.5)
  • Sandbox Agents: Added in v0.14.0 — executes code in a containerized environment
  • Structured output: Define output types via Pydantic Model using output_type

6.4 Code Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import asyncio
from agents import Agent, Runner, function_tool

# Define a tool
@function_tool
def get_weather(city: str) -> str:
"""Get the weather for a specified city."""
return f"The weather in {city} is sunny."

# Define specialist Agents
billing_agent = Agent(
name="Billing Agent",
instructions="You are a billing specialist.",
)

refund_agent = Agent(
name="Refund Agent",
instructions="You are a refund specialist.",
)

# Define a triage Agent
triage_agent = Agent(
name="Triage Agent",
instructions="Route the user's question to the correct specialist Agent: billing issues -> Billing Agent; refund issues -> Refund Agent.",
handoffs=[billing_agent, refund_agent],
tools=[get_weather],
)

# Run
async def main():
result = await Runner.run(
triage_agent,
"I was charged twice for my subscription. Please help me resolve this.",
)
print(f"Final answer: {result.final_output}")
print(f"Handled by Agent: {result.last_agent.name}")

asyncio.run(main())

6.5 Strengths and Limitations

Strengths: Officially maintained, minimalist design, provider-agnostic, three-layer guardrails, built-in tracing, voice agent support

Limitations: Still at 0.x — API may change, deep dependency on the OpenAI ecosystem, no parallel agent execution support, no built-in persistent memory system


VII. Google ADK

7.1 Introduction

Google ADK (Agent Development Kit) is an open-source, code-first agent development framework released by Google. Its design philosophy is to make AI agent development feel like traditional software development. It is optimized for Gemini and Google Cloud, while remaining model-agnostic and deployment-agnostic.

Project Info Details
Latest Version v1.31.1 (2026-04-30)
License Apache 2.0
Install pip install google-adk
GitHub google/adk-python
Docs google.github.io/adk-docs

7.2 Core Concepts

  • LlmAgent (alias Agent): The core building block — combines an LLM model, instructions, and tools
  • SequentialAgent: Executes sub-agents one after another in order (pipeline style)
  • ParallelAgent: Runs multiple sub-agents concurrently
  • LoopAgent: Repeatedly executes sub-agents with support for exit conditions
  • sub_agents: Nesting sub-agents to build hierarchical multi-agent architectures

7.3 Key Features

  • Multi-agent orchestration: Sequential, parallel, loop-based, and LLM-driven dynamic routing
  • Built-in tools: Google Search, Vertex AI Search, code executor, and more
  • Google ecosystem integration: Native Gemini, Vertex AI Agent Engine, Cloud Run
  • Flexible deployment: Local, Agent Engine (fully managed), Cloud Run, GKE, Docker
  • Built-in evaluation: CLI tool adk eval for systematic agent performance assessment
  • A2A protocol: Supports Agent-to-Agent remote communication
  • Lifecycle callbacks: before/after_agent, before/after_model, and before/after_tool hooks

7.4 Code Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import asyncio
from google.adk.agents import Agent, SequentialAgent
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from google.genai import types
from google.adk.tools import google_search

# Define a weather Agent
weather_agent = Agent(
name="weather_assistant",
model="gemini-2.5-flash",
instruction="You are a weather query assistant. Use Google Search to find the latest weather information.",
tools=[google_search],
)

# Define a translation Agent
translate_agent = Agent(
name="translate_assistant",
model="gemini-2.5-flash",
instruction="You are a translation assistant. Translate content into Chinese.",
)

# Compose into a sequential workflow
pipeline = SequentialAgent(
name="WeatherPipeline",
sub_agents=[weather_agent, translate_agent],
)

# Run
session_service = InMemorySessionService()
runner = Runner(agent=pipeline, app_name="weather_app", session_service=session_service)

async def run_agent(query: str):
session = session_service.create_session(
app_name="weather_app", user_id="user_1", session_id="session_1"
)
content = types.Content(role='user', parts=[types.Part(text=query)])
async for event in runner.run_async(
user_id="user_1", session_id="session_1", new_message=content
):
if event.is_final_response() and event.content and event.content.parts:
print(f"Agent reply: {event.content.parts[0].text.strip()}")

asyncio.run(run_agent("What's the weather in Tokyo today?"))

7.5 Strengths and Limitations

Strengths: Code-first, powerful orchestration (sequential / parallel / loop), deep Google ecosystem integration, built-in evaluation, multi-language support (Python / Java / Go / TS), Apache 2.0 open source

Limitations: Best experience requires Gemini and Google Cloud, relatively new framework with an early-stage community ecosystem, frequent releases mean the API may change, access to Google services is restricted from mainland China


VIII. Framework Selection Guide

Choose by Use Case

Use Case Recommended Framework Reason
Complex stateful workflows LangGraph Low-level graph orchestration, persistence, time travel
Multi-role team collaboration CrewAI Role-playing design, delegation mechanism, memory systems
RAG + Agent LlamaIndex Deep RAG integration, 130+ data formats, document parsing
Rapid prototyping / non-technical teams Dify Visual drag-and-drop, low-code, ready out of the box
Primarily OpenAI models OpenAI Agents SDK Officially maintained, minimal API, tracing and debugging
Google Cloud deployment Google ADK Gemini-optimized, Vertex AI integration, built-in evaluation
Need fine-grained control LangGraph / Google ADK Low-level APIs, lifecycle callback hooks
Need production-grade guardrails OpenAI Agents SDK Three-layer Guardrails

Choose by Team Profile

Team Profile Recommendation
Full-stack development teams LangGraph, Google ADK
Python data science teams CrewAI, LlamaIndex
Product managers / operations teams Dify
Heavy OpenAI ecosystem users OpenAI Agents SDK
Google Cloud users Google ADK
Need to validate ideas quickly Dify, OpenAI Agents SDK

Note: The framework information above is based on research conducted in April 2026. All frameworks iterate quickly — check the official documentation for the latest information before getting started.