Every major AI lab shipped an agent framework in the past year. Google released ADK. Anthropic published the Claude Agent SDK. LangChain evolved into LangGraph. CrewAI went from prototype to production. Vercel added multi-step tool loops to their AI SDK. And Model Context Protocol became the universal connector between agents and the outside world.
If you're building an AI agent today, you have more options than at any point in the field's history. The question isn't can you build an agent — it's which framework matches your constraints.
This post is a practitioner's comparison. Not benchmarks on toy tasks, but architecture decisions, production trade-offs, and a framework for choosing. I've built production systems with four of these frameworks and have opinions about when each one shines.
The core abstraction: how agents work
Strip away the framework differences and every agent system has the same loop:
1. Receive input (user message, event, trigger)
2. Reason about what to do (LLM inference)
3. Act (call a tool, delegate to another agent, or respond)
4. Observe (process tool results)
5. Repeat until doneThe frameworks differ in who controls the loop and how state flows between steps.
| Approach | Control | Frameworks |
|---|---|---|
| Model-driven | The LLM decides next actions | Google ADK, Anthropic SDK, Vercel AI SDK |
| Graph-driven | A state machine controls flow | LangGraph |
| Role-driven | Predefined agent roles and task assignments | CrewAI |
This isn't a purity distinction — most real systems blend approaches. But understanding the primary control mechanism tells you what a framework optimizes for.
Google Agent Development Kit (ADK)
ADK is Google's opinionated framework for building Gemini-powered agents. Released at I/O 2025, it's designed for the Google Cloud ecosystem.
Architecture: Agents are declarative objects with a model, instruction prompt, tools, and optional sub-agents. The model drives all decisions — there's no explicit state machine. Sub-agents form a tree, with the root agent delegating tasks downward.
from google.adk import Agent, tool
@tool
def search_docs(query: str) -> list[str]:
"""Search internal documentation."""
return vector_search(query, top_k=5)
@tool
def run_query(sql: str) -> dict:
"""Execute a read-only SQL query against the analytics database."""
return execute_readonly(sql)
researcher = Agent(
name="researcher",
model="gemini-2.5-flash",
instruction="You find information in docs and databases.",
tools=[search_docs, run_query],
)
writer = Agent(
name="writer",
model="gemini-2.5-flash",
instruction="You write clear, concise reports from research findings.",
tools=[],
)
coordinator = Agent(
name="coordinator",
model="gemini-2.5-pro",
instruction="""Route user requests to the appropriate specialist.
Use 'researcher' for information gathering, 'writer' for report generation.""",
sub_agents=[researcher, writer],
)Strengths: Clean Python API. First-class MCP support. Built-in tools for Google Search grounding and code execution. Deploy directly to Vertex AI Agent Engine or Cloud Run.
Weaknesses: Tightly coupled to Gemini models. No explicit state machine — complex conditional logic lives in the instruction prompt, which is fragile. Limited visibility into agent decisions (no built-in tracing beyond logs).
Best for: Google Cloud shops using Gemini, teams wanting fast time-to-production with managed infrastructure.
LangGraph
LangGraph models agents as stateful directed graphs. Nodes are functions (often LLM calls), edges are conditional transitions, and state is a typed dictionary that flows through the graph.
Architecture: You define the graph explicitly — every decision point is a conditional edge you wrote. The LLM generates content within nodes, but the flow is deterministic.
from langgraph.graph import StateGraph, END
from typing import TypedDict, Annotated
class AgentState(TypedDict):
messages: list
retrieved_docs: list
needs_more_info: bool
def retrieve(state: AgentState) -> AgentState:
query = state["messages"][-1]["content"]
docs = vector_search(query)
return {"retrieved_docs": docs}
def grade_documents(state: AgentState) -> AgentState:
# LLM judges relevance
relevant = llm_grade(state["messages"][-1], state["retrieved_docs"])
return {"needs_more_info": not relevant}
def generate(state: AgentState) -> AgentState:
answer = llm_generate(state["messages"], state["retrieved_docs"])
return {"messages": state["messages"] + [{"role": "assistant", "content": answer}]}
def should_retry(state: AgentState) -> str:
return "retrieve" if state["needs_more_info"] else "generate"
graph = StateGraph(AgentState)
graph.add_node("retrieve", retrieve)
graph.add_node("grade", grade_documents)
graph.add_node("generate", generate)
graph.add_edge("retrieve", "grade")
graph.add_conditional_edges("grade", should_retry)
graph.add_edge("generate", END)
graph.set_entry_point("retrieve")
app = graph.compile()Strengths: Explicit control flow — you can reason about every possible path. Built-in checkpointing (resume from any state). Human-in-the-loop at any node. Excellent debugging and visualization.
Weaknesses: Verbose. Every edge case requires explicit handling. The graph definition grows with complexity. State management becomes unwieldy for large agent systems.
Best for: Complex workflows needing explicit state machines, compliance-sensitive applications, systems requiring human approval gates, teams that need deterministic behavior.
CrewAI
CrewAI takes a role-based approach: define agents with personas, assign them tasks, and let a crew orchestrate execution.
from crewai import Agent, Task, Crew, Process
researcher = Agent(
role="Senior Research Analyst",
goal="Find comprehensive information about the topic",
backstory="Expert researcher with 10 years of experience...",
tools=[search_tool, scrape_tool],
)
writer = Agent(
role="Technical Writer",
goal="Create clear, engaging content from research",
backstory="Award-winning technical writer...",
tools=[],
)
research_task = Task(
description="Research {topic} thoroughly. Find key facts, trends, and examples.",
agent=researcher,
expected_output="Structured research findings with sources",
)
write_task = Task(
description="Write a comprehensive article based on the research findings.",
agent=writer,
expected_output="Polished article ready for publication",
)
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, write_task],
process=Process.sequential,
)
result = crew.kickoff(inputs={"topic": "agentic AI"})Strengths: Fast to prototype. Intuitive mental model (roles and tasks). Good for content generation and multi-perspective analysis. Active community.
Weaknesses: Less control over execution flow. "Backstory" prompting is prompt engineering dressed up as configuration — fragile and hard to debug. Limited production features (no built-in checkpointing, weak error recovery).
Best for: Content pipelines, research automation, multi-perspective analysis, rapid prototyping before migrating to a more controlled framework.
Vercel AI SDK
The AI SDK doesn't call itself an "agent framework" — it's a toolkit for building AI features in TypeScript/Next.js apps. But with maxSteps and tool calling, it implements the core agent loop.
import { generateText } from "ai";
import { google } from "@ai-sdk/google";
import { tool } from "ai";
import { z } from "zod";
const searchTool = tool({
description: "Search the knowledge base",
parameters: z.object({ query: z.string() }),
execute: async ({ query }) => vectorSearch(query),
});
const result = await generateText({
model: google("gemini-2.5-flash"),
tools: { search: searchTool },
maxSteps: 5,
system: "You are a helpful assistant. Use the search tool to find information.",
prompt: userQuestion,
});Strengths: TypeScript-native. Streaming UI built-in. Provider-agnostic (swap Gemini for Claude with one line). Excellent React integration via useChat. Lightweight — no framework lock-in.
Weaknesses: No built-in multi-agent orchestration. No state persistence between requests. No graph-based flow control. You build those yourself.
Best for: Next.js/React apps, streaming chat interfaces, simple tool-use agents, teams that want minimal framework overhead.
MCP: The universal tool layer
Model Context Protocol deserves its own section because it's orthogonal to the framework choice. MCP standardizes how agents connect to external tools and data sources.
Agent (any framework)
↓ JSON-RPC
MCP Client
↓ stdio / HTTP+SSE
MCP Server (GitHub, Slack, database, file system, ...)Every framework listed above supports MCP:
- ADK: Native MCP tool integration
- LangGraph: Via
langchain-mcp-adapters - CrewAI: Via LangChain tool bridge
- Vercel AI SDK: Via
@ai-sdk/mcp
The practical implication: build your tool as an MCP server once, and it works with every agent framework. This is especially valuable for internal tools — write one MCP server for your database, and any agent in any framework can query it.
Production patterns that transcend frameworks
Regardless of which framework you choose, these patterns apply:
1. Step limits. Always set a maximum iteration count. Agents can loop indefinitely on ambiguous tasks. 5-10 steps is reasonable for most use cases.
2. Structured output for tool calls. Use JSON schema constraints (Gemini's response_schema, OpenAI's response_format) to ensure tool arguments parse correctly. Malformed tool calls are the #1 runtime failure.
3. Observability. Log every step: the prompt, the model's reasoning, the tool call, and the result. You cannot debug agent failures without full traces.
4. Graceful degradation. When a tool fails or times out, the agent should recover — not crash. Catch tool errors and feed them back as context: "The search tool returned an error. Try a different query or answer with available information."
5. Cost guardrails. A runaway agent can burn through API credits fast. Track token usage per session and kill sessions that exceed a budget.
Decision framework
| Factor | ADK | LangGraph | CrewAI | Vercel AI SDK |
|---|---|---|---|---|
| Model lock-in | Gemini only | Any | Any | Any |
| Control granularity | Medium | High | Low | Medium |
| Multi-agent | Native | Manual (sub-graphs) | Native | Manual |
| Streaming UI | No | No | No | Native |
| Persistence | Vertex AI | Built-in | None | Manual |
| TypeScript | Java/Python | Python | Python | TypeScript |
| Time to prototype | Fast | Slow | Fastest | Fast |
| Production readiness | High (GCP) | High | Medium | High (Vercel) |
Pick based on your primary constraint:
- Deploying on GCP with Gemini? → ADK
- Need deterministic flows with human gates? → LangGraph
- Prototyping multi-role workflows fast? → CrewAI
- Building a Next.js app with streaming? → Vercel AI SDK
Conclusion
The "best" agent framework doesn't exist. The best framework for your system depends on your deployment target, your team's language preference, how much control you need over execution flow, and whether you're building a chat interface or a background automation.
Start with the simplest option that meets your constraints. Every framework can build the same agent — they just differ in how much of the orchestration you write yourself versus trust to the model. More control means more code but more predictability. Less control means faster iteration but harder debugging.
The one universal recommendation: adopt MCP for your tool layer regardless of framework choice. It's the only standard that survives a framework migration.