LangGraph (original) (raw)

LangGraph Logo LangGraph Logo

LangGraph Logo

Version Downloads Open Issues Docs

LangGraph — used by Replit, Uber, LinkedIn, GitLab and more — is a low-level orchestration framework for building controllable agents. While langchain provides integrations and composable components to streamline LLM application development, the LangGraph library enables agent orchestration — offering customizable architectures, long-term memory, and human-in-the-loop to reliably handle complex tasks.

To learn more about how to use LangGraph, check out the docs. We show a simple example below of how to create a ReAct agent.

[](#%5F%5Fcodelineno-1-1)# This code depends on pip install langchain[anthropic] [](#%5F%5Fcodelineno-1-2)from langgraph.prebuilt import create_react_agent [](#%5F%5Fcodelineno-1-3) [](#%5F%5Fcodelineno-1-4)def search(query: str): [](#%5F%5Fcodelineno-1-5) """Call to surf the web.""" [](#%5F%5Fcodelineno-1-6) if "sf" in query.lower() or "san francisco" in query.lower(): [](#%5F%5Fcodelineno-1-7) return "It's 60 degrees and foggy." [](#%5F%5Fcodelineno-1-8) return "It's 90 degrees and sunny." [](#%5F%5Fcodelineno-1-9) [](#%5F%5Fcodelineno-1-10)agent = create_react_agent("anthropic:claude-3-7-sonnet-latest", tools=[search]) [](#%5F%5Fcodelineno-1-11)agent.invoke( [](#%5F%5Fcodelineno-1-12) {"messages": [{"role": "user", "content": "what is the weather in sf"}]} [](#%5F%5Fcodelineno-1-13))

Tip

Check out this guide that walks through implementing common patterns (workflows and agents) in LangGraph.

Why use LangGraph?

LangGraph is built for developers who want to build powerful, adaptable AI agents. Developers choose LangGraph for:

LangGraph is trusted in production and powering agents for companies like:

LangGraph’s ecosystem

While LangGraph can be used standalone, it also integrates seamlessly with any LangChain product, giving developers a full suite of tools for building agents. To improve your LLM application development, pair LangGraph with:

Pairing with LangGraph Platform

While LangGraph is our open-source agent orchestration framework, enterprises that need scalable agent deployment can benefit from LangGraph Platform.

LangGraph Platform can help engineering teams:

Additional resources

Acknowledgements

LangGraph is inspired by Pregel and Apache Beam. The public interface draws inspiration from NetworkX. LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain.