Back to home

Compare

Comparing: LangChain Exposes AI's 'Memory' — The Industrial Standard Behind Every Reply & LangChain 把 AI 的'对话记忆'拆开了 — 每一句回复背后都有一套工业标准

AEN
LangChainAI AgentOpen-source framework·

LangChain Exposes AI's 'Memory' — The Industrial Standard Behind Every Reply

What this is

LangChain is one of the world's most widely adopted open-source AI application development frameworks, used heavily by major domestic tech firms and independent developer teams. This week, a long post on Chinese developer community Juejin tore into its underlying messaging mechanism down to the source-code level. What we observe is plain: AI's "memory" is not a continuous blob of text, but a field system assembled under strict rules. Specifically, a base class with six fields (content, additional_kwargs, response_metadata, type, name, id), four message object types (system / human / AI / tool), and a content_blocks structure for handling images and tool calls. The technical details can be read at leisure, but one thing holds even for non-technical readers: every seemingly fluent AI conversation is backed by an unromantic industrial standard.

Industry view

The front-line developer community is actually split on frameworks like LangChain. One camp argues this abstraction is what makes AI products actually deployable — for example, ToolMessage requires tool_call_id to be filled in and defaults status to success. These seemingly pedantic fields exist to prevent AI from "treating failure as success and continuing forward"; without them, multi-agent systems simply can't run reliably. The other camp disagrees: LangChain's abstraction stack is too deep, calling a simple feature requires digging through three layers of source code, and it's a drag on small and mid-sized teams. A growing number of domestic teams are exploring self-built, lighter-weight frameworks. The post's high readership on Juejin also signals that, at least within the Chinese developer community, more people are paying attention to the underlying logic of AI infrastructure. We note: the source article's third section, "Input Normalization," has not been fully published. Our commentary covers only the two sections released so far.

Impact on regular people

For enterprise IT: when evaluating AI Agent vendors, ask one concrete question — "When a tool call fails, how does your system distinguish and explicitly mark success from failure?" A vendor that can answer clearly has engineering that actually holds water.

For individual careers: the next time you discuss AI deployment projects with technical teammates, you'll at least know the weight behind terms like "message layer" and "tool-call ID" — no longer lost in generic talking points.

For the consumer market: every AI assistant you use, every interaction with an AI customer-support bot, is backed by dozens of layers of this kind of disciplined template. Understand that, and you'll see why today's AI products vary so wildly in quality — gaps in underlying engineering maturity are far more honest than marketing copy.

Source: juejin.cn
BZH
LangChainAI Agent开源框架·

LangChain 把 AI 的'对话记忆'拆开了 — 每一句回复背后都有一套工业标准

这是什么

LangChain 是全球最主流的开源 AI 应用开发框架之一,国内大厂和独立开发团队广泛使用。本周国内掘金上一篇长文把它底层的消息机制拆到了源码级别。我们看到的事实是:AI 的「记忆」不是一坨连续文本,而是一套按严格规则拼装的字段体系。具体包括六字段的基类(content、additional_kwargs、response_metadata、type、name、id)、四类消息对象(系统/人类/AI/工具),以及专门处理图片和工具调用的 content_blocks 结构。技术细节可慢慢读,但有一件事对非技术读者也成立:每一句看似流畅的 AI 对话,背后都是一套不浪漫的工业标准。

行业怎么看

一线开发者社群对 LangChain 这类框架的态度其实是分裂的。一派认为这种抽象是 AI 产品真正能落地的关键——比如 ToolMessage 强制要求填写 tool_call_id、status 默认 success,这些看似迂腐的字段正是防止 AI「把失败当成成功继续往下推」的设计,没有它们多 Agent 系统根本跑不稳。另一派持反对意见:LangChain 抽象层叠得太深,调一个简单功能要翻三层源码,对中小团队反而是负担,国内越来越多团队开始考虑自研更轻量框架。本文本身在掘金获得的高阅读量也说明,至少在中文开发者圈,关注 AI 基础设施底层逻辑的人正在变多。需要指出的是,原文第三章节「输入归一」并未发布完整,本周刊仅就已发布的两节做出评论。

对普通人的影响

对企业 IT:正在评估采购 AI Agent 供应商时,可以问一个具体问题——「你们的系统在工具调用失败时,如何区分并显式标记成功与失败?」能讲清楚的供应商,底层工程才真正过关。

对个人职场:以后与技术同事聊 AI 落地项目,至少能听懂「消息层」「工具调用 ID」这些关键词的份量,不再被通用话术绕晕。

对消费市场:你用的每一个 AI 助手、每一次与 AI 客服交涉,背后都是几十层这样的严谨模板。理解这一点,你就明白为什么当下 AI 产品良莠不齐——底层工程成熟度的差距,比营销话术诚实得多。

Source: juejin.cn