创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

Mastra推出智能体自定义指标

AI 总结

Mastra宣布开发者可通过metrics.emit()从工具、工作流、处理器、评分器及其他应用代码中记录自定义指标。指标支持名称、数值、可选标签、成本信息和元数据,并与智能体运行、工具调用及模型调用的耗时、令牌和成本统计并存。Mastra称该功能支持阈值告警、SDK与CLI及可观测性端点查询,需要@mastra/core 1.76.0或更高版本。

深度见解

这项更新让AI智能体开发者能在同一套可观测性系统中追踪业务与运营层面的自定义指标。

You can now emit custom metrics from tools, workflows, processors, scorers, or anywhere else in your application using metrics.emit(), and passing in a name, a value, optional labels, cost details, or specific metadata.

Custom metrics work alongside Mastra's automatic metrics, which record duration, tokens, and cost for every agent run, tool call, and model call. Anything else you'd like to measure can now be recorded with labels and payloads that work for you.

Your browser does not support the video tag.Custom metrics emitted from a tool, workflow step, processor, and scorer, each shown next to its exported record, then Mastra Code using the Mastra CLI to list the five custom metrics, total this week's refunds, and break them down by reason.

Automatically collected metrics have been visible on the Mastra platform for a while, but now with custom metrics you can create your own measures and set alerts when a value crosses a threshold.

Custom metrics work on the Mastra platform with MastraPlatformExporter, and on self-hosted Mastra projects with MastraStorageExporter and a ClickHouse, DuckDB, or PostgreSQL observability store.

#Mastra#Mastra Platform#MastraPlatformExporter#MastraStorageExporter#ClickHouse#DuckDB#PostgreSQL

原文约 2 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。