Use the activity trace to debug your agent (preview)

[This article is prerelease documentation and is subject to change.]

The activity trace in the new experience in Microsoft Copilot Studio shows you exactly how your agent processes each message. Use it to understand your agent's chain-of-thought reasoning, verify knowledge source attribution, confirm tool execution, and troubleshoot errors.

Note

This article reflects the new agent experience in Microsoft Copilot Studio, which is currently available as a production-ready preview. Learn about the two experiences in Classic vs. new agent experience.

  • Production-ready previews are subject to supplemental terms of use.
  • Some capabilities available in the classic experience aren't yet available in the new experience.
  • Agents created in the new experience can't be converted to the classic experience.

Prerequisites

  • An agent created in the new experience
  • At least one test conversation in the Preview tab

Open the activity trace

  1. Open your agent in Copilot Studio and select the Preview tab.

  2. Ensure the End user preview toggle is off (the default maker view). The activity trace appears alongside the chat pane, showing processing details for each message.

  3. Send a message to your agent. The trace updates in real time as the agent processes the message.

Understand the trace

The activity trace displays a chain-of-thought (CoT) view of your agent's processing. Each step in the trace appears as a node that shows what the agent did and why.

Node types

The trace can include the following node types:

Node type What it shows
User message The message you sent to the agent
Agent response The agent's generated response
Knowledge A knowledge source the agent consulted for grounding. Rendered as a "Searched knowledge" collapsible card showing sources for each knowledge source accessed, and citation links when available.
Ran action A connector or tool invocation rendered as a collapsible card showing the connector, filled input parameters, and delivery duration
Tool A tool the agent invoked to perform an action or retrieve data
Connector A connector the agent used to access external data
Flow An agent flow that was triggered
Skill A skill that was executed
Error An error that occurred during processing
Complete A green checkmark indicator shown at the bottom of the trace when all tool calls have finished

View node details

  1. Select any node in the trace to expand its details.

  2. Review the information shown, which can include:

    • The input the agent sent to the step
    • The output or result returned
    • Processing time and metrics
    • Error details if the step failed

Debug knowledge source issues

When your agent uses knowledge to answer a question, the trace shows which sources were consulted:

  1. Find the Knowledge node in the trace.

  2. Review the source to see which knowledge sources were accessed.

  3. Select a source to see the specific content retrieved.

  4. Verify that the agent used the correct source and that the retrieved content is relevant.

If the agent used the wrong source or returned inaccurate information, check your knowledge configuration in the Build tab.

Debug tool execution

When your agent invokes a tool, the trace shows the execution details:

  1. Find the Tool, Connector, Flow, or Skill node in the trace.

  2. Review the execution details, including the input parameters and output results.

  3. Verify that the correct tool was invoked and that the results are as expected.

  4. If a tool execution failed, review the error details in the node.

To reconfigure a tool, open the Build tab and locate the tool in your agent's configuration.

Troubleshoot errors

When errors occur during processing, the trace highlights them:

  1. Look for nodes marked with an error indicator in the trace.

  2. Select the error node to view the error details, including the error message and context.

  3. Common issues include:

    • Authentication failures for tools or connectors
    • Knowledge source access errors
    • Timeout errors for long-running tool calls
    • Content moderation flags
  4. Address the root cause in the Build tab or Settings, then re-test.

The activity trace integrates with the Build tab for quick editing.

  1. Select any source, tool, or component in the trace.

  2. Copilot Studio navigates to the corresponding component in the Build tab.

  3. Make your changes and return to the Preview tab to re-test.