# Agentic AI frameworks explained: the Lang family and every major alternative

"Lang" now names a whole family of tools that do different jobs: a framework, a runtime, an observability platform, a visual builder, a memory library and an unrelated open-source tracer. Around them sit a dozen other frameworks from Microsoft, Google, OpenAI, AWS, Hugging Face and others. This guide explains what each one is for, shows the same small agent in several of them, and ends with a way to choose.

Every agent, whatever framework builds it, is the same loop: a model reads the situation, picks an action, a tool runs, and the result goes back to the model until the task is done. Frameworks differ in what they add around that loop: how state is stored, how much control you have over the order of steps, how several agents hand work to each other, how a run survives a crash, and how you see what happened.

A useful way to hold them apart is a building analogy. A **library** gives you bricks (model wrappers, tool definitions, retrievers). A **runtime** is the building's frame: it decides what runs next, keeps the state, and lets work pause and resume. A **harness** is a furnished flat on top of the frame, with planning, a file system and sub-agents already in place. **Platforms** are the building services: monitoring, deployment, evaluation. Several "Lang" names belong to different layers, which is why they are easy to confuse.

## The simulation: what every framework is wrapping

Pick a task and step through it. One supervisor model routes work to specialist agents and collects their results. Every framework in this guide can build this shape; they differ in how much of it you write yourself.

<div data-sim="supervisor"><p>Interactive multi-agent supervisor simulation. It needs JavaScript; the steps are described in the text.</p></div>

## The Lang family, one by one

Only three of these come from the same company (LangChain Inc.): LangChain, LangGraph and LangSmith, plus Deep Agents and LangMem. Langflow and Langfuse are separate projects with similar names.

| Name | Layer | Maker | What it is for |
|---|---|---|---|
| LangChain | Library and agent API | LangChain Inc., MIT licence | Model and tool integrations; `create_agent` builds a standard tool-calling agent |
| LangGraph | Runtime | LangChain Inc., MIT licence | Graphs of steps with shared state, checkpoints, pauses for human approval, streaming |
| Deep Agents | Harness | LangChain Inc., MIT licence | Long-running agents with planning, a virtual file system and sub-agents, built on LangGraph |
| LangSmith | Platform | LangChain Inc., commercial | Tracing, evaluation, prompt management and deployment, for any framework |
| LangSmith Deployment | Hosting | LangChain Inc. | Hosting for LangGraph agents; previously called LangGraph Platform |
| LangServe | Legacy hosting | LangChain Inc. | The 2023 way to serve chains as REST APIs; new projects use LangSmith Deployment |
| LangMem | Library | LangChain Inc. | Long-term memory for agents: extract, store and recall facts across sessions |
| Langflow | Visual builder | Started by Logspace; DataStax, now IBM | Drag-and-drop builder for agents and RAG flows, exported as an API |
| Langfuse | Platform | Langfuse, now part of ClickHouse; MIT core | Open-source tracing, evaluation and prompt management, self-hostable |

### LangChain: the library and the standard agent

LangChain started in 2022 as a library of connectors: one interface for hundreds of model providers, vector stores, document loaders and tools. Its early "chains" earned a reputation for layers of abstraction. Version 1.0, released together with LangGraph 1.0 on 22 October 2025, cut the package down to a small core and made one function the centre: `create_agent`, a tool-calling agent that runs on the LangGraph runtime underneath. Behaviour such as summarising long histories, asking a person before a risky tool call or redacting personal data is added as middleware instead of subclassing.

```python
# pip install langchain langchain-anthropic
from langchain.agents import create_agent

def get_order_status(order_id: str) -> str:
    """Return the shipping status of an order, e.g. 'shipped' or 'processing'."""
    return {"A-1001": "shipped", "A-1002": "processing"}.get(order_id, "unknown order")

agent = create_agent(
    model="anthropic:claude-sonnet-5-5",
    tools=[get_order_status],
    system_prompt="You are a support agent. Use tools for facts; never guess an order status.",
)
result = agent.invoke({"messages": [{"role": "user", "content": "Where is order A-1002?"}]})
print(result["messages"][-1].content)
```

Use LangChain when you want the standard agent loop with the widest choice of integrations, and expect to drop down to LangGraph when the flow needs more control.

### LangGraph: the runtime with checkpoints

LangGraph models an agent as a graph. Nodes are steps (call the model, run tools, ask a person), edges decide what runs next, and a typed state object is passed along. A **checkpointer** saves the state after every step, which gives three things production agents need: a run can resume after a crash, a person can pause it for approval and continue, and you can replay an old run from any step to debug it.

```python
# pip install langgraph langchain-anthropic
from langgraph.graph import StateGraph, MessagesState, START
from langgraph.prebuilt import ToolNode, tools_condition
from langgraph.checkpoint.memory import InMemorySaver
from langchain.chat_models import init_chat_model

llm = init_chat_model("anthropic:claude-sonnet-5-5").bind_tools([get_order_status])

def call_model(state: MessagesState):
    return {"messages": [llm.invoke(state["messages"])]}

g = StateGraph(MessagesState)
g.add_node("agent", call_model)
g.add_node("tools", ToolNode([get_order_status]))
g.add_edge(START, "agent")
g.add_conditional_edges("agent", tools_condition)   # tool call -> "tools", otherwise end
g.add_edge("tools", "agent")
app = g.compile(checkpointer=InMemorySaver())       # use a Postgres or SQLite saver in production

cfg = {"configurable": {"thread_id": "customer-42"}}
app.invoke({"messages": [("user", "Where is order A-1001?")]}, cfg)
app.invoke({"messages": [("user", "And A-1002?")]}, cfg)   # same thread: remembers the conversation
```

The [LangGraph state and checkpoint simulation](/ai-simulations/langgraph-state-checkpoints) shows the state and the saved checkpoints after each step, and the [agent-from-scratch guide](/articles/build-agentic-ai-from-scratch-langgraph-langfuse-deepeval-ragas) builds a complete LangGraph agent with tracing and tests.

### Deep Agents: a harness on top

Simple tool loops lose their way on tasks that take hundreds of steps. Deep Agents packages the pattern used by long-running coding and research agents: a planning tool that keeps a to-do list, a virtual file system for notes and intermediate results, sub-agents that take a sub-task with a clean context, and a detailed system prompt. It runs on LangGraph, so checkpoints and human approval still work. In 2026 LangChain added a managed version: Managed Deep Agents opened as a private beta on 13 May 2026 and is in public beta on LangSmith Cloud.

### LangSmith: tracing, evaluation and deployment

LangSmith is the commercial platform around the open-source libraries, and it works with agents written in any framework through its SDK and OpenTelemetry. It records every model call and tool call as a trace, stores datasets and runs evaluations against them, versions prompts, and, under the name **LangSmith Deployment** (formerly LangGraph Platform), hosts LangGraph agents with persistence, task queues and streaming. In 2026 it also gained LangSmith Fleet, the renamed Agent Builder for creating agents without code, and LangSmith Engine, announced at the Interrupt conference in May, which reads traces to find failure patterns and propose fixes.

### LangServe and LangMem

**LangServe** turned a chain into a FastAPI endpoint with one call and was the standard way to deploy in 2023 and 2024. It still works, but it does not handle long-running or stateful agents, and LangChain points new projects to LangSmith Deployment. **LangMem** is a small library for long-term memory: it extracts facts and preferences from conversations, stores them in LangGraph's store and retrieves them in later sessions. The [agent memory page](/tools/agent-memory) explains the kinds of memory an agent can have.

### Langflow: the visual builder

Langflow is a drag-and-drop editor for flows of models, retrievers, tools and agents, which can be run as an API or exported as JSON. It began in 2023 at a company called Logspace, was acquired by DataStax in April 2024, and came under IBM when IBM closed its purchase of DataStax on 28 May 2025; it remains open source. It suits teams where domain experts design the flow and engineers harden it, and prototyping a RAG pipeline in an afternoon.

### Langfuse: open-source tracing, not a LangChain product

Langfuse is an open-source platform for tracing, evaluation and prompt management, founded in Berlin in 2023. The name is the only link to LangChain: it works with LangChain and LangGraph through a callback handler, and equally with the OpenAI SDK, LlamaIndex, the OpenAI Agents SDK and others. ClickHouse, whose database already stored Langfuse's traces, acquired the company on 16 January 2026; the team has said Langfuse stays open source and self-hostable.

```python
# pip install langfuse
from langfuse.langchain import CallbackHandler
app.invoke({"messages": [("user", "Where is order A-1001?")]},
           {"configurable": {"thread_id": "t1"}, "callbacks": [CallbackHandler()]})   # keys from LANGFUSE_* env vars
```

Choose Langfuse when you need to keep traces on your own servers or want an open-source platform; choose LangSmith for the tightest integration with LangGraph deployment. See the [Langfuse](/tools/langfuse) and [LangSmith](/tools/langsmith) pages.

## Every other major framework

### Microsoft Agent Framework (AutoGen and Semantic Kernel)

Microsoft had two agent projects: **AutoGen**, a research framework where agents solve tasks by conversing with each other, and **Semantic Kernel**, an enterprise SDK for .NET, Python and Java. Microsoft Agent Framework merges them: it reached general availability as version 1.0 on 3 April 2026, and AutoGen and Semantic Kernel are now in maintenance mode, receiving fixes but not new features. It offers agents and graph-based workflows with checkpoints, in both Python and .NET, with Azure AI Foundry as the hosted option. See the [Microsoft Agent Framework page](/tools/microsoft-agent-framework).

### OpenAI Agents SDK

The OpenAI Agents SDK, released in March 2025, is a deliberately small library: agents with instructions and tools, **handoffs** that pass control to another agent, **guardrails** that check inputs and outputs in parallel, sessions for memory, and built-in tracing. It works with other providers' models through adapters.

```python
# pip install openai-agents
from agents import Agent, Runner, function_tool

@function_tool
def order_status(order_id: str) -> str:
    """Return the shipping status of an order."""
    return {"A-1001": "shipped"}.get(order_id, "unknown order")

billing = Agent(name="Billing", instructions="Answer refund and invoice questions.")
support = Agent(name="Support", instructions="Answer order questions; hand billing questions to Billing.",
                tools=[order_status], handoffs=[billing])
print(Runner.run_sync(support, "Has A-1001 shipped?").final_output)
```

### Google Agent Development Kit (ADK)

Google open-sourced ADK in April 2025. It defines agents in code, composes them with workflow agents (sequential, parallel, loop) or lets a model delegate to sub-agents, and comes with a local development UI, evaluation tools and deployment to Vertex AI Agent Engine or Cloud Run. It is tuned for Gemini but supports other models, and it speaks A2A natively, which matters when agents from different teams must call each other. See the [Google ADK page](/tools/google-adk).

### CrewAI

CrewAI describes a team: each agent has a role, a goal and a backstory, tasks are assigned to agents, and a crew runs them in sequence or under a manager agent. Its Flows add event-driven control for production. It is quick to read and to prototype with, and a good fit for business processes that map naturally onto roles. See the [CrewAI page](/tools/crewai).

```python
# pip install crewai
from crewai import Agent, Task, Crew
researcher = Agent(role="Researcher", goal="Find the three most relevant facts", backstory="A careful analyst.")
writer = Agent(role="Writer", goal="Write a 100-word brief", backstory="A concise technical writer.")
t1 = Task(description="Research: {topic}", expected_output="Three facts with sources", agent=researcher)
t2 = Task(description="Write the brief from the research", expected_output="A 100-word brief", agent=writer)
print(Crew(agents=[researcher, writer], tasks=[t1, t2]).kickoff(inputs={"topic": "Apache Iceberg v3"}))
```

### LlamaIndex

LlamaIndex began as the data framework for RAG: loaders, parsers, indexes and query engines. Its agents (`FunctionAgent`, `ReActAgent`, `AgentWorkflow`) and event-driven Workflows build on that, so it is the natural choice when the hard part of the agent is retrieval over many documents. See the [LlamaIndex page](/tools/llamaindex).

### Hugging Face smolagents

smolagents is a minimal library whose main idea is the **code agent**: instead of emitting one JSON tool call at a time, the model writes a short Python snippet that can call several tools, loop and compute, which often takes fewer steps. Code runs in a sandbox (E2B, Docker or a restricted local interpreter). It is model-agnostic and small enough to read in an evening. See the [smolagents page](/tools/smolagents).

### PydanticAI

PydanticAI, from the team behind the Pydantic validation library, brings type safety to agents: outputs are validated against Pydantic models, dependencies are injected with types, and errors show up in your editor rather than in production. It reached 1.0 in September 2025 and integrates with Logfire for tracing. See the [PydanticAI page](/tools/pydantic-ai).

```python
# pip install pydantic-ai
from pydantic import BaseModel
from pydantic_ai import Agent

class Ticket(BaseModel):
    category: str
    urgent: bool

agent = Agent("anthropic:claude-sonnet-5-5", output_type=Ticket, instructions="Classify the support message.")
print(agent.run_sync("My card was charged twice and the shop is closing today!").output)
```

### DSPy

DSPy, from Stanford, treats prompts as programs to be optimised rather than text to be hand-tuned. You declare signatures (`question -> answer`) and modules (including `dspy.ReAct` for agents), give it a metric and examples, and an optimiser rewrites instructions and few-shot examples to maximise the metric. Use it when you have a measurable task and want prompts that improve systematically. See the [DSPy page](/tools/dspy).

### Strands Agents, Mastra, the Claude Agent SDK and n8n

- **Strands Agents**, open-sourced by AWS in May 2025, is model-driven: you give a model a prompt and tools and let it plan, with first-class support for Amazon Bedrock and MCP.
- **Mastra** is a TypeScript framework with agents, workflows, memory and evaluations, popular with teams building on Node.js and Next.js. See the [Mastra page](/tools/mastra).
- The **Claude Agent SDK** exposes the harness behind Claude Code (file system, shell, sub-agents, context compaction, permissions) for building your own long-running agents. See the [Claude Agent SDK page](/tools/claude-agent-sdk).
- **n8n** is a visual workflow-automation tool whose AI agent nodes let non-developers wire models into business processes. See the [n8n page](/tools/n8n).

## The protocols underneath: MCP and A2A

Frameworks decide how one agent works; protocols decide how agents connect to tools and to each other, regardless of framework.

- **MCP (Model Context Protocol)** connects an agent to tools and data. A tool written once as an MCP server works in LangChain (through `langchain-mcp-adapters`), the OpenAI Agents SDK, ADK, Microsoft Agent Framework, Strands, the Claude Agent SDK and most others. The 2026-07-28 revision of the specification makes the protocol stateless at its core so servers can run behind ordinary load balancers. See the [MCP page](/tools/mcp).
- **A2A (Agent2Agent)** lets agents built in different frameworks discover each other and delegate tasks. It became a hosted project of the Linux Foundation's Agentic AI Foundation on 17 August 2026. See the [A2A page](/tools/a2a).

The Agentic AI Foundation itself was formed on 9 December 2025 to give MCP, goose and the AGENTS.md convention a neutral home, and passed 300 member organisations in October 2026. The practical effect is that picking a framework no longer locks in your tools: MCP servers and A2A agents move with you.

## Side by side

| Framework | Language | Control style | Multi-agent | Durable state | Best for |
|---|---|---|---|---|---|
| LangChain `create_agent` | Python, TypeScript | Standard tool loop plus middleware | Through LangGraph | Yes, via LangGraph | The common agent with the widest integrations |
| LangGraph | Python, TypeScript | Explicit graph | Supervisor, swarm, custom | Checkpoints, built in | Production flows that need control, approval and resume |
| Deep Agents | Python, TypeScript | Harness: plan, files, sub-agents | Sub-agents | Yes | Long research and coding tasks |
| Microsoft Agent Framework | Python, .NET | Agents plus graph workflows | Yes | Checkpoints | Microsoft and Azure shops, .NET teams |
| OpenAI Agents SDK | Python, TypeScript | Small loop with handoffs | Handoffs | Sessions | Lean agents with little framework code |
| Google ADK | Python, Java, Go, TypeScript | Code agents plus workflow agents | Sub-agents, A2A | Sessions | Gemini and Google Cloud, cross-team A2A |
| CrewAI | Python | Roles and tasks | Crews, managers | Flows | Role-based business processes |
| LlamaIndex | Python, TypeScript | Agents and event workflows | AgentWorkflow | Workflow context | Retrieval-heavy agents |
| smolagents | Python | Code-writing agent | Managed agents | Minimal | Fewer steps through code actions |
| PydanticAI | Python | Typed agent | Delegation | Through integrations | Type-safe outputs in Python services |
| DSPy | Python | Declarative, optimised | Composed modules | Not its focus | Measurable tasks with prompt optimisation |
| Strands Agents | Python, TypeScript | Model-driven | Agents as tools, swarms | Session managers | AWS and Bedrock |
| Mastra | TypeScript | Agents and workflows | Yes | Yes | TypeScript web stacks |

## How to choose

1. **Start from the shape of the task.** One model with a few tools needs a small loop: LangChain `create_agent`, the OpenAI Agents SDK or PydanticAI. A fixed business process with approvals needs a graph with checkpoints: LangGraph or Microsoft Agent Framework workflows. Open-ended work over hours needs a harness: Deep Agents or the Claude Agent SDK.
2. **Follow your platform.** Azure and .NET point to Microsoft Agent Framework, Google Cloud to ADK, AWS to Strands, TypeScript web apps to Mastra or LangGraph.js.
3. **Put tools behind MCP.** Then the framework decision is reversible, because the tools work everywhere.
4. **Decide observability first.** Tracing is not optional once an agent touches users. LangSmith, Langfuse, Logfire and OpenTelemetry-based tools all work across frameworks; pick one before the first deployment.
5. **Prototype in two frameworks for a day each.** The best predictor of success is whether your team can read the code six months later.

A framework does not make an agent reliable; evaluation does. The [agentic patterns simulation](/ai-simulations/agentic-patterns), the [ReAct tool-calling simulation](/ai-simulations/react-tool-calling) and the [guardrails simulation](/ai-simulations/guardrails) show the behaviour every one of these frameworks has to get right, and the [Agentic AI topic page](/topics/agentic-ai) maps the rest.

## Frequently asked questions

### Is LangChain the same as LangGraph?

No. LangChain is the library of integrations and the standard agent API; LangGraph is the runtime that executes agents as graphs with saved state. Since version 1.0, LangChain's `create_agent` runs on LangGraph, so most projects use both.

### Do I need LangSmith to use LangChain?

No. LangChain and LangGraph are open source and run anywhere. LangSmith is an optional platform for tracing, evaluation and hosting; Langfuse is an open-source alternative.

### Is Langfuse part of LangChain?

No. Langfuse is an independent open-source project, now owned by ClickHouse, that integrates with LangChain among many other frameworks.

### What happened to AutoGen and Semantic Kernel?

Microsoft merged them into Microsoft Agent Framework, which reached 1.0 in April 2026. Both older projects are in maintenance mode.

### Which framework is best for multi-agent systems?

For explicit control, LangGraph or Microsoft Agent Framework workflows; for role-based teams, CrewAI; for agents owned by different teams or companies, any framework that speaks A2A, such as ADK.

## Summary

The Lang names cover different layers: LangChain is the library and standard agent, LangGraph the durable runtime, Deep Agents the harness for long tasks, LangSmith the commercial platform that also hosts agents, LangServe the retired deployment path, LangMem the memory library, Langflow an IBM-owned visual builder and Langfuse an open-source tracer owned by ClickHouse. Beyond them, Microsoft Agent Framework replaced AutoGen and Semantic Kernel, and the OpenAI Agents SDK, Google ADK, CrewAI, LlamaIndex, smolagents, PydanticAI, DSPy, Strands and Mastra each optimise for a different team and task. MCP and A2A make the choice less permanent than it used to be.

Sources: [LangChain and LangGraph 1.0](https://blog.langchain.com/langchain-langgraph-1dot0/) · [LangGraph Platform is now LangSmith Deployment](https://changelog.langchain.com/) · [Managed Deep Agents](https://langchain.com/blog/introducing-managed-deep-agents) · [Interrupt 2026 announcements](https://langchain.com/blog/interrupt-2026-overview) · [Langfuse joins ClickHouse](https://langfuse.com/blog/joining-clickhouse) · [IBM closes DataStax acquisition](https://www.dbta.com/Editorial/News-Flashes/IBM-Officially-Closes-Acquisition-of-DataStax-169711.aspx) · [Microsoft Agent Framework](https://learn.microsoft.com/agent-framework/) · [Agentic AI Foundation](https://aaif.io/) · [A2A joins the Agentic AI Foundation](https://www.axios.com/2026/08/17/a2a-agentic-ai-foundation-open-ai-standards) · [MCP 2026-07-28 specification](https://blog.modelcontextprotocol.io/posts/2026-07-28/)
