AI News AI资讯 just now Updated 51m ago 更新于 51分钟前 50

Google launches middleware architecture for Genkit applications 谷歌推出适用于 Genkit 应用程序的中间件架构

Google's open-sourcing of Genkit's middleware is a pragmatic move, even somewhat "boring" – yet it's precisely this mundane quality that strikes at the core pain point in the transition of AI application development from "magic shows" to "factory pipelines." It no longer solely focuses on how astonishing the text a model can generate is; instead, it begins to seriously discuss, as with any ordinary software component, how to implement retries, degradation, auditing, and logging. This isn't some 谷歌把Genkit的中间件开源,这步棋走得务实,甚至有些“无聊”——但正是这种无聊,戳中了AI应用开发从“魔法表演”走向“工厂流水线”时最疼的那个点。它不再只关心模型能吐出多惊艳的文本,而是开始像对待一个普通软件组件那样,严肃地讨论如何重试、如何降级、如何审核、如何记录日志。这不是什么激动人心的突破,但它是一切生产级应用的前提。谷歌终于承认,在现实世界里,让AI可靠地工作,远比让它偶尔表现得聪明更重要。

70
Hot 热度
65
Quality 质量
60
Impact 影响力

Analysis 深度分析

Google's decision to open-source Genkit's middleware is a pragmatic, even somewhat "boring" strategy – yet it's precisely this lack of glamour that addresses the most acute pain point in the evolution of AI application development from "magic performances" to "factory-style" production. It no longer centers on how impressive the text output from a model might be, but instead begins to discuss with the same seriousness applied to any standard software component: how to handle retries, degradation, auditing, and logging. While not an exciting breakthrough, these are foundational prerequisites for any production-ready application. Google has finally admitted that in the real world, ensuring AI works reliably is far more important than making it occasionally appear brilliant.

At the heart of Genkit's design lies a programmable interception layer that now threads through the "tool loop" centered on the generate() call. Every stage – model invocation, tool execution, and result processing – can be hooked into. This allows developers to customize AI behavior pipelines much like installing valves and filters in a conduit. For instance, adding a "human approval" step before sensitive operations or automatically switching to a backup model if an API fails. These features are available as pre-built components, including even a "skill" system that dynamically reads instructions from local files. This suite of capabilities makes Genkit's ambition clear: it aims not to be a toy that dazzles only in demos, but a robust, debuggable, enterprise-IT-compliant infrastructure component. The retry mechanism employs exponential backoff, and logging and debugging tools are integrated into the development interface – these accumulated details contribute to the framework's "maturity."

Behind this shift lies an unspoken transition in the broader AI tooling ecosystem: moving away from the mystique of "prompt engineering" and "model tuning" and returning to the fundamentals of computer science. There's a growing recognition that no matter how intelligent an agent is, without clear lifecycle management, error handling, and observability, it becomes a ticking time bomb in real-world scenarios. Google's middleware essentially defines an "intermediate language" for AI agent behavior, transforming the once-chaotic generation-execution cycle into something programmable, composable, and auditable. It’s a step backward in rationality, yet a step forward in pragmatism.

However, when it comes to Google’s AI frameworks, developers often first react with confusion: how does this differ from the ADK or Vertex AI? Engineer Michael Doyle’s clarification was straightforward: Genkit is an "embedded" solution designed to add AI capabilities to existing applications, while the ADK is a "platform-oriented" approach for building standalone, complex multi-agent systems. One targets application developers; the other, platform architects. The positioning is clear, but Google’s own product ecosystem still appears crowded and sometimes chaotic. This internal complexity can sometimes dilute the impact of its technical releases. Developers need not only a good tool but also a clear roadmap that doesn’t induce choice overload or fear of abandonment.

So, is Genkit’s middleware update worth your attention? For developers currently integrating or planning to integrate AI features into applications – especially those using TypeScript, Go, or Dart – the answer is yes. It provides a solid scaffolding to help you quickly build those "boring" yet crucial functions: retries, fallbacks, auditing, and logging. It reduces the management cost of AI applications in production environments. However, if you’re pursuing the most cutting-edge model capabilities or building fully autonomous, complex agent systems, perhaps the ADK or another platform would be your battleground.

Google’s move is akin to installing the first standardized production line for AI application "handicraft workshops." It may not be flashy, but it solves real problems. The next question is whether other frameworks will follow, and whether this "middleware mindset" can truly become a new consensus in AI development. Until then, developers at least have a more reliable option, allowing them to spend less time wrestling with AI’s randomness and more time thinking about how to leverage it to create genuine value.

谷歌把Genkit的中间件开源,这步棋走得务实,甚至有些“无聊”——但正是这种无聊,戳中了AI应用开发从“魔法表演”走向“工厂流水线”时最疼的那个点。它不再只关心模型能吐出多惊艳的文本,而是开始像对待一个普通软件组件那样,严肃地讨论如何重试、如何降级、如何审核、如何记录日志。这不是什么激动人心的突破,但它是一切生产级应用的前提。谷歌终于承认,在现实世界里,让AI可靠地工作,远比让它偶尔表现得聪明更重要。

Genkit的核心设计,那个围绕generate()调用的“工具循环”,现在被一个可编程的拦截层贯穿。模型调用、工具执行、结果处理,每一个环节都能被钩住。这意味着开发者可以像给管道安装阀门和过滤器一样,自定义AI行为的流程。比如,敏感操作前加个“人工审批”步骤,或者API挂了自动切换备用模型。这些功能预构建组件都有了,甚至包括一个能从本地文件动态读取指令的“技能”系统。这套组合拳打出去,Genkit的野心很清楚:它不想做一个只会在Demo里惊艳的玩具,而要成为一个能扛事、可调试、符合企业IT规范的基础设施组件。重试机制用了指数退避,日志和调试工具也集成到了开发界面里——这些细节堆砌起来,才构成了一个框架的“成熟感”。

这背后,是整个AI工具生态一个心照不宣的转向:从痴迷于“提示词工程”和“模型调优”的玄学,回归到计算机科学的基本功。大家终于意识到,一个智能体再聪明,如果没有清晰的生命周期管理、错误处理和可观测性,它在现实场景中就是个定时炸弹。谷歌推出的这套中间件,本质上是在为AI代理行为定义一种“中间语言”,让原本混沌的生成-执行循环变得可编程、可组合、可审计。这是一种理性的退步,也是务实的进步。

不过,一提到谷歌的AI框架,开发者的第一反应往往是困惑:这玩意儿和那个什么ADK、Vertex AI有什么区别?这次工程师Michael Doyle的澄清倒是干脆:Genkit是“嵌入式”方案,给现有应用加AI能力;ADK是“平台式”方案,用于构建独立的、复杂的多智能体系统。一个面向应用开发者,一个面向平台架构师。定位清晰,但谷歌自家产品的生态线依然显得拥挤甚至混乱。这种内部的复杂性,有时会消解其技术发布的冲击力。开发者需要的不只是一个好工具,还有一个不会让人选择困难、不会随时被弃养的清晰路线图。

所以,Genkit中间件这次更新,值不值得关注?对于正在或打算在应用里集成AI功能的开发者,尤其是TypeScript/Go/Dart用户,答案是肯定的。它提供了一个扎实的脚手架,让你能更快地构建出那些“无聊”但至关重要的功能:重试、回退、审核、日志。它降低了生产环境AI应用的管理成本。但如果你是追求最前沿模型能力或构建完全自治的复杂代理系统的,可能ADK或其他平台才是你的战场。

谷歌此举,像是给AI应用的“手工作坊”时代装上了第一条标准化生产线。它可能不性感,但它在解决真问题。接下来,就看其他框架是否跟进,以及这套“中间件思维”能否真正沉淀为AI开发的新共识。在此之前,开发者至少有了一个更可靠的选择,可以少花点时间和AI的随机性搏斗,多花点时间思考如何用它真正创造价值。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

开源 开源 Agent Agent 产品发布 产品发布
Share: 分享到: