LabHub

Blog

AI Agent Frameworks in 2026 — A Deep Dive on LangGraph, AutoGen, CrewAI, OpenAI Agents SDK, Anthropic Agent SDK, and More

한국어English日本語

Prologue — 2026 and the Cambrian Explosion of Agent Frameworks

In spring 2023, when the LangChain ReAct notebook first went viral, "agent framework" was practically a synonym for LangChain. In 2024, AutoGen and CrewAI arrived and the multi-agent buzzword era began. In 2025, OpenAI promoted its experimental Swarm to a formal Agents SDK, and Anthropic released its internal Claude Code engine as the Claude Agent SDK. And in 2026, the market is in full Cambrian explosion mode.

Under the single label "tools for writing AI agents" you now find: official vendor SDKs, graph-based state machine frameworks, role-based crews, minimalist code-execution agents, full-stack TypeScript backend frameworks, structured-output-first libraries, and UI-integrated SDKs. This post draws the map.

An agent framework is not a library — it is an opinion. Choosing a framework means agreeing with its opinion of "this is how an agent should be written." So you are not picking a tool, you are picking an opinion.

This guide covers:

  1. The 2026 map — who builds what, who uses what
  2. What is an agent — Andrew Ng's four design patterns
  3. ReAct, Plan-and-Execute, Tree-of-Thought
  4. OpenAI Agents SDK (March 2025) — heir to Swarm
  5. Anthropic Agent SDK / Claude Code SDK (Sep 2025)
  6. LangGraph — state-machine graphs
  7. AutoGen 0.4 — multi-agent conversation
  8. CrewAI — role-based crews
  9. smolagents, Mastra, Pydantic AI — the minimalist wave
  10. MCP (Nov 2024) — the tool-integration standard
  11. A2A — agent-to-agent protocol
  12. Which framework to pick
  13. Adoption notes from Korea and Japan
  14. References

1. The 2026 Agent Framework Map

Big picture first. Group by who built the framework:

Model-vendor official SDKs

Orchestration frameworks

Minimalist and code-first

Standards camp — protocols, not frameworks

The map's takeaway is simple: there is no single right framework. It depends on the problem, the team, and the model.


2. What Is an Agent — Andrew Ng's Four Patterns

Andrew Ng's spring 2024 talk gave us the cleanest taxonomy of agent design patterns. Two years later it still holds up.

Pattern 1: Reflection. The model critiques and revises its own output. A "draft -> critique -> revise" loop. You get a big quality lift without changing models.

Pattern 2: Tool Use. The model calls external tools — search, calculator, code execution, APIs. This is the step that turns an LLM into an "agent."

Pattern 3: Planning. The model plans a multi-step task before executing. Plan-and-Execute. More efficient than ad-hoc ReAct for complex tasks.

Pattern 4: Multi-Agent. Multiple agents specialize and collaborate. Manager-worker, debate, writer-editor. Distributes the context-overflow problem that single agents suffer from.

A framework's identity is largely defined by which of these it treats as first-class:

FrameworkReflectionTool UsePlanningMulti-Agent
OpenAI Agents SDKDIYFirst-classSupportFirst-class (handoff)
Anthropic Agent SDKDIYFirst-classSupportFirst-class (subagent)
LangGraphExpress as nodesFirst-classFirst-class (graph)First-class
AutoGenFirst-class (critic)First-classFirst-classFirst-class (conversation)
CrewAIDIYFirst-classFirst-class (Process)First-class (Crew)
smolagentsSupportFirst-class (CodeAgent)SupportSupport
Pydantic AISupportFirst-classSupportSupport
LlamaIndex AgentsSupportFirst-classFirst-classSupport
MastraSupportFirst-classFirst-class (workflow)First-class
Vercel AI SDKSupportFirst-classSupportSupport

3. ReAct, Plan-and-Execute, Tree-of-Thought — Comparing the Patterns

Beneath every framework is a runtime algorithm. Three are the most common.

3.1 ReAct (Reasoning + Acting)

The original ReAct paper is Yao et al. 2022. The model alternates Thought, Action, and Observation. In code it's a plain while loop.

while not done and step < max_steps:
    response = model.complete(messages)
    if response.is_final_answer:
        break
    tool_result = execute(response.tool_call)
    messages.append(response)
    messages.append(tool_result)
    step += 1

LangGraph's prebuilt ReAct agent, the OpenAI Agents SDK default agent, and CrewAI's default task execution all sit on this pattern.

3.2 Plan-and-Execute

Plan first, execute second. Wang et al. 2023's "Plan-and-Solve." The planner calls the model once; the executor can use a smaller model or deterministic code.

Stage 1 (Planner):  goal -> step 1, step 2, ..., step N
Stage 2 (Executor): run steps sequentially/in parallel, replan if needed

LangGraph has a canonical Plan-and-Execute example. CrewAI's hierarchical Process expresses this too.

3.3 Tree-of-Thought

Branch multiple reasoning paths into a tree and pick the most promising. Yao et al. 2023. Expensive but strong on hard reasoning and planning.

        goal
       /  |  \
   thoughtA  thoughtB  thoughtC
     |    |    |
   ... evaluate, pick best branch ...

Few frameworks support pure ToT first-class. LangGraph can model it; AutoGen's GroupChat can approximate it.


4. OpenAI Agents SDK (March 2025) — The Heir to Swarm

In March 2025, OpenAI graduated the experimental Swarm into the official Agents SDK. Python (official) and TypeScript (late 2025).

Core abstractions

Example

from agents import Agent, Runner, handoff

triage = Agent(
    name="triage",
    instructions="Classify the customer's question and hand off.",
    handoffs=[refund_agent, support_agent],
)

result = Runner.run_sync(triage, "I want a refund")
print(result.final_output)

Handoff is similar to a LangGraph edge or AutoGen's next-speaker selection, but here an agent calls another agent like a function. The mental model is more imperative.

Strengths

Weaknesses


5. Anthropic Agent SDK / Claude Code SDK (September 2025)

Anthropic has run Claude Code, its own coding agent, since 2024. In September 2025 it exposed that internal engine as the Claude Agent SDK.

Core concepts

Example

import { ClaudeAgent } from '@anthropic-ai/claude-agent-sdk'

const agent = new ClaudeAgent({
  model: 'claude-sonnet-4',
  systemPrompt: 'You are a careful research assistant.',
  tools: [webSearchTool, fileTool],
  hooks: {
    beforeToolUse: async (call) => {
      console.log('about to call', call.name)
    },
  },
})

const result = await agent.run('Explain MCP in 5 bullets.')

Strengths

Weaknesses


6. LangGraph — State-Machine Graphs

LangGraph is the LangChain team's "agents as graphs" framework. Free-form LangChain chains became debugging nightmares, so LangGraph introduced explicit nodes, edges, and shared state.

Core model

Example

from langgraph.graph import StateGraph, END

graph = StateGraph(State)
graph.add_node("planner", planner_node)
graph.add_node("executor", executor_node)
graph.add_node("verifier", verifier_node)

graph.set_entry_point("planner")
graph.add_edge("planner", "executor")
graph.add_conditional_edges(
    "verifier",
    lambda s: "retry" if s.needs_retry else "done",
    {"retry": "executor", "done": END},
)

app = graph.compile()
result = app.invoke({"goal": "deploy app"})

Strengths

Weaknesses


7. AutoGen 0.4 (Microsoft) — Multi-Agent Conversation

Microsoft Research's AutoGen has been the multi-agent flagship since 2023. Late 2024 to early 2025 saw an almost complete rewrite at 0.4, moving to an asynchronous actor model.

Core concepts

Example (0.4 new API)

from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_ext.models.openai import OpenAIChatCompletionClient

model = OpenAIChatCompletionClient(model="gpt-4o")
coder = AssistantAgent("coder", model_client=model)
reviewer = AssistantAgent("reviewer", model_client=model)

team = RoundRobinGroupChat([coder, reviewer], termination_condition=...)
result = await team.run(task="Implement quicksort in Python")

Strengths

Weaknesses


8. CrewAI — Role-Based Crews

CrewAI appeared in 2024 and quickly took the "fastest multi-agent prototyping" crown. The metaphor is intuitive: agents have roles, and crews execute tasks.

Core concepts

Example

from crewai import Agent, Task, Crew, Process

researcher = Agent(
    role="Senior Researcher",
    goal="Find the latest trends in AI agents.",
    backstory="You are a tireless researcher with 10 years of experience.",
    tools=[search_tool],
)
writer = Agent(
    role="Tech Writer",
    goal="Turn research into a clear blog post.",
    backstory="You write for developers who want signal, not hype.",
)

research_task = Task(description="Research the top 5 trends.", agent=researcher)
write_task = Task(description="Write a 1000-word post.", agent=writer)

crew = Crew(agents=[researcher, writer], tasks=[research_task, write_task], process=Process.sequential)
result = crew.kickoff()

Strengths

Weaknesses


9. smolagents, Mastra, Pydantic AI — The Minimalist Wave

For people tired of heavy frameworks, 2024 and 2025 brought a minimalist camp.

9.1 smolagents (Hugging Face, 2024)

A deliberately small agent library from Hugging Face. One-liner: "Code is the new function call."

from smolagents import CodeAgent, HfApiModel

agent = CodeAgent(tools=[search_tool], model=HfApiModel())
agent.run("What is the GDP per capita of Korea in 2025?")

9.2 Mastra (TypeScript, gaining traction in 2025)

Mastra is a TypeScript full-stack backend framework. If Vercel AI SDK is strong on the frontend React side, Mastra puts backend workflows, memory, agents, and RAG in one box.

import { Agent } from '@mastra/core'

const agent = new Agent({
  name: 'support',
  instructions: 'You answer support questions.',
  model: { provider: 'OPEN_AI', name: 'gpt-4o' },
  tools: { lookupOrder, refund },
})

const result = await agent.generate('Where is my order?')

9.3 Pydantic AI (Pydantic team, late 2024)

From the Pydantic team. One-liner: "What FastAPI did for the web, this does for LLMs."

from pydantic import BaseModel
from pydantic_ai import Agent

class Order(BaseModel):
    id: str
    status: str

agent = Agent('openai:gpt-4o', result_type=Order)
result = await agent.run('Look up order 12345.')
print(result.data.status)  # type-safe

10. Model Context Protocol (MCP, November 2024) — A Tool Standard Arrives

In November 2024 Anthropic released the Model Context Protocol (MCP). One-liner: USB-C between agents and tools.

The problem

Every framework had its own tool definition format. LangChain Tools, OpenAI functions, Anthropic tool_use — all slightly different. Writing a new tool meant writing it N times for N frameworks. MCP exists to fix this.

Core concepts

Where it's used

Why it matters

MCP standardizes tools independently of the framework choice. You may swap frameworks, but a good MCP server lives across them. That's a real reduction in lock-in.


11. A2A (Agent-to-Agent) — The Cross-Agent Protocol

If MCP standardizes "agent and tool," A2A is the candidate standard for "agent and agent." Google led the initial 2025 release, and several vendors are participating.

Why it's needed

Cross-company agent collaboration is on the horizon. Example: our sales agent asks a partner company's pricing agent for a quote. The two agents run on different frameworks, models, and hosts.

You then need:

Core ideas

As of 2026 A2A is not yet a "settled" standard, but multi-agent systems crossing org boundaries will eventually need this. MCP went from launch to de facto standard in about a year; A2A could follow.


12. Which Framework Should You Pick?

Recommendations by scenario.

Scenario A — "Spin up a notebook and try one quickly"

-> OpenAI Agents SDK or CrewAI. Results within ten minutes.

Scenario B — "Production chatbot or support agent"

-> OpenAI Agents SDK (if OpenAI-heavy) or Anthropic Agent SDK (if Claude-heavy). Guardrails, tracing, permission gates are first-class.

Scenario C — "Complex workflow with branches and retries"

-> LangGraph. Explicit graphs and checkpoints shine.

Scenario D — "Multiple agents debating or collaborating"

-> AutoGen 0.4 or CrewAI. Strong multi-agent metaphors.

Scenario E — "RAG-centric — search our docs well"

-> LlamaIndex Agents. First-class indexing and retrieval. Or Mastra for a TS backend.

Scenario F — "TypeScript / Next.js full-stack"

-> Vercel AI SDK for the UI + Mastra for backend workflows.

Scenario G — "Type safety and structured outputs above all"

-> Pydantic AI (Python) or Vercel AI SDK (TS).

Scenario H — "Code execution is the main tool — data and science"

-> smolagents CodeAgent. Or OpenAI Code Interpreter.

Scenario I — "Enterprise — multi-vendor models, audit, governance"

-> Bee Agent Framework (IBM) or LangGraph with LangSmith.

Scenario J — "Future cross-vendor agent collaboration"

-> Any framework with MCP support. Watch A2A.

Decision checklist (10 items)

  1. Which model is your primary? (Can you accept a vendor-locked SDK?)
  2. Single agent or multi?
  3. Is ReAct enough, or do you need Plan-and-Execute?
  4. Do you need a graph and state machine?
  5. Do you need human-in-the-loop?
  6. Do you need checkpoints and time travel?
  7. Are your tools worth standardizing on MCP?
  8. Where do you watch traces? (LangSmith, OpenAI traces, custom)
  9. Language preference? Python or TypeScript?
  10. Six months from now, what's the exit to another framework?

13. Adoption Notes from Korea and Japan

A brief look at East Asia.

Korea

Japan

Common patterns


14. References

Official docs first, then a few key academic and design-pattern references.

Framework official docs

Protocols and standards

Core papers and design patterns

Further reading


Epilogue — Choosing an Opinion

One-sentence summary: an agent framework is not a tool, it's an opinion. OpenAI Agents SDK says "agents hand off like functions." LangGraph says "agents are state machines." CrewAI says "agents are roles." Anthropic Agent SDK says "agents are governed by context management." smolagents says "agents write code."

The same problem gets different solutions under different opinions. So — as much as you debate the model — be conscious that you are also choosing the framework's opinion.

Next post candidates: a deep dive on agent evaluation systems (Inspect AI, Promptfoo, LangSmith), writing your own MCP server, and patterns for subagent orchestration.

"A framework is not a library, it is an opinion. Realizing you are choosing an opinion is the first button on the tool-selection coat."

— AI Agent Frameworks in 2026, end.

Comments

No comments yet.

Sign in to leave a comment