Skip to main content

Agent Traces

When an agent run goes wrong, the final answer rarely tells you why. Agent traces record what happened along the way: your prompt, each step the model took with its reasoning, every tool call with its arguments and result, and how long each part took. You can then:

  • open the run in the agent run view inside the IDE, with no network and no account,
  • save it as a .jsonl file,
  • upload it to a Hugging Face dataset, where it opens in the Hub's agent trace viewer.

Trace recording is off by default. Traces stay on your machine until you choose to export or upload one.

The agent run view

Turn on trace recording​

  1. Open Settings → DevoxxGenie → Debug
  2. Check Record agent traces
  3. Click Apply

Agent Trace Recording settings

In this example TruffleHog is set to Required and allowed to verify secrets. The defaults are Auto and off.

From then on, each agent or MCP turn is saved with its conversation in the conversation history database. Sub-agent steps from parallel_explore are saved as well, tagged with their sub-agent.

A trace is deleted together with its conversation, when you clear the history, and by the history's automatic size cleanup.

SettingDefaultWhat it does
Record agent tracesOffRecords each agent turn
Max tool result characters50,000Truncates long tool results. 0 means no limit
Replace home directory with ~ and OS username with <user>OnRemoves your home path and username from every recorded string
Custom redaction patternsEmptyExtra regular expressions to redact, one per line
TruffleHog scanAuto (when installed)Scans each turn for secrets. See Redaction and secret scanning
When TruffleHog finds a secretRedact the secretOr Drop the turn's trace
TruffleHog binaryEmptyPath to trufflehog when it is not on your PATH
Let TruffleHog verify secretsOffLets TruffleHog check candidate secrets with the service that issued them
Traces can contain sensitive content

A trace holds prompts, file contents, command output and tool results. Likely secrets are redacted before anything is written, but redaction is best-effort. Look at a trace before you share it.

View an agent run​

When a conversation has a trace, the chat toolbar shows View agent run:

View agent run in the chat toolbar

The button is hidden while trace recording is off. It is disabled while a response is running or when the conversation has no trace yet. You can also open a run from the conversation history: hover a row and click the run icon.

The run opens in an editor tab:

  • Summary line: the model, the number of turns, steps and tool calls, how many calls failed, the total time and the TruffleHog result (for example scan: CLEAN).
  • Tree: each turn, the steps the model took and the tool calls of each step, one line each. Every step shows the time since the previous one and whether the model reasoned. Every tool call shows a ✓ or ✗ and how long it took. A call with the same tool and arguments as an earlier one is marked ⟳ repeated, and a call that hit the tool-call limit is marked too. Sub-agent steps are nested under the parallel_explore call that started them.
  • Detail pane: select a step to see its text, reasoning and tool calls, or a tool call to see its full arguments and result.

Raw JSONL shows the trace in the format it is exported in. Opening the run again replaces the tab with a fresh snapshot.

The run view works offline and needs no Hugging Face account.

What the run view helps you find​

  • A model that loops: the same tool call, marked ⟳ repeated, step after step.
  • Slow steps: the +18.1 s next to a step is time the model spent thinking before it called a tool.
  • Wrong tool choices: for example search_files where find_symbols would have been faster, or a fetch_page on the wrong URL.
  • Failed calls: a ✗ in the tree, with the error in the detail pane.
  • A run cut short: a call marked hit the tool-call limit.

Export a trace​

The run view's Export menu has two options:

The Export menu in the agent run view

  • Save as .jsonl… saves the trace to a file you choose.
  • Upload to Hugging Face… uploads it. See below.

The conversation history has the same export and upload actions as icons on each row.

Both use Hugging Face's Session Trace format (JSONL, one line per message). Before a trace is exported, redaction runs again. When TruffleHog scan is Required, turns that were never scanned are left out.

Upload to Hugging Face​

Uploading puts the trace in a Hugging Face dataset. The Hub recognises the format and shows the trace in its agent trace viewer, so you can share a run with a teammate or keep a collection of runs to compare models and prompts.

First upload​

The first time you upload, DevoxxGenie asks for:

  • A write token. Create one at huggingface.co/settings/tokens. The token is saved in the IDE's credential store. If you already set HF_TOKEN or ran hf auth login, that token is used and you are not asked.
  • The dataset, in the form user/name. The default is <your user>/devoxxgenie-traces. If it doesn't exist, it is created, private unless you change that in Settings.

Each upload​

DevoxxGenie asks you to confirm before each upload:

Upload confirmation

When the upload finishes, a notification links to the file on Hugging Face:

Upload notification

Each conversation is one file, in the devoxxgenie folder of the dataset. Uploading the same conversation again overwrites its file.

A DevoxxGenie trace in the Hugging Face trace viewer

In the Hub viewer you see each user and assistant message with its model and time, the model's thinking, and the tool calls with their arguments. Notice the project path in the screenshot: the home directory was replaced by ~ before upload.

Hugging Face settings​

These are under Hugging Face upload in Settings → DevoxxGenie → Debug:

Hugging Face upload settings

SettingDefaultWhat it does
DatasetAsked on first uploadThe target dataset, user/name
Folder in datasetdevoxxgenieWhere trace files go
Access token (write)Asked on first uploadStored in the IDE credential store. Remove saved token clears it
Create the dataset as privateOnApplies only when DevoxxGenie creates the dataset
Include the project name in the trace headerOnTurn off to leave the project name out
Ask for confirmation before each uploadOnTurn off to upload without the dialog

Only datasets are supported, not Hugging Face storage buckets.

Redaction and secret scanning​

Every string is redacted before it is written to the trace, and again before export or upload:

  • Known secret formats, such as API keys, tokens and private keys, are replaced.
  • Your home directory becomes ~ and your OS username becomes <user> (unless you turn this off).
  • Your own patterns from Custom redaction patterns are applied.

TruffleHog adds a second check when it is installed (for example brew install trufflehog). It runs in the background after each turn.

TruffleHog scanBehaviour
Auto (when installed)Scans when the binary is found; otherwise relies on regex redaction
RequiredKeeps a turn only after a successful scan, and never exports an unscanned turn
OffRegex redaction only

When TruffleHog finds a secret, it is either redacted or the whole turn's trace is dropped, depending on When TruffleHog finds a secret. The scan result shows in the run view's summary line.

Let TruffleHog verify secrets is off by default because verification sends each candidate secret to the service that issued it.

Traces and the Activity Log​

The Activity Log and agent traces answer different questions:

  • Activity Log: a live stream of raw requests, MCP traffic and agent events, for watching what happens right now. It keeps only the most recent entries.
  • Agent traces: saved per conversation, structured by turn, step and tool call, and kept until you delete the conversation. Use them to look back at a finished run or share it.

Troubleshooting​

View agent run is missing or disabled​

  • The button is hidden while Record agent traces is off.
  • It is disabled while a response is running, and for a conversation that has no recorded turn yet. Turns from before you enabled recording are not traced.

A turn is missing from the trace​

  • With TruffleHog scan set to Required, a turn is kept only after a successful scan. Check that TruffleHog is installed, or set TruffleHog binary.
  • With When TruffleHog finds a secret set to Drop the turn's trace, a turn with a finding is dropped.

The upload fails​

  • A rejected or expired token gives a readable error. Create a new write token, or run hf auth login again.
  • Check that the dataset name has the form user/name.