langchain

langchain-aiMIT活跃维护

用 Python 搭建 LLM 应用和智能体的开发框架,把模型调用、工具、检索和记忆串成可组合的链路,省去自己拼装底层胶水代码。

The agent engineering platform.

langchain-typesafe==0.0.2发布于 2026-11-05 22:56 UTC149,327star +185 / 7 天25,104fork同步于 2026-11-10 23:18 UTC

怎么上手

由 README 提炼,执行前请确认
uv add langchain
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

构建智能体与 LLM 应用的框架,用统一接口串联模型、工具与第三方集成

用 Python 搭建 LLM 应用和智能体的开发框架,把模型调用、工具、检索和记忆串成可组合的链路,省去自己拼装底层胶水代码。

核心能力

  • 用 init_chat_model 统一初始化各家聊天模型
  • 提供模型、嵌入、向量库的标准接口
  • 内置大量模型厂商、工具与检索器集成
  • 模块化组件架构支持快速原型迭代
  • 可配合 LangGraph 做可控智能体编排

容易踩的坑

需自行准备模型厂商的 API Key 与网络访问;示例中的模型名需替换为实际可用的模型;复杂智能体编排需另装 LangGraph

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本langchain-typesafe==0.0.2
  1. langchain-typesafe==0.0.2最新正式版2026-11-05 · 2026-11-05 22:56 UTC

    Changes since langchain-typesafe==0.0.1

    release(typesafe): 0.0.2 (#41720) feat(typesafe): accept a classifier in experimental middleware (#41657)

  2. langchain-core==1.7.62026-11-05 · 2026-11-05 00:22 UTC
    查看更新说明

    Changes since langchain-core==1.7.5

    release(core): 1.7.6 (#41698) perf(core): merge streamed AIMessageChunks once when accumulating runnable streams (#41697) perf(core): stop parse_partial_json from retrying one character at a time (#41467)

  3. langchain==1.4.92026-11-04 · 2026-11-04 17:07 UTC
    查看更新说明

    Changes since langchain==1.4.8

    release(langchain): 1.4.9 (#41684) chore(deps): require langchain-core>=1.7.5 for refusal handling (#41682) feat(core): standardize model refusal content blocks (#41582)

  4. langchain-openai==1.7.42026-11-04 · 2026-11-04 16:55 UTC
    查看更新说明

    Changes since langchain-openai==1.7.3

    release(openai): 1.7.4 (#41683) chore(deps): require langchain-core>=1.7.5 for refusal handling (#41682) feat(core): standardize model refusal content blocks (#41582) chore(model-profiles): refresh model profile data (#41556)

  5. langchain-typesafe==0.0.12026-11-04 · 2026-11-04 00:11 UTC
    查看更新说明

    Initial release

    release(typesafe): 0.0.1 (#41650) chore(infra): relax third-party dependency upper bounds (#41407) chore(deps): bump certifi from 2026.7.22 to 2026.10.19 in /libs/partners/typesafe (#41375) fix: fix dependencies in some partner packages (#41266) release(typesafe): 0.0.1a3 (#40693) feat(typesafe): make classifier questions invocation-scoped (#40659) release(typesafe): bump to 0.0.1a2 (#40576) feat(typesafe): experimental AutoModeMiddleware (#40545) feat(typesafe): experimental ModelRouterMiddleware (#40543) fix(typesafe): trace usage metadata (#40570) feat(typesafe): TypeSafeClassifier (#40542)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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 capabilities for common usage patterns such as planning, subagents, file system usage, and more.

    Quickstart

    uv add langchain
    
    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.

    LangChain ecosystem

    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

    Why use LangChain?

    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

    Resources