开源项目 GitHub Topic ai 2026-07-06T12:02 正文 ok 441 words

📦 langchain-ai/langchain

英文标题:📦 langchain-ai/langchain

LangChain 是一套用于构建智能体和 LLM 应用的开源框架,通过可互操作的组件和集成简化 AI 开发。原文推荐了面向常见智能体模式的高阶包 Deep Agents,以及面向可控工作流的 LangGraph 和 JS/TS 实现。同时还介绍了 LangSmith 提供的调试、评估与部署能力,强调实时数据增强、模型互换、快速原型等关键特性,帮助开发者在技术演进中保持适应力。
打开原文相关 4.9 · 机会 5
media3.9 KB media3.9 KB media1.2 KB media1.3 KB media993 B media1.6 KB media132.1 KB

中文

智能体工程平台。

LangChain 是一个用于构建智能体及 LLM 驱动应用程序的框架。它帮助你串联可互操作的组件与第三方集成,以简化 AI 应用开发——同时在底层技术演进的过程中,让你的决策具备面向未来的适应能力。

提示

刚刚开始?请查看 Deep Agents ——基于 LangChain 构建的高级包,为内置了规划、子智能体、文件系统使用等常见使用模式的智能体提供了开箱即用的能力。

python from langchain.chat_models import init_chat_model

model = init_chat_model("openai:gpt-5.5") result = model.invoke("Hello, world!")

如果你正在寻找更高级的自定义或智能体编排,请查看 LangGraph,这是我们用于构建可控智能体工作流的框架。

如需等效的 JS/TS 库,请查看 LangChain.js。

提示

关于 AI 智能体与 LLM 应用的开发、调试和部署,请参见 LangSmith。

虽然 LangChain 框架可以独立使用,但它也能与任何 LangChain 产品无缝集成,为开发者在构建 LLM 应用时提供一整套工具。

  • Deep Agents —— 构建能够规划、使用子智能体,并利用文件系统处理复杂任务的智能体
  • LangGraph —— 使用我们的底层智能体编排框架,构建能够可靠处理复杂任务的智能体
  • 集成 —— 聊天与嵌入模型、工具与工具集,以及更多
  • LangSmith —— 面向 LLM 应用的智能体评估、可观测性与调试
  • LangSmith 部署 —— 通过专为长时间运行、有状态工作流构建的平台,部署和扩展智能体

LangChain 通过为模型、嵌入、向量存储等提供标准接口,帮助开发者构建由 LLM 驱动的应用程序。

  • 实时数据增强 —— 轻松地将 LLM 连接到多样化的数据源和外部/内部系统,借助 LangChain 庞大的集成库(模型提供商、工具、向量存储、检索器等)
  • 模型互操作性 —— 在你的工程团队为应用需求寻找最佳选择而进行实验时,可以随时替换模型。随着行业前沿的演进,快速适应——LangChain 的抽象让你保持前进,不损失动力
  • 快速原型设计 —— 利用 LangChain 模块化、基于组件的架构,快速构建并迭代 LLM 应用。无需从头重建即可测试不同的方法和工作流,从而加速你的开发周期
  • 生产就绪特性 —— 通过 LangSmith 等集成内置的监控、评估和调试支持,部署可靠的应用。通过久经考验的模式和最佳实践,自信地进行规模化
  • 充满活力的社区与生态系统 —— 利用丰富的集成、模板和社区贡献的组件生态系统。通过活跃的开源社区,受益于持续改进,并紧跟最新 AI 发展
  • 灵活的抽象层级 —— 在适合你需求的抽象层级上工作——从用于快速起步的高级链式调用,到用于精细控制的低级组件。LangChain 随你应用的复杂性共同成长

English / 原文

The agent engineering platform.

LangChain is a framework for building agents and LLM-powered applications. It helps you chain together interoperable components and third-party integrations to simplify AI application development — all while future-proofing decisions as the underlying technology evolves.

Tip

Just getting started? Check out Deep Agents — a higher-level package built on LangChain for agents that have built-in capabilites for common usage patterns such as planning, subagents, file system usage, and more.

from langchain.chat_models import init_chat_model

model = init_chat_model("openai:gpt-5.5")
result = model.invoke("Hello, world!")

If you're looking for more advanced customization or agent orchestration, check out LangGraph, our framework for building controllable agent workflows.

For an equivalent JS/TS library, check out LangChain.js.

Tip

For developing, debugging, and deploying AI agents and LLM applications, see LangSmith.

While the LangChain framework can be used standalone, it also integrates seamlessly with any LangChain product, giving developers a full suite of tools when building LLM applications.

  • Deep Agents — Build agents that can plan, use subagents, and leverage file systems for complex tasks
  • LangGraph — Build agents that can reliably handle complex tasks with our low-level agent orchestration framework
  • Integrations — Chat & embedding models, tools & toolkits, and more
  • LangSmith — Agent evals, observability, and debugging for LLM apps
  • LangSmith Deployment — Deploy and scale agents with a purpose-built platform for long-running, stateful workflows

LangChain helps developers build applications powered by LLMs through a standard interface for models, embeddings, vector stores, and more.

  • Real-time data augmentation — Easily connect LLMs to diverse data sources and external/internal systems, drawing from LangChain's vast library of integrations with model providers, tools, vector stores, retrievers, and more
  • Model interoperability — Swap models in and out as your engineering team experiments to find the best choice for your application's needs. As the industry frontier evolves, adapt quickly — LangChain's abstractions keep you moving without losing momentum
  • Rapid prototyping — Quickly build and iterate on LLM applications with LangChain's modular, component-based architecture. Test different approaches and workflows without rebuilding from scratch, accelerating your development cycle
  • Production-ready features — Deploy reliable applications with built-in support for monitoring, evaluation, and debugging through integrations like LangSmith. Scale with confidence using battle-tested patterns and best practices
  • Vibrant community and ecosystem — Leverage a rich ecosystem of integrations, templates, and community-contributed components. Benefit from continuous improvements and stay up-to-date with the latest AI developments through an active open-source community
  • Flexible abstraction layers — Work at the level of abstraction that suits your needs — from high-level chains for quick starts to low-level components for fine-grained control. LangChain grows with your application's complexity