返回全部动态

Mastra 将分类器列为一等原语并新增策略执行与后台工具

原标题:September 23, 2026

Mastra Releases一手来源产品发布质量 71

AI 摘要

Mastra 发布更新,将分类器(classifiers)作为核心一等原语,支持在 Mastra 实例上注册并通过管理 API 操作,还可作为类型化工作流步骤实现分支控制流。新增 ClassifierProcessor 对 agent 输入、输出和流式内容执行类型化策略,默认失败即中止(fail closed)。此外引入 context.background.adopt() 支持原生后台工具执行、@mastra/connect 新增十个 SaaS 工具提供方,并改进 Inngest 持久化运行的配置化重试与恢复。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

## Highlights ### Classifiers as a First-Class Primitive (Core + Workflows) Mastra now supports registering classifiers on `new Mastra({ classifiers })`, with a full management API (`getClassifier*`, `listClassifiers`, `addClassifier`, `removeClassifier`) and automatic root tracing for classifier evaluations. Those configured classifiers can also be used as typed workflow steps (including fluent + dynamic graphs) to power typed branching/conditional control flow with token usage. ### Poli


发布时间:2026-09-24 14:58
抓取时间:2026-09-24 15:13
来源机构:Mastra
阅读原文github.com