Day 5 of 17
April 1, 2026

Agent Frameworks

LangGraph, AutoGen, CrewAI, and LlamaIndex — four different bets on how agent systems should be structured, each encoding a fundamentally different theory of control.

⏱ ~22 min read
🧠 Deep Dive
📄 3 verified papers (arXiv)
⭐ 5 repos
🎯 5 expert questions
17-day track
29%

Section 01 — Core Concept

Four Paradigms, One Problem: How Do You Orchestrate Agents?

The analogy first: imagine you're running a consulting firm. You could organize it as a state machine (every handoff is an explicit flowchart), as a roles-based team (hire specialists, let them self-organize), as a conversation room (everyone talks until done), or as a document assembly line (specialized workers process inputs in sequence). These four metaphors map almost exactly to today's four major frameworks.

The core challenge every framework solves is the same: given an LLM that can only process one context window at a time, how do you decompose a complex long-horizon task into steps, pass information between steps, handle failures, and maintain coherent state? Each framework answers this with a different abstraction.

LangGraph
State Machine
CrewAI
Role-Based
AutoGen
Conversation
LlamaIndex
Document-Centric

LangGraph — The State Machine Paradigm

LangGraph (langchain-ai/langgraph) models agent workflows as a directed graph where nodes are Python functions (or LangChain Runnables) and edges are transitions between them. A single StateGraph object holds a typed TypedDict schema — the global shared state — that every node reads from and writes partial updates back to.

The mechanism: when the graph runs, it starts at the START node, calls the current node function with the full state, merges the returned dict into state via a reducer function (e.g., appending to a list vs. overwriting a field), then follows edges to the next node. Conditional edges are functions that inspect state and return the name of the next node, giving you the equivalent of if/else branches in a visual graph. A special END node terminates execution.

Killer feature: persistent checkpointing via Checkpointer backends (SQLite, Redis, Postgres). Every state transition is saved; you can "time travel" backward to any prior state, replay with modified inputs, or interrupt execution for human-in-the-loop review using interrupt(). This makes LangGraph uniquely suited for long-running, fault-tolerant workflows in production.

START
Agent Node
calls LLM
Router
conditional edge
Tool Node
executes action
↑↓
Router
END
Shared TypedDict state flows through every node. Reducers merge partial updates.
LangGraph 1.0 shipped in October 2025 alongside LangChain 1.0 at a $1.25B valuation. The 1.0 contract: no breaking changes until 2.0.

👥CrewAI — The Role-Based Paradigm

CrewAI organizes agents as a crew of specialists with defined roles, goals, backstories, and tool sets. A Crew object holds a list of Agents and a list of Tasks. Each task specifies a description, expected output, and assigned agent. The crew executes tasks sequentially (or in parallel with Process.parallel), with outputs chained as context.

The mechanism: CrewAI uses an internal sequential process by default — each task runs in order, and the output of task N automatically becomes available as context to task N+1. A hierarchical process introduces a manager agent that dynamically assigns tasks to workers, enabling AutoGen-style delegation with CrewAI's declarative interface.

Killer feature: low time-to-working-demo. A functional multi-agent pipeline (researcher → writer → editor) can be running in under an hour with ~20 lines of config-style Python. The role/goal/backstory system leverages LLMs' instruction-following to create specialized behavior without custom prompting.

v1.10.1 (early 2026) added native MCP (Model Context Protocol) and A2A (Agent-to-Agent) support, allowing CrewAI crews to expose and consume standardized tool interfaces.

💬AutoGen / Microsoft Agent Framework — The Conversation Paradigm

AutoGen (microsoft/autogen) models multi-agent collaboration as a structured group chat. Agents are ConversableAgent instances that send and receive messages. A GroupChat + GroupChatManager mediates who speaks next — via round-robin, LLM-based speaker selection, or custom logic.

The mechanism: state is implicit — it lives in the conversation history (the running message thread), not in a typed schema. Each agent maintains its own system prompt and can be configured to auto-reply, call tools, generate code, execute code in a sandbox, or terminate the conversation. The LLM's context window is the state management layer.

Important 2025 update: In October 2025, Microsoft announced that AutoGen and Semantic Kernel are merging into the unified Microsoft Agent Framework (github.com/microsoft/agent-framework). AutoGen remains maintained for bug/security fixes but will receive no new features. Enterprise teams are migrating to the new framework.

AutoGen's conversation-as-state model is malleable but can degrade over long contexts — once the history overflows the context window, agents lose early-task context unless explicit summarization is implemented.

📄LlamaIndex — The Document-Centric Paradigm

LlamaIndex (run-llama/llama_index) began as a RAG indexing library and has pivoted to become a platform for agentic document processing. Its core abstraction is the QueryEngine (single document query) and AgentRunner (multi-step reasoning over documents), with a composable pipeline API via QueryPipeline.

The mechanism: LlamaIndex's agents use a task-step execution loop — a Task decomposes into TaskSteps, each producing a TaskStepOutput that may trigger further steps. The framework provides first-class support for structured extraction, OCR pipelines, and document workflows, making it the natural choice when unstructured document data is central to the task.

Differentiator: LlamaIndex's connector ecosystem (150+ data loaders from the LlamaHub) and its production-grade RAG stack (covered in Day 4) make it uniquely powerful for knowledge-intensive agent applications. LlamaDeploy handles async multi-service agent deployments.

As of 2025-26, LlamaIndex positions itself as "document infrastructure for the agentic era" rather than a general-purpose orchestration framework — a deliberate narrowing that has driven focus.

⚖️The Trade-Off Matrix

There is no universally superior framework — each optimizes for different constraints:

Framework Control Speed to First Demo Production Readiness Best For
LangGraph ⬤⬤⬤⬤⬤ ⬤⬤ ⬤⬤⬤⬤⬤ Complex stateful pipelines
CrewAI ⬤⬤⬤ ⬤⬤⬤⬤⬤ ⬤⬤⬤⬤ Multi-role workflows, rapid prototyping
AutoGen ⬤⬤⬤ ⬤⬤⬤⬤ ⬤⬤⬤ Conversational agents, research
LlamaIndex ⬤⬤⬤ ⬤⬤⬤⬤ ⬤⬤⬤⬤⬤ Document-heavy knowledge tasks

Section 02 — Papers to Know

Research That Shaped How We Build Agent Frameworks

arXiv preprint 2025 arXiv:2512.01939
An Empirical Study of Agent Developer Practices in AI Agent Frameworks
arXiv, December 2025 · arXiv:2512.01939
This paper is the first large-scale empirical study of how developers actually use agent frameworks in the wild. The authors analyzed 10 frameworks (including LangChain, LangGraph, AutoGen, CrewAI, Swarm, MetaGPT, LlamaIndex, and Semantic Kernel) by mining real developer projects created or updated between 2022 and July 2025. They studied GitHub issues, discussions, and code patterns to understand pain points, anti-patterns, and best practices.

The central finding: more than 80% of developers report difficulty identifying which framework best fits their requirements — because frameworks lack standardized capability taxonomies. Despite surface differences, different frameworks hit the same recurring failure modes: state management corruption, tool call hallucination loops, and non-deterministic output formats.
Why it matters: This is the empirical reality check the field needed. Engineering teams at enterprise scale routinely migrate between frameworks (LangChain → LangGraph, AutoGen → Microsoft Agent Framework) — this paper explains why: framework selection friction is real, and the cost of choosing wrong is high. Knowing this paper signals you understand that "which framework?" is still an open research problem, not a settled question.
arxiv.org/abs/2512.01939 ↗
arXiv preprint 2025 arXiv:2511.00872
A Comprehensive Empirical Evaluation of Agent Frameworks on Code-centric Software Engineering Tasks
Zhuowen Yin, Cuifeng Gao, Chunsong Fan, Wenzhang Yang, Yinxing Xue, Lijun Zhang · arXiv, November 2025 · arXiv:2511.00872
The authors benchmarked seven general-purpose agent frameworks on three code-centric SE tasks: software development, vulnerability detection, and program repair, using standard benchmarks (SWE-bench lite, BigVul, Defects4J). They evaluate each framework across three dimensions: effectiveness (task success rate), efficiency (execution steps), and overhead (token consumption per task).

Key finding: no single framework dominates all three dimensions. Frameworks built for explicit control (graph-based) tend to have higher effectiveness on structured tasks but consume more tokens per successful completion. Conversational frameworks show higher variance — sometimes dramatically more efficient, sometimes catastrophically worse depending on task type.
Why it matters: This is the benchmarking paper that grounds the "which framework?" debate in measurable outcomes rather than developer preference. It establishes that framework choice has significant cost implications (2–5x token consumption differences), which maps directly to enterprise ROI calculations that a CGO needs to navigate.
arxiv.org/abs/2511.00872 ↗
Major Survey arXiv:2510.25445
Agentic AI: A Comprehensive Survey of Architectures, Applications, and Future Directions
arXiv, October 2025 · arXiv:2510.25445 (also published in Artificial Intelligence Review, Springer, November 2025)
A PRISMA-based systematic review of 90 agentic AI studies from 2018–2025, introducing a dual-paradigm framework that classifies agentic systems into symbolic/classical lineages and neural/generative lineages. The paper provides a taxonomy of orchestration models, covering AutoGen's conversation-based coordination, LangGraph's state machine control, and role-based multi-agent systems. It also surveys application domains: software engineering, scientific discovery, healthcare, and enterprise automation.
Why it matters: The closest thing to a "textbook chapter" on agent frameworks as of late 2025. The dual-paradigm taxonomy (symbolic vs. neural lineage) is the vocabulary that research papers and conference panels now use when positioning frameworks. Knowing this taxonomy lets you contextualize news about new frameworks instantly.
arxiv.org/abs/2510.25445 ↗

Section 03 — GitHub Pulse

The Framework Ecosystem by the Numbers

langchain-ai/langgraph
★ ~28K
Build resilient language agents as graphs. The state machine approach to agent orchestration.
Architectural interest: typed state schema + reducer functions is a fundamentally different mental model from pure LLM conversation. The interrupt() API for human-in-the-loop is the most mature in any OSS framework.
1.0 GA
crewAIInc/crewAI
★ ~45K
Framework for orchestrating role-playing, autonomous AI agents. Fastest-growing agent framework in 2025.
Architectural interest: the role/goal/backstory triple as a declarative agent spec is both its strength (easy to understand) and its weakness (no formal execution guarantees). Native MCP + A2A support in v1.10.1 is a significant architectural bet.
hottest
microsoft/autogen
★ ~50K
Original Microsoft multi-agent conversation framework. Now in maintenance mode as Microsoft Agent Framework takes over.
Architectural interest: the ConversableAgent + GroupChatManager pattern proved that LLMs could be reliable orchestrators when given explicit termination conditions. The speaker-selection problem it surfaced is now a core research topic.
run-llama/llama_index
★ ~47K
The leading document agent and OCR platform. Originally an indexing library; pivoted to agentic document processing.
Architectural interest: the QueryPipeline composability model — connecting data loaders, transformations, and LLM calls as typed DAG nodes — is the cleanest abstraction for document-centric agentic tasks.
microsoft/agent-framework
actively maintained
The new unified Microsoft framework merging AutoGen and Semantic Kernel. Announced October 2025.
Architectural interest: represents Microsoft's theory that enterprise agents need both AutoGen's multi-agent patterns AND Semantic Kernel's function-calling + memory abstractions in a single framework. Watch this repo closely — it will define enterprise agent architecture for Microsoft shops.
new

Section 04 — Community Pulse

What the Field Is Saying Right Now

HC
Harrison Chase
CEO, LangChain · @hwchase17
As part of this announcement, we're also releasing LangChain and LangGraph 1.0 — the best way to explore them? A brand new docs site!
From Chase's X post announcing LangChain 1.0 and a $1.25B Series B (October 2025). Chase has consistently argued that better models alone are insufficient for production agents — what matters is the "agent engineering platform" around them: observability, checkpointing, and human-in-the-loop infrastructure. This is LangGraph's core product thesis. Source: x.com/hwchase17 post
JL
Jerry Liu
CEO, LlamaIndex · @jerryjliu0
[LlamaIndex] is more than a RAG Framework. It is Agentic Document Processing.
Liu has argued that the competitive differentiation for LlamaIndex is not orchestration breadth (LangGraph's territory) but depth in document intelligence: structured extraction, OCR, and the 150+ data connector ecosystem. The company has deliberately narrowed its mission, positioning as infrastructure rather than a general orchestration layer. Source: llamaindex.ai blog
MS
Microsoft Research
AutoGen team / microsoft/agent-framework
AutoGen and Semantic Kernel are merging into a single, unified framework under the name Microsoft Agent Framework... AutoGen will still be maintained — it has a stable API and will continue to receive critical bug fixes and security patches — but significant new features will not be added to it.
From the official AutoGen GitHub discussion #7066 (October 2025). This is a significant architectural signal: Microsoft is betting that enterprise agent systems need orchestration (AutoGen's strength) and function-calling/memory management (Semantic Kernel's strength) in a single coherent framework. The announcement created visible community anxiety about migration path. Source: github.com/microsoft/autogen discussions/7066

Section 05 — Platform Deep-Dive

How the Major Platforms Implement Agent Orchestration

🤖Claude / Anthropic

Anthropic does not publish a proprietary agent framework in the traditional sense. Instead, the Claude API exposes tool use (function calling), computer use, and a raw streaming API that framework authors build on top of. Claude's "orchestration" is provided by frameworks like LangGraph or CrewAI that call the Claude API.

Notable: Claude Code (Anthropic's agentic coding product) implements its own internal hub-and-spoke agent architecture — a central orchestrator agent spawns specialized subagents via the Agent tool (which you're experiencing right now). This architecture is detailed in OpenClaw's SKILL.md documentation and has become a reference design for agentic tool builders.

Recent: The Claude Agent SDK (underlying Cowork and Claude Code) uses a task-based subagent model where each Agent tool invocation creates an isolated context. This is closer to LangGraph's explicit state management model than AutoGen's conversation model.

OpenAI / Codex / Agents SDK

OpenAI's Agents SDK (open-sourced in 2025) uses a handoff model — agents can transfer control to other agents by calling a special handoff() function. State is passed as a context object. This is conceptually close to CrewAI's sequential task model but with explicit handoff semantics rather than implicit chaining.

Swarm: OpenAI's earlier experimental multi-agent framework (now deprecated in favor of the Agents SDK) proved that minimal abstractions (agents + handoffs + context variables) were sufficient for most multi-agent patterns. The Agents SDK formalizes this minimalist philosophy.

GPT-5-class models: OpenAI's latest models have stronger built-in tool routing, reducing the need for explicit orchestration logic in simple cases — the model itself can decide which tool to call without a supervisor agent.

🟢Google / Gemini / Agent Development Kit (ADK)

Google released the Agent Development Kit (ADK) in early 2025 as an open-source Python framework for building multi-agent systems on Gemini models. ADK uses a hierarchical agent model where a root agent can delegate to sub-agents, with built-in integration to Google Cloud services (Vertex AI, BigQuery, Cloud Storage).

Architectural bet: ADK's deep Cloud integration is its moat — if your data and compute already live in GCP, ADK provides the lowest-friction path to production agent deployment. The framework was included in the systematic comparison paper (arXiv:2512.01939) and benchmarked competitively against LangGraph and CrewAI for structured enterprise tasks.

Gemini 2.x long context: Google's 1M-token context window changes the state management calculus — Gemini-based agents can hold significantly more conversation history before context overflow becomes an issue, partially mitigating AutoGen-style conversation model weaknesses.

📎OpenClaw (Claude Code)

OpenClaw is the community name for Claude Code's open-source agent architecture, built on Anthropic's Claude Agent SDK. Its hub-and-spoke model uses a primary Claude instance as the orchestrator, spawning specialized subagents via the Agent tool for parallelizable work. The SKILL.md system (today's Day 5 prompt is literally running inside this architecture) provides domain-specific instructions injected at agent invocation time.

Framework comparison: OpenClaw's architecture is most similar to LangGraph's explicit orchestration model — the orchestrator has deterministic control over when subagents are spawned and how results flow back — but without the typed state schema. Context passing is via natural language in the Agent tool's prompt parameter rather than a structured dict.

Security note: The December 2025 security report identified 9 CVEs and 1,184 malicious skills in the OpenClaw plugin ecosystem — a reminder that any framework with third-party plugin/tool extensibility inherits the supply chain risk of those extensions. (More in Day 14.)


Section 06 — Vocabulary

Engineer-Level Definitions

StateGraph
LangGraph's core class: a directed graph where nodes are Python functions and edges define transition logic. Constructed with a TypedDict schema defining the shared state, then compiled to a runnable with .compile(checkpointer=...).
⚠ Avoid: "LangGraph is just a flowchart tool." A StateGraph enforces typed state, reducer semantics, and supports parallel branches, checkpointing, and subgraph composition — far beyond a visual flowchart.
✓ "The StateGraph's reducer for the messages field uses add_messages to append rather than overwrite, giving us a persistent conversation trace across nodes."
Reducer
In LangGraph, a function that determines how a node's partial state update merges into the global state. Annotated with Annotated[list, operator.add] for append semantics, or left as a plain type for overwrite semantics. Controls whether state accumulates or is replaced.
⚠ Avoid: confusing this with Redux reducers — the concept is analogous but not identical. LangGraph reducers are per-field, not per-action-type.
✓ "Without the append reducer on tool_calls, each node would overwrite prior tool results instead of accumulating them."
Handoff (Agents SDK)
In OpenAI's Agents SDK, the mechanism by which one agent transfers execution control to another. The calling agent returns a handoff(target_agent, context) value; the SDK routes the conversation to the target agent with the provided context. Distinct from a tool call — a handoff terminates the current agent's turn.
⚠ Avoid: calling all agent-to-agent interactions "handoffs." In LangGraph you have edges; in CrewAI you have task delegation; "handoff" is specifically OpenAI SDK terminology.
✓ "The triage agent performs a handoff to the billing-specialist agent when the user's intent is payment-related, rather than trying to handle it inline."
Human-in-the-Loop (HITL)
A workflow pattern where agent execution pauses at a defined breakpoint and waits for human input before continuing. In LangGraph, implemented via interrupt() in a node function and graph.invoke(Command(resume=human_input)) to continue. State is checkpointed during the pause, enabling fault-tolerant interruptions.
⚠ Avoid: treating HITL as binary (either the agent is fully autonomous or a human approves every step). The interesting design space is threshold-based HITL — humans only intervene when confidence scores drop below a threshold.
✓ "We implemented HITL at the financial transaction node — the agent pauses before any API call with a value above $1,000 and awaits human confirmation."
Orchestrator vs. Worker Agent
Architectural distinction between a supervisor/orchestrator agent (decomposes tasks, assigns work, synthesizes results) and worker/executor agents (perform specific actions without meta-level reasoning about the overall task). Most production multi-agent systems use a two-level or three-level hierarchy.
⚠ Avoid: treating all agents as equivalent. The orchestrator typically uses a more capable (and expensive) model; worker agents can use smaller, faster, cheaper models fine-tuned for specific tasks.
✓ "Our orchestrator runs on Claude Opus 4.6 for planning; the 12 worker agents each use Haiku 4.5 — 3x cheaper per task with no quality loss on the leaf-node subtasks."
Conditional Edge
In LangGraph, an edge whose target node is determined at runtime by a function that inspects the current state. Defined with add_conditional_edges(source_node, routing_function, {"route_name": target_node}). The routing function returns a string key that maps to a target node name.
⚠ Avoid: implementing complex conditional logic inside agent nodes via prompt engineering when a conditional edge would make the logic explicit, testable, and observable in a graph visualization.
✓ "The conditional edge after the tool-calling node routes to end if no tools were called, or back to tool_executor if tool calls are pending."
Hierarchical Process (CrewAI)
CrewAI's execution mode where a manager agent (automatically created or explicitly defined) dynamically assigns tasks to worker agents based on their roles and the task requirements. Contrasts with sequential process, where tasks run in a fixed order without a manager agent.
⚠ Avoid: defaulting to hierarchical process for all tasks — it adds an LLM call (the manager's decision) to every task assignment. For well-defined linear workflows, sequential process is faster and cheaper.
✓ "We switched from sequential to hierarchical process when task interdependencies became complex enough that a fixed order caused redundant work."
QueryPipeline (LlamaIndex)
LlamaIndex's DAG-based composability layer: connects data loaders, transformations, LLM calls, and output parsers as typed nodes with explicit data flow. Each node implements the QueryComponent interface; edges define how output types map to input types. Supports both synchronous and async execution.
⚠ Avoid: using LlamaIndex's QueryPipeline as a general-purpose orchestration framework for non-document tasks — LangGraph handles those better. QueryPipeline's advantage is its tight integration with LlamaIndex's indexing, retrieval, and extraction stack.
✓ "The QueryPipeline chains PDF extraction → entity recognition → knowledge graph insertion in a single typed DAG that we can introspect and debug node-by-node."

Section 07 — Expert Questions

Five Questions That Signal Deep Understanding

Q1
LangGraph's reducer model for state management prevents race conditions in parallel node execution — but what happens when two parallel branches both write to a field with overwrite semantics instead of append semantics, and how do you architect around it?
Q2
CrewAI's role/goal/backstory system produces consistent agent behavior — but what's the failure mode when an agent's "backstory" conflicts with the tool's actual capabilities? How do you detect and prevent the framework producing confident-but-hallucinated tool outputs?
Q3
AutoGen's conversation-as-state model degrades over long contexts as the history grows beyond the model's effective attention range. What are the practical strategies for context compression in a GroupChat with 5+ agents over a 100-turn conversation?
Q4
The arXiv:2511.00872 benchmark found 2–5x token consumption differences between frameworks on identical tasks. How much of that variance is attributable to the framework's architecture versus prompt engineering decisions that could theoretically be equalized?
Q5
Microsoft's decision to sunset AutoGen in favor of Microsoft Agent Framework introduces a migration risk for enterprise teams. Given that AutoGen's conversation model and Semantic Kernel's function-calling model have fundamentally different state management philosophies, what's the non-trivial architectural decision teams face when migrating?

Section 08 — CGO Lens

What Framework Choices Mean for Product, Sales & botlearn.ai

Framework Choice Is a Product Decision, Not Just a Technical One

The One Thing to Internalize

Framework wars are vocabulary wars. The engineers debating LangGraph vs. CrewAI are mostly debating how much explicit control they want over state transitions. Once you internalize that the entire framework landscape is answering the single question — "how should state be managed across agent steps?" — you can navigate any new framework in minutes by asking: where does state live, how does it get updated, and what controls the transitions?


Section 09 — Curriculum Tracker

17-Day Agent Mastery Track

Day 01Full Agent Stack — ReAct loop, LLM+Memory+Planning+Tools
Day 02Memory Architecture — RAG, 4 memory tiers, MemGPT
Day 03Planning & Tool Use — ReWOO, ToT, MCP, tool schemas
Day 04RAG Deep Dive — chunking, hybrid search, eval metrics
Day 05Agent Frameworks — LangGraph, AutoGen, CrewAI, LlamaIndex
Day 06Benchmarks & Eval — SWE-bench, OSWorld, GAIA, AgentBench
Day 07Multi-Agent Systems — orchestration, trust hierarchies, A2A basics
Day 08Computer Use Agents — GUI automation, accessibility trees, vision-based
Day 09Code Agents — SWE-agent, Devin, Codex CLI, codebase understanding
Day 10Long-Horizon Tasks — decomposition, checkpointing, failure recovery
Day 11Agent Safety — prompt injection, sandboxing, Constitutional AI, red-teaming
Day 12Agent Economics — cost/task, token optimization, ROI frameworks
Day 13Research Frontiers — self-improvement, meta-learning, open problems
Day 14OpenClaw Deep-Dive — SKILL.md, hub-and-spoke, 9 CVEs, 1184 malicious skills
Day 15A2A Protocols — Agent Cards, OAuth 2.0, inter-agent trust, 50+ partners
Day 16Agentic Commerce — $0.31 avg tx, Stripe MMP, Visa TAP, agent wallets
Day 17Synthesis — building your agent strategy