Back to home

Compare

Comparing: DeepSeek's Bank-Style Event Log: Chinese AI Firms Catch Up on Engineering & DeepSeek 把聊天记录改成银行流水 — 中国 AI 公司开始补工程这门课

AEN
DeepSeekdshAgent·

DeepSeek's Bank-Style Event Log: Chinese AI Firms Catch Up on Engineering

This week, an open-source Agent framework hosted under DeepSeek's GitHub organization was dissected line-by-line by developers. What surfaced is a notable engineering decision: AI "memory" is no longer stored as chat arrays, but rewritten as bank-style event streams—every token chunk (a small piece of text the model emits incrementally) and every tool call leaves a trace as an immutable event (written once, never modified).

The author "怕浪猫" distilled the design into a memorable line: message arrays are the result; event logs are the process. Lose the process, and you lose replay and audit (the ability to trace back every step after the fact) capabilities.

What this is

Most AI Agent projects store conversation history in a straightforward way: a messages array that appends user, AI, and tool messages in order. Simple, but flawed—the streaming output process is lost, intermediate states of tool calls vanish, and there's no way to fork (branch a new conversation from a historical point) or precisely replay.

The framework, dubbed dsh by its author, takes a different path: an append-only (only added to, never modified) event log. Each event carries an incrementing sequence number, archiving everything from "turn start," "user message," "request header configuration," "one AI streaming chunk" to "tool call result." The chat interfaces we see daily are views derived from this underlying log.

Technically, this is called Single Source of Truth—a pattern used by mature Agent systems like Claude Code and LangGraph. What's worth noting is that a domestic Chinese model company has explicitly written this architecture into an open-source project where outsiders can read it. That alone is a signal.

Industry view

The optimistic read is that this marks Chinese AI companies shifting from "chasing benchmark scores" to "production-ready." As AI Agents enter finance, healthcare, and customer service scenarios, "can we replay every AI decision" will evolve from engineering preference into compliance necessity.

The cooler voices point out three things: First, event-log architecture is not low complexity—it requires a derivation layer, additional storage, and strict schema (data structure) management, which is over-engineering for consumer AI products. Second, this analysis comes from community developers reading public code, not an official DeepSeek statement; the "China AI going production-grade" judgment is more an observer's inference. Third, overseas frameworks like Anthropic and LangChain adopted similar patterns as early as 2024; this Chinese move is catching up, not leading.

Impact on regular people

For enterprise IT: As AI Agents enter formal business functions like compliance, finance, and customer service, "can we replay every AI decision" will graduate from a technical detail to a hard procurement requirement. Event-log architecture will become the entry ticket for enterprise-grade AI products.

For working professionals: When using AI to write code or documents, being able to "rewind and see exactly where things went wrong" determines whether it's a toy or a productivity tool. Prioritizing products with "process replay" capability will save many pitfalls.

For consumers: In the short term, ordinary users won't notice architectural differences. But when AI assistants start handling sensitive scenarios like medical and legal matters, "can I see what the AI was thinking" will shift from a technical question to a basic user right.

Source: juejin.cn
BZH
DeepSeekdshAgent·

DeepSeek 把聊天记录改成银行流水 — 中国 AI 公司开始补工程这门课

本周,一个托管在 DeepSeek GitHub 组织下的开源 Agent 框架被开发者逐行拆解。核心暴露了一个值得关注的工程决定:AI 的「记忆」不再存成聊天数组,而被改写成银行式的事件流水——每一次 token 分片(模型逐字吐出的一小段文字)、每一次工具调用,都作为不可变事件(写入后永不修改)留下痕迹。

作者「怕浪猫」把这套设计浓缩成一句金句:消息数组是结果,事件日志是过程。丢了过程,就丢了回放和审计(事后追溯每一步发生了什么)的能力。

这是什么

大多数 AI Agent 项目存储对话历史的方式很直接:一个 messages 数组,按顺序追加用户、AI、工具三类消息。简单,但有问题——流式输出过程丢了、工具调用的中间状态丢了,无法 fork(从历史某点分叉出新对话)也不能精确回放。

这套被作者称作 dsh 的框架走另一条路:append-only(仅追加、不可修改)的事件日志。每条事件带一个递增序号,从「turn 开始」「用户消息」「请求头配置」「AI 的一次吐字片段」到「工具调用结果」全部留档。我们日常看到的「聊天界面」,都是从这个底层日志派生出来的视图。

技术上这叫「单一事实源」(Single Source of Truth),Claude Code、LangGraph 等成熟 Agent 系统都在用。值得关注的是,国内大模型公司把这套架构明确写进开源项目并被外界读到——这本身就是一个信号。

行业怎么看

积极解读认为,这是中国 AI 公司从「刷榜跑分」转向「生产可用」的标志。当 AI Agent 进入金融、医疗、客服场景,「能不能复盘 AI 每一步决策」会从工程洁癖变成合规刚需。

冷静声音指出三件事:一、事件日志架构的复杂度不低——需要派生层、额外存储、严格 schema(数据结构)管理,对消费级 AI 产品是过度设计;二、这次分析来自社区开发者对公开代码的解读,并非 DeepSeek 官方发声,「中国 AI 走向生产级」的判断更多是观察者的推测;三、Anthropic、LangChain 等海外框架早在 2024 年就采用类似模式,国内这步是补课而非领先。

对普通人的影响

对企业 IT:当 AI Agent 进入合规、财务、客服等正式业务,「能不能回放 AI 每一步决策」会从技术细节升级为采购硬指标。事件日志架构将成为企业级 AI 产品的入场券。

对个人职场:用 AI 写代码、写文档时如果出错能「倒回去看哪一步翻车」,会决定它是玩具还是生产力工具。优先选具备「过程可回放」能力的产品,能少踩很多坑。

对消费市场:短期内普通用户感知不到架构差异。但当 AI 助手开始处理医疗、法律等敏感场景时,「我能不能看到 AI 想了什么」会从技术问题变成用户的基本权利。

Source: juejin.cn