dotsagent.io
Langue:Français
Framework · LangChain Inc.

LangGraph en bref

La bibliothèque bas niveau de LangChain pour créer des agents sous forme de graphes explicites, avec l'état sauvegardé à des points de reprise et les interruptions au cœur du système. create_agent de LangChain v1 s'appuie dessus lorsqu'une boucle préconstruite suffit.

Idéal pour : Les agents persistants et avec état, lorsque vous voulez contrôler chaque étape et reprendre l'exécution après une défaillance.

Informations clés

Mainteneur
LangChain Inc.
Langages
Python, TypeScript, JavaScript
Licence
MIT
Dernière version
langgraph 1.2.12 / langchain 1.4.3 · 28 septembre 2026
Dépôt
langchain-ai/langgraph · 42 550 étoiles
Option hébergée
LangSmith Deployment (formerly LangGraph Platform)
Anciennement LangGraph Platform ; Studio est destiné au prototypage visuel.

Démarrage rapide

Installez le package, configurez vos identifiants, puis lancez l’agent le plus simple présenté dans la documentation officielle. Les ID de modèle utilisés sont ceux de la documentation et ne sont pas forcément activés sur votre compte.

Python (LangChain create_agent)

Installer
pip install -U langchain

Nécessite Provider API key, e.g. OPENAI_API_KEY

Python (LangChain create_agent)
from langchain.agents import create_agent

def get_weather(city: str) -> str:
    """Get weather for a given city."""
    return f"It's always sunny in {city}!"

agent = create_agent(
    model="openai:gpt-5.5",
    tools=[get_weather],
    system_prompt="You are a helpful assistant",
)

result = agent.invoke(
    {"messages": [{"role": "user", "content": "What's the weather in San Francisco?"}]}
)
print(result["messages"][-1].content_blocks)

Source du guide de démarrage rapide

Python (raw LangGraph)

Installer
pip install -U langgraph
Python (raw LangGraph)
from langgraph.graph import StateGraph, MessagesState, START, END

def mock_llm(state: MessagesState):
    return {"messages": [{"role": "ai", "content": "hello world"}]}

graph = StateGraph(MessagesState)
graph.add_node(mock_llm)
graph.add_edge(START, "mock_llm")
graph.add_edge("mock_llm", END)
graph = graph.compile()

graph.invoke({"messages": [{"role": "user", "content": "hi!"}]})

Source du guide de démarrage rapide

Fonctionnalités

Tous les modèlesOui
Client MCPOuiVia langchain-mcp-adapters
Serveur MCPNon confirmé
Multi-agentOuiSous-graphes ; le harness Deep Agents ajoute des sous-agents
Exécutions durablesOuiCheckpointers pour Postgres ou SQLite ; reprise après une défaillance
Approbation humaineOuiLes interruptions permettent d’inspecter et de modifier l’état en cours d’exécution
TraçageOuiVia LangSmith, avec LANGSMITH_TRACING=true
ÉvaluationsNonL’évaluation est gérée dans LangSmith, pas dans la bibliothèque open source

Modifications récentes

  • Les agents LangChain v1 (create_agent) reposent désormais sur LangGraph.
  • LangGraph Platform a été renommé LangSmith Deployment.
  • Deep Agents, un harness basé sur LangGraph, ajoute des sous-agents.

Alternatives dans le même langage

Sources

  1. docs.langchain.com/oss/python/langgraph/overview
  2. docs.langchain.com/oss/python/langchain/quickstart
  3. pypi.org/pypi/langgraph/json
  4. pypi.org/pypi/langchain/json
  5. registry.npmjs.org/@langchain%2flanggraph
  6. api.github.com/repos/langchain-ai/langgraph