Loading
Agentforce and Einstein Generative AI
Trace Panel in Agentforce Builder

Trace Panel in Agentforce Builder

The Trace panel is the reasoning debugger built into the Preview and Live Test experience in Agentforce Builder. It shows how your agent made decisions, including selected subagents, which actions triggered, when topic transitions happened, and how variable values changed.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type.

After you send a test message, the Interaction Summary shows each event in the agent's decision-making process as a visual timeline. Depending on the test case, the events include:

Event Description
Input: [message] The message that started this turn
Reasoning: [agent name] The agent's reasoning pass outlining what it decided to do next and why
Action: [function label] An agent action that the agent triggered (flow, Apex, and so on)
Transition to Subagent: [target agent] The agent handed off the conversation to a subagent within the same agent
Transition to Agent: [developer name] The agent handed off the conversation to a separate related agent
Output Evaluation: [category] Evaluation of the agent's response before it's returned to the user
MCP Tool Evaluation: [agent name] An MCP tool call the agent evaluated

Select any event in the Interaction Summary to open its detail view in the Trace tab. The Trace tab shows a breakdown of every millisecond of that event, with timing bars for each sub-operation. Drill into an individual span to see its full output data and exactly what the agent received and returned at that point.

The Variables subtab shows the state of every variable at each decision point in the session. Each event shows the value before it ran and the value after the event completed. For example, a boolean flipping from False to True after a condition check passes. Use the Variables subtab to:

  • Verify that the correct data reached an agent action or prompt template
  • Confirm that the correct variable updated after action completion
  • Identify where in the session that a variable received an unexpected value

Set initial or override values in Context Variables before starting your test, then use variables during the session to track how those values evolve.

Within any Reasoning step, the Trace tab shows the exact prompt sent to the LLM. Use this information to understand:

  • What context the agent had when it selected a subagent or decided to trigger an agent action
  • If the prompt contained the variable values and instructions you expected
  • Why the agent's reasoning led to an unexpected outcome

While reviewing a trace, ask the built-in Agentforce Assistant questions about what you're seeing. For example, "Explain the prompt generated in this reasoning step" or "How can I fix the agent to handle this case?"

Review any suggested fixes carefully before applying them. Suggestions sometimes reference agent actions or flows that don't exist in your org, so verify before making changes.

Here are a few of the more common debugging issues and steps for how to resolve them.

Event Resolution
An agent action didn't trigger Open the Reasoning step immediately before the expected action. Review the generated prompt to see whether the agent had the context needed to call the action. Then check whether a FunctionStep (Action) appears after the Reasoning step. If it doesn't, the agent decided not to trigger the action based on its available context.
An unexpected subagent transition happened Find the TransitionStep in the Interaction Summary. Expand the Reasoning step before it to see what context led the agent to transition. Confirm whether the Agent Router's configuration matches the intent your test message expressed.
Output didn't match expectations Check the OutputEvaluationStep at the end of the sequence. Then work backward through the Reasoning steps and the Variables subtab to identify where the agent's decision diverged from what you expected.
 
Laden
Salesforce Help | Article