mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-22 15:42:25 +02:00
+3



![github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)





Lauren Hirata Singh
GitHub
sydney-runkle
ygicp
ahmed murtaza
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Michael Li
Sakshi Gupta
Eugene Yurtsev
Sam Crowder
William FH
Yagnesh M. Bhadiyadra
Ahmed Murtaza
d5b8733a40
* docs: Add codespell for markdown files * update * remove path * fix * update linting guidelines * chore[deps]: upgrade dependencies with `uv lock --upgrade` (#5471) Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com> * fix(checkpoint): correct logging call to use logger (#5458) fix[checkpoint]: correct logging call to use logger * release(langgraph): v0.5.3 (#5498) bump * extend to cover python files used for reference docs * fix(docs): Update the graph image link (#5500) Update the graph image link Point to the correct image reference for Map-Reduce and the Send API example * fix(docs): Update graph-api.md File to reflect correct image (#5499) Update graph-api.md File to reflect correct image Referencing to the correct image file * docs(prebuilt): improve documentation in ToolNode module (#5497) Update documentation in ToolNode module * Update changelog via LangGraph Server Changelog Bot * feat(sdk-py): Show is_studio_user (#5505) * Update changelog via LangGraph Server Changelog Bot * fix(docs): Node caching explanation code required a small fix,. (#5473) fix(docs): Node caching explanation code required a small fix, to avoid confusion to readers. The code had `time.sleep(2)` but the note mentioned one second only. Co-authored-by: ygicp <yagnesh@infocusp.com> * fix(langgraph): add `stacklevel=2` to the warnings to point to the caller’s codes (#5457) chore: add stacklevel=2 to the warnings to point to the caller’s codes * chore(docs): Improve example in use mcp (#5480) * Make example more explicit * Update docs/docs/agents/mcp.md * fix(docs): update examples link (#5515) Co-authored-by: ahmed murtaza <ahmed.gmurtaza@gmail.com> * docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5514) Update changelog via LangGraph Server Changelog Bot * fix readmes * fix --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com> Co-authored-by: Michael Li <michaelli65535@gmail.com> Co-authored-by: Sakshi Gupta <64280320+sakshi1989@users.noreply.github.com> Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com> Co-authored-by: Sam Crowder <samecrowder@gmail.com> Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com> Co-authored-by: Yagnesh M. Bhadiyadra <35532869+yagneshmb@users.noreply.github.com> Co-authored-by: ygicp <yagnesh@infocusp.com> Co-authored-by: Ahmed Murtaza <ahmed.gmurtaza@hotmail.com> Co-authored-by: ahmed murtaza <ahmed.gmurtaza@gmail.com>
84 lines
6.2 KiB
Markdown
84 lines
6.2 KiB
Markdown
<picture class="github-only">
|
||
<source media="(prefers-color-scheme: light)" srcset="https://langchain-ai.github.io/langgraph/static/wordmark_dark.svg">
|
||
<source media="(prefers-color-scheme: dark)" srcset="https://langchain-ai.github.io/langgraph/static/wordmark_light.svg">
|
||
<img alt="LangGraph Logo" src="https://langchain-ai.github.io/langgraph/static/wordmark_dark.svg" width="80%">
|
||
</picture>
|
||
|
||
<div>
|
||
<br>
|
||
</div>
|
||
|
||
[](https://pypi.org/project/langgraph/)
|
||
[](https://pepy.tech/project/langgraph)
|
||
[](https://github.com/langchain-ai/langgraph/issues)
|
||
[](https://langchain-ai.github.io/langgraph/)
|
||
|
||
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
|
||
```
|
||
|
||
Then, create an agent [using prebuilt components](https://langchain-ai.github.io/langgraph/agents/agents/):
|
||
|
||
```python
|
||
# pip install -qU "langchain[anthropic]" to call the model
|
||
|
||
from langgraph.prebuilt import create_react_agent
|
||
|
||
def get_weather(city: str) -> str:
|
||
"""Get weather for a given city."""
|
||
return f"It's always sunny in {city}!"
|
||
|
||
agent = create_react_agent(
|
||
model="anthropic:claude-3-7-sonnet-latest",
|
||
tools=[get_weather],
|
||
prompt="You are a helpful assistant"
|
||
)
|
||
|
||
# Run the agent
|
||
agent.invoke(
|
||
{"messages": [{"role": "user", "content": "what is the weather in sf"}]}
|
||
)
|
||
```
|
||
|
||
For more information, see the [Quickstart](https://langchain-ai.github.io/langgraph/agents/agents/). Or, to learn how to build an [agent workflow](https://langchain-ai.github.io/langgraph/concepts/low_level/) with a customizable architecture, long-term memory, and other complex task handling, see the [LangGraph basics tutorials](https://langchain-ai.github.io/langgraph/tutorials/get-started/1-build-basic-chatbot/).
|
||
|
||
## 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](https://langchain-ai.github.io/langgraph/concepts/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](https://langchain-ai.github.io/langgraph/concepts/human_in_the_loop/): Seamlessly incorporate human oversight by inspecting and modifying agent state at any point during execution.
|
||
- [Comprehensive memory](https://langchain-ai.github.io/langgraph/concepts/memory/): Create truly stateful agents with both short-term working memory for ongoing reasoning and long-term persistent memory across sessions.
|
||
- [Debugging with LangSmith](http://www.langchain.com/langsmith): Gain deep visibility into complex agent behavior with visualization tools that trace execution paths, capture state transitions, and provide detailed runtime metrics.
|
||
- [Production-ready deployment](https://langchain-ai.github.io/langgraph/concepts/deployment_options/): Deploy sophisticated agent systems confidently with scalable infrastructure designed to handle the unique challenges of stateful, long-running workflows.
|
||
|
||
## 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:
|
||
|
||
- [LangSmith](http://www.langchain.com/langsmith) — Helpful for agent evals and observability. Debug poor-performing LLM app runs, evaluate agent trajectories, gain visibility in production, and improve performance over time.
|
||
- [LangGraph Platform](https://langchain-ai.github.io/langgraph/concepts/langgraph_platform/) — Deploy and scale agents effortlessly with a purpose-built deployment platform for long running, stateful workflows. Discover, reuse, configure, and share agents across teams — and iterate quickly with visual prototyping in [LangGraph Studio](https://langchain-ai.github.io/langgraph/concepts/langgraph_studio/).
|
||
- [LangChain](https://python.langchain.com/docs/introduction/) – Provides integrations and composable components to streamline LLM application development.
|
||
|
||
> [!NOTE]
|
||
> Looking for the JS version of LangGraph? See the [JS repo](https://github.com/langchain-ai/langgraphjs) and the [JS docs](https://langchain-ai.github.io/langgraphjs/).
|
||
|
||
## Additional resources
|
||
|
||
- [Guides](https://langchain-ai.github.io/langgraph/how-tos/): Quick, actionable code snippets for topics such as streaming, adding memory & persistence, and design patterns (e.g. branching, subgraphs, etc.).
|
||
- [Reference](https://langchain-ai.github.io/langgraph/reference/graphs/): Detailed reference on core classes, methods, how to use the graph and checkpointing APIs, and higher-level prebuilt components.
|
||
- [Examples](https://langchain-ai.github.io/langgraph/examples/): Guided examples on getting started with LangGraph.
|
||
- [LangChain Forum](https://forum.langchain.com/): Connect with the community and share all of your technical questions, ideas, and feedback.
|
||
- [LangChain Academy](https://academy.langchain.com/courses/intro-to-langgraph): Learn the basics of LangGraph in our free, structured course.
|
||
- [Templates](https://langchain-ai.github.io/langgraph/concepts/template_applications/): Pre-built reference apps for common agentic workflows (e.g. ReAct agent, memory, retrieval etc.) that can be cloned and adapted.
|
||
- [Case studies](https://www.langchain.com/built-with-langgraph): Hear how industry leaders use LangGraph to ship AI applications at scale.
|
||
|
||
## Acknowledgements
|
||
|
||
LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain. |