Parfournir.
Skills/langchain-ai/Langgraph

Langgraph

Build resilient language agents as graphs.

MITsdk
by @langchain-ai26.4K
Install
pip
pip install langgraph
SKILL.md
<picture class="github-only">
<source media="(prefers-color-scheme: light)" srcset=".github/images/logo-light.svg">
<source media="(prefers-color-scheme: dark)" srcset=".github/images/logo-dark.svg">

</picture>

<div>
<br>
</div>

![Version](https://pypi.org/project/langgraph/) ![Downloads](https://pepy.tech/project/langgraph) ![Open Issues](https://github.com/langchain-ai/langgraph/issues) ![Docs](https://docs.langchain.com/oss/python/langgraph/overview)

Trusted by companies shaping the future of agents – including Klarna, Replit, Elastic, and more – LangGraph is a low-level orchestration framework for building, managing, and deploying long-running, stateful agents.

Get started

Install LangGraph:

pip install -U langgraph

Create a simple workflow:

from langgraph.graph import START, StateGraph
from typing_extensions import TypedDict


class State(TypedDict):
text: str


def node_a(state: State) -> dict:
return {"text": state["text"] + "a"}


def node_b(state: State) -> dict:
return {"text": state["text"] + "b"}


graph = StateGraph(State)
graph.add_node("node_a", node_a)
graph.add_node("node_b", node_b)
graph.add_edge(START, "node_a")
graph.add_edge("node_a", "node_b")

print(graph.compile().invoke({"text": ""}))

{'text': 'ab'}

Get started with the LangGraph Quickstart.

To quickly build agents with LangChain's create_agent (built on LangGraph), see the LangChain Agents documentation.

> [!TIP]
> For developing, debugging, and deploying AI agents and LLM applications, see LangSmith.

Core benefits

LangGraph provides low-level supporting infrastructure for any long-running, stateful workflow or agent. LangGraph does not abstract prompts or architecture, and provides the following central benefits:

  • Durable execution: Build agents that persist through failures and can run for extended periods, automatically resuming from exactly where they left off.
  • Human-in-the-loop: Seamlessly incorporate human oversight by inspecting and modifying agent state at any point during execution.
  • Comprehensive memory: Create truly stateful agents with both short-term working memory for ongoing reasoning and long-term persistent memory across sessions.
  • Debugging with LangSmith: Gain deep visibility into complex agent behavior with visuali
  • ... [truncated — view full README on GitHub]

    Details

    Categoryai-model
    Typesdk
    Sourcegithub
    LicenseMIT
    Stars26.4K

    Use this skill

    Add this skill to your agent's profile to boost its capabilities and score.

    Add to My Agent