langgraph README

The project's README from github.com/langchain-ai/langgraph. As one markdown file: README.md.

LangGraph Logo

Low-level orchestration framework for building stateful agents.

PyPI - License PyPI - Downloads Version Twitter / X

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.

pip install -U langgraph

[!TIP] If you're looking to quickly build agents, check out Deep Agents — a higher-level package built on LangGraph for agents that can plan, use subagents, and leverage file systems for complex tasks.

For an equivalent JS/TS library, check out LangGraph.js and the JS docs.

Why use LangGraph?

LangGraph provides low-level supporting infrastructure for any long-running, stateful workflow or agent:

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

LangGraph 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:


Documentation

Discussions: Visit the LangChain Forum to connect with the community and share all of your technical questions, ideas, and feedback.

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.

langgraph (langchain-ai/langgraph)

Searching Database…

43.4K ·GitHub
这是什么?LangGraph 是一个偏底层的编排框架,用于构建、管理和部署长时间运行、有状态的 AI 智能体——也就是智能体能够跨步骤、跨故障甚至跨会话保持状态的那些工作流。
这是一个需要写代码对接的框架,还是一个现成的应用?它是一个框架:你是在它的运行时之上编写 Python 代码,而不是启动一个成品软件。如果你更喜欢 JavaScript,还有一个对应的 JS/TS 库 LangGraph.js。
我该怎么开始用它做开发?按照官方文档 docs.langchain.com 里的 LangGraph 快速入门(Quickstart)来做——它会带你一步步把 langgraph 包加进你的 Python 项目,并构建你的第一个智能体。
使用它必须整套采用 LangChain 吗?不用——它由 LangChain Inc 开发,但完全可以独立使用。如果你想要更完整的工具链,它也能与 Deep Agents、LangChain、LangSmith 等 LangChain 产品无缝集成。
听起来很底层——是不是什么都得自己搭?是的,它提供的是底层基础设施,智能体的逻辑要靠你自己在上面搭建。如果想跳过这一步,README 里推荐了 Deep Agents——一个基于 LangGraph 的高层封装包,适合需要规划任务、使用子智能体、操作文件系统的智能体。
智能体运行时,LangGraph 会帮我处理哪些事情?三件核心的事:持久化执行(智能体在故障后依然存活,并从上次中断的地方精确恢复)、人在环上的监督(可以在任意节点查看和修改智能体的状态),以及记忆——既包括短期的工作记忆,也包括跨会话的长期持久记忆。
它在生产环境中真的经受住考验了吗?是的——它明确定位为大规模部署长时间运行、有状态的工作流,README 里还列出了 Klarna、Replit 和 Elastic 等正在使用它的公司。
智能体做出意料之外的行为时,我该怎么调试?配合 LangSmith 使用:它会追踪执行路径、记录状态转换,并展示详细的运行时指标,让你看清一个复杂智能体到底做了什么。LangSmith 还提供评估(evals)和生产环境可观测性。
如果觉得官方文档太难啃,我去哪里学 LangGraph?LangChain Academy 提供一门免费的结构化课程,涵盖 LangGraph 的基础知识;文档里还包含一些简明实用的指南,涉及流式输出、添加记忆与持久化,以及分支、子图等设计模式。
LangGraph 是基于哪些理念构建的?它借鉴了 Pregel 和 Apache Beam,公开接口的设计则参考了 NetworkX——这些都是为可靠、长时间运行的计算而生的基于图的模型。
LangSmith Deployment 是做什么用的?这是一个专门用于部署和扩展长时间运行、有状态智能体的平台:团队可以发现、复用、配置和共享智能体,并在 LangSmith Studio 中通过可视化原型快速迭代。
Size
516.5 MB
Stars
43.4K
Age
3y
Commits · 90 Days