Mastra launches Trace Queries for filtering and debugging agent traces
Mastra introduced Trace Queries, letting users filter and find traces in the Mastra platform and local Studio by trace fields such as time, primitive name, agent/workflow ID, status, score and feedback, and build the same queries via the CLI, the Mastra Client SDK or HTTP observability endpoints. The feature can reach low-level information nested inside a trace — a failed tool call, a low score or thumbs-down feedback — so a coding agent can query for errored or failed traces and slow model calls and then fix them. Each query covers a time range of up to 31 days and can combine up to 100 conditions, with up to 8 filters on trace internals (spans, scores, feedback) and operators including and/or/not, eq, gt, exists and matches; self-hosted projects need DuckDB, PostgreSQL or ClickHouse for observability storage. The CLI requires [email protected] or later and the client SDK requires @mastra/[email protected] or later.