Mastra推出智能体延迟指标
Mastra Blog称,该平台现在会在从模型调用到完整智能体运行的每个跨度上记录首个内容块时间(TTFC)和首个词元时间(TTFT)。用户可以过滤和排序追踪、跨度及线程,并通过Mastra CLI、平台与Studio、Client SDK及可观测性端点查询这些字段。自托管项目还可通过DuckDB、PostgreSQL或ClickHouse使用这些指标。
Mastra Blog表示,区分用户感知的首次响应延迟与模型启动延迟,能让AI智能体开发者更准确地定位慢速跨度,并使用Mastra Code等工具进行诊断。
You can now track latency metrics for every agent and model call in Mastra platform and Studio. Filter and sort traces, spans, and threads by TTFC (time to first chunk) and TTFT (time to first token) to see where your agents are slow. Or hand off to your coding agent to find and fix issues.
We've spent years optimizing websites with metrics like Time to First Byte and First Contentful Paint, and agents deserve the same attention. TTFC tells you how long a user waits before seeing anything. TTFT tells you how long the model takes to start responding. Together, they show you where your agents are slow and give you a meaningful metric to improve.
Your browser does not support the video tag.Mastra platform's Traces view with the time to first chunk and time to first token columns turned on, then Mastra Code querying the same data, tracing the gap to a slow input processor, and suggesting three fixes.
Previously, you could use durationMs to see how long a run took, but not how long a user waited for the first response, or whether that wait came from the model or your own code. Mastra now records both metrics on every span, from the model call up to the agent run.
#Mastra#Mastra Studio#Mastra Code#Mastra CLI#Mastra Client SDK#DuckDB#PostgreSQL#ClickHouse