返回首页

对比阅读

对比阅读:LangChain Has Rewritten Its Memory Architecture 8 Times in 3 Years — AI Tool Immaturity Is More 与 LangChain 三年八次推翻记忆方案 — AI 工具的「不成熟」比你想的更普遍

AEN
LangChainAI development frameworkAgent memory·

LangChain Has Rewritten Its Memory Architecture 8 Times in 3 Years — AI Tool Immaturity Is More

Andrew Ng didn't say a word this week, but LangChain's engineers taught a lesson for him

— an open-source framework relied on by hundreds of thousands of AI applications has admitted that what it built over the past two years needs to be rebuilt. When LangChain 1.0 shipped in October 2025, the entire legacy Memory API (the interface that gives AI chat products recall) was packed into a directory called @langchain/classic, with the official recommendation that users migrate to the new architecture. In plain English: stop using the old system.

This matters to every enterprise evaluating AI tooling, because it surfaces a truth the industry rarely says out loud — the AI tools you buy today will most likely be replaced within a year.

What this is

"Memory" is a core feature of AI chat products: when you tell an AI "my name is Xiaoming, I'm in Beijing," it should recall that in a new conversation instead of asking again. Implementing it requires managing chat history — where to store it, how much to keep, how to retrieve it.

LangChain is currently one of the most mainstream AI application development frameworks in the world — the scaffolding for AI apps. From October 2022 to October 2025, its memory design went through three phases and eight major designs:

  • Phase 1 (2023): Eight BufferMemory variants (modules that cache conversation history), each representing a different strategy for storing history — raw text, compressed text, extracted knowledge, semantic search over history
  • Phase 2 (2024): LCEL (LangChain Expression Language) launched, decoupling storage from memory strategy
  • Phase 3 (October 2025 to present): 1.0 released, all legacy APIs archived, the official recommendation is now a two-layer "checkpointer + store" architecture

The problem: no generation is fully compatible with the previous one. Parameters developers spent half a year tuning may have to be rebuilt from scratch when a new version lands.

Industry view

Supportive voices are common. LangChain officially frames the redesign as "necessary evolution" — the legacy API was too fragmented, and the new architecture is cleaner. Plenty of developers in the community concede the new design is more reasonable; they just dread the migration cost.

But we've noticed the counterarguments, and enterprise decision-makers should hear them:

  • Framework stability problem: Senior developers on Hacker News and Reddit point out that three architectures in three years means this field "hasn't found the right answer yet." Every redesign forces real human cost to rewrite code built on the previous version
  • The risk of premature abstraction: Critics argue LangChain tried to wrap an unstable technical domain into an "easy-to-use framework," amplifying the pain of change. Calling underlying APIs directly (the raw interfaces from vendors like OpenAI and Anthropic) would mean far less disruption with each framework upgrade
  • The signal in the name "classic": Shoving the legacy API into a classic archive is semantically "no longer maintained." For enterprise users, this means if your product depends on those old interfaces, future bugs won't get official fixes

Translated into management language: LangChain's story is not an outlier — it's a microcosm of the entire AI developer tooling layer. Frameworks are still iterating fast, and today's best practice may be tomorrow's technical debt.

Impact on regular people

For enterprise IT departments: When selecting an AI framework, build "will the vendor tear up its own architecture within three years" into your risk assessment. Prioritize solutions with stable interfaces and strong backward compatibility over the flashiest marketing.

For individual careers: AI-related skills depreciate far faster than traditional software skills. "Underlying APIs + framework principles" holds its value longer than "mastery of a specific framework" — the former changes slowly, the latter gets rewritten at any moment.

For the consumer market: The AI customer service and AI assistant products you use may, over the next year or two, suddenly change behavior or forget things they previously remembered. That's not the product team getting lazy — it's the underlying technology iterating fast. Give them some patience.

来源: juejin.cn
BZH
LangChainAI开发框架Agent记忆·

LangChain 三年八次推翻记忆方案 — AI 工具的「不成熟」比你想的更普遍

Andrew Ng 这周没说话,但 LangChain 的工程师替他上了一课

——一个被几十万个 AI 应用依赖的开源框架,承认自己过去两年做的事需要重做。2025 年 10 月 LangChain 1.0 发布时,所有旧版 Memory API(给 AI 聊天加记忆的接口)被打包搬进了一个叫 @langchain/classic 的目录,官方建议用户迁移到新架构。翻译成人话:之前那一整套,别用了。

这件事值得所有在做 AI 选型的企业关心,因为它揭示了一个行业里很少被明说的事实——你今天买的 AI 工具,明年大概率要换。

这是什么

「记忆」是 AI 聊天产品的核心功能:你跟 AI 说「我叫小明,我在北京」,下次开新对话它还能记住,而不是把这句话再问一遍。实现这个功能需要管理历史对话——存哪里、存多少、怎么调出来。

LangChain 是目前全球最主流的 AI 应用开发框架之一,相当于「AI 应用的脚手架」。从 2022 年 10 月到 2025 年 10 月,它的记忆方案经历了三阶段、八种主要设计:

  • 第一阶段(2023):8 种 BufferMemory(一种缓存对话历史的模块),每种代表一种「怎么存历史」的策略——存原文、压缩原文、抽知识、搜历史
  • 第二阶段(2024):推出 LCEL(LangChain 表达式语言),把存储从记忆策略中拆开
  • 第三阶段(2025 年 10 月至今):1.0 发布,旧 API 全部归档,官方推荐新的「checkpointer + store」两层架构

问题:每一代方案都不完全兼容前一代。开发者花半年调好的参数,新版本一来,可能要从头再来。

行业怎么看

支持的声音很普遍。LangChain 官方认为这次重构是「必要的进化」——旧 API 太碎,新架构更清晰。社区里不少开发者承认新方案确实更合理,只是迁移成本让他们头疼。

但我们注意到了反面的声音,而且这些声音值得企业决策者听:

  • 框架稳定性问题:有资深开发者在 Hacker News 和 Reddit 上指出,LangChain 三年三套架构,本质上说明这个领域「还没找到正确答案」。每一次重构都意味着之前基于旧版本写的代码需要重写,这是真实的人力成本
  • 抽象层过早的风险:批评者认为,LangChain 试图把一个尚未稳定的技术领域封装成「易用框架」,反而放大了变化带来的痛苦。如果直接调底层 API(OpenAI、Anthropic 等厂商的原始接口),每次框架升级的影响会小得多
  • 「classic」这个名字的信号:把旧 API 扔进经典档案区,语义上是「不再维护」。对企业用户来说,这意味着如果你的产品依赖这些旧接口,未来出 bug 时不会有官方修复

翻译成管理语言:LangChain 的故事不是孤例,它是整个 AI 开发工具层的缩影——框架还在快速迭代,今天的最佳实践可能是明天的技术债(指用过时技术写下的代码,未来要花额外成本维护)。

对普通人的影响

对企业 IT 部门:选型 AI 框架时,把「供应商会不会三年内推翻自己的架构」纳入风险评估。优先考虑那些接口稳定、向后兼容能力强的方案,而不是宣传最炫的方案。

对个人职场:AI 相关岗位的技能折旧速度比传统软件快得多。学会「底层 API + 框架原理」比「精通某个框架」更保值——前者变化慢,后者随时被重构。

对消费市场:你用的 AI 客服、AI 助手等产品,未来一两年可能会出现「功能突然变了」或「之前能记住的事现在记不住了」的情况。这不是产品偷懒,是底层技术在快速迭代,多给团队一些耐心。

来源: juejin.cn