Introducing Thread View for Mastra Observability

Read agent traces in the context of the conversation that produced them.

Patrycja Jenkner-SarPatrycja Jenkner-Sar·

Oct 12, 2026

·

3 min read

You can now read agent conversations alongside their traces in Mastra Studio. Open an agent trace to see its messages next to the steps that produced them. Then open the full thread to see the whole conversation in order.

When you debug an agent's behavior, you want to follow the story of what the user asked, what the agent decided, and which tools it called. The longer the agent runs, the harder it gets to find the right step. A single session can span dozens of messages. Thread view lets you inspect the trace in the context of the whole conversation.

Agent activity is usually traced as a tree of nested steps, model calls, and timestamps. Even though a tree view is precise, it's difficult to interpret. You have to reconstruct the conversation to understand what happened. With the thread view, it's the other way around.

You start from the messages and when something looks wrong, you dig into the steps behind it. It's easier to read, follow and navigate. Thread view also helps subject-matter experts who need to review an agent's behavior but didn't build the agent.

Get started

If your agent already uses memory and persists traces with MastraStorageExporter, no additional setup is required. Thread view works with its existing stored traces.

If you start from scratch, install Mastra observability, memory, and storage:

GNU BashTerminal
npm install mastra@latest @mastra/core @mastra/observability @mastra/memory @mastra/libsql
note
Requires mastra@1.33.0 or later, added in PR #25812.

Thread view appears for agent traces that belong to a thread. Give your agent memory and persist traces with the MastraStorageExporter:

TypeScriptsrc/mastra/index.ts
import { Mastra } from "@mastra/core/mastra";
import { Agent } from "@mastra/core/agent";
import { Memory } from "@mastra/memory";
import { LibSQLStore } from "@mastra/libsql";
import { Observability, MastraStorageExporter } from "@mastra/observability";
 
const supportAgent = new Agent({
  id: "support-agent",
  name: "Support Agent",
  instructions: /* ... */,
  model: "openai/gpt-5.6-astra",
  tools: { /* ... */ },
  memory: new Memory()
});
 
export const mastra = new Mastra({
  agents: { supportAgent },
  storage: new LibSQLStore({ id: "storage", url: "file:./mastra.db" }),
  observability: new Observability({
    configs: {
      default: {
        serviceName: "mastra",
        exporters: [new MastraStorageExporter()]
      }
    }
  })
});

Call the agent with a thread and resource. Each call becomes one turn in the thread, and one trace in Studio:

const agent = mastra.getAgent("supportAgent");
 
await agent.generate("What's the status of my order?", {
  memory: { thread: "thread-123", resource: "user-456" }
});

Run mastra dev, open Traces in Studio, and select an agent run. The conversation for that turn appears beside the span tree.

Hover over any message and select Highlight spans to see the steps behind it with the rest of the tree faded.

Select Open full thread to see the whole conversation.

For more information and full configuration options, see:

Share on X or LinkedIn
Patrycja Jenkner-Sar
Patrycja Jenkner-SarProduct Marketer & Content Engineer

Patrycja Jenkner-Sar is a product marketer and content engineer at Mastra. Previously, she was a product marketer at neptune.ai, an experiment tracker for machine learning teams, and is focused on translating complex functionality into clear value for developers and technical audiences.

All articles by Patrycja Jenkner-Sar →