Skip to main content
When an agent gives an off-topic answer, frustrated by not knowing “why it answered that way”? Tracing tracks every step of AI request processing. What documents were searched, what tools were invoked, what prompt was sent to the LLM — every step is transparently visible.

Example

Agent answered “I can’t find that information”
StateWhat’s PossibleResult
Without tracingOnly guessingCannot identify cause
Using tracingRAG search → 0 results confirmed in Run treeKB document missing → resolved by adding documents
Access via Admin > Evaluations > Tracing.
Tracing main screen
Tracing is a licensed feature. Requires a license with trace feature enabled.

Tracing Concepts

Processing a single user message involves multiple steps. Tracing records all these steps in a Trace > Run hierarchy.
ConceptDescription
TraceFull processing for a single message
RunIndividual processing step within a Trace
Run treeRun hierarchy with parent-child relationships

Searching Traces

Search Methods

Search TypeDescription
Chat IDView all traces for a specific chat
Message IDView only the trace for a specific message

Filter Options

FilterOptions
PeriodLast 1, 7, 30 days, all
StatusSuccess, Error, Running, Pending
TypeChain, LLM, Tool, Retrieval, Web Search, Guardrail, Embedding
UserFilter by specific user (admin only)
When searching by Chat ID or Message ID, date filters don’t apply. All traces for that ID are shown regardless of period.
In the chat screen, click View Tracing in the message option menu to navigate directly to that message’s trace screen.

Message Card

Search results are displayed as a list of message cards.
ItemDescription
User messageOriginal input message (max 2 lines)
Message IDMessage identifier (abbreviated)
TimeRequest time
Total latencyTotal processing time (ms)
Total tokensTotal token usage (prompt + completion)
Trace badgesStatus display per Run type

Trace Detail View

Click a message card to open the trace detail modal. The Run tree is on the left, and the selected Run’s details are on the right.
Trace detail modal

Run Tree Structure

The left panel shows processing steps as a tree.
[CH] Response               2.34s
  ├─ [GD] guardrail:security 0.05s
  ├─ [RG] KnowledgeBase      0.32s
  ├─ [LM] GPT-4              1.89s
  └─ [TL] web_search         0.13s

Run Types

CodeTypeColorDescription
CHChainPurpleComposite work (full message processing)
LMLLMBlueLLM API call
TLToolGreenTool execution
RGRetrievalOrangeRAG document search
WBWeb SearchCyanWeb search
GDGuardrailRedGuardrail check
EMEmbeddingYellowEmbedding generation
IMImageIndigoImage generation
ACTActionPurpleTool + sub-task group (expandable)
TKTaskGrayBackground task

Status Display

StatusSymbolColor
SuccessGreen
ErrorRed
RunningYellow
PendingGray
Trace overall status: Error if any included Run has Error, Running if no Error and a Running exists.

Run Details

The right panel shows details of the selected Run.
SectionDescription
StatusStatus, latency, model ID
InputsInput data (system prompt, user message, etc.)
OutputsOutput data (AI response, search results, etc.)
ErrorError message (on errors)
Token Usageprompt_tokens, completion_tokens, total_tokens (LLM type)

View Modes

Inputs/Outputs can be viewed in three formats.
ModeDescription
TreeHierarchical tree structure (default)
JSONRaw JSON format
TextPlain text
Search text in the Outputs area.
ActionMethod
SearchYellow highlight on entered query
Next matchEnter
Previous matchShift + Enter
Match countShown next to search box as 1/5

Trace Types

Main Response

The process of generating an AI response to a user message.
TypeDescription
ResponseFull response generation (top-level Chain)
LLMLLM API call
RAGKnowledge Base search
ToolTool execution
SearchWeb search
GuardGuardrail check

Background Tasks

Background tasks for chat support features.
TypeDescription
TitleAuto-generate chat title
TagAuto-generate chat tags
QueryRAG search query generation
EmojiGenerate chat emoji
AutocompleteAutocomplete suggestion
FunctionFunction call decision

How to Read the Run Tree

The agent’s Run tree consists of 2 phases. Understanding this structure helps you quickly find the cause of problems.
PhaseRun NameWhat It Does
Phase 1react_agent (CH)Stage where the LLM calls tools to collect data. KB search, DB query, web search, etc. happen here
Phase 2final_answer (LM)Stage that synthesizes collected data into a final answer

Debugging Points

Check the Inputs of Phase 1’s first LM Run. Verify the KB tool is included in tool_descriptions.
  • Tool not in list → KB not connected to agent or tool description empty
  • Tool present but not called → LLM judged low relevance between question and tool. Make tool description more specific
Check searched document content in RG (Retrieval) Run Outputs.
  • Search results irrelevant → KB document quality issue or search settings (Top K, Reranker) need adjustment
  • Search results good but answer is off → Check passed context in Phase 2 final_answer LM Run Inputs. Adjust response format prompt
Click the TL (Tool) Run marked red ● to check the Error section. Also verify passed parameters in Inputs.
Compare latency (ms) next to each step in the Run tree. The longest step is the bottleneck.
  • LM Run slow → consider faster model
  • RG/TL Run slow → check search settings or external service
  • GD Run slow → disable LLM Judge or change to faster model

Trace Analysis Report

A feature that analyzes trace data with LLM to automatically identify the root cause of problems.
1

Start analysis

Click Trace Analysis at the top of the trace detail modal.
InputDescriptionRequired
Analysis modelLLM model used for analysisRequired
Problem descriptionDescription of observed problemOptional
The analysis model list excludes models with base_model_id (custom models), preset models, and arena models. Only base models are selectable.
2

Review analysis result

The LLM analyzes trace data and generates a structured report.The LLM comprehensively analyzes trace data + agent settings + conversation history + KB/DB/guardrail settings to generate the report.
Report SectionContent
Summary2~3 sentence core summary of analysis
Trace overviewID, status, latency, tokens, Run count, error count
Root cause analysisPrimary cause + contributing factors
Phase 1 analysisWhether tool selection was appropriate, available vs. actual tool calls
Phase 2 analysisAppropriateness of final answer relative to collected data
Prompt/setting issuesSystem prompt, model selection issues
KB/RAG issuesSearch settings, document quality, filter issues
DB/SQL issuesNL-to-SQL conversion, schema issues
Guardrail issuesExcessive blocking, false positives
Error analysisError Run detailed diagnosis
Improvement recommendationsImmediate actions, setting changes, data improvements
Entering a problem description enables analysis focused on that context. Example: “KB found documents but they weren’t reflected in the answer”
3

Save/share report

FeatureDescription
CopyCopy full text to clipboard
DownloadDownload as markdown file (.md)
When a previously analyzed report exists, View Report button shows it directly without re-analysis.

Trace Management

Permissions

RolePermission
Regular userCan only view own traces
AdminView and manage traces of all users

Data Cleanup

Old traces can be cleaned by admins via the /api/traces/cleanup API. Bulk-delete traces before a specific timestamp (in milliseconds, ms).
Trace deletion is irreversible. Download necessary analysis reports before deleting.

Use Cases

  1. Click View Tracing on a chat message
  2. Expand the Run tree of the problem message
  3. RG (Retrieval) Run → check searched documents in Outputs
  4. LM (final_answer) Run → check passed context in Inputs
  5. Generate a Trace Analysis Report to auto-identify root cause
  1. View traces of slow responses
  2. Compare latency (ms) next to each step in the Run tree
  3. Identify the longest step (e.g., RAG 0.8s, LLM 3.2s)
  4. Optimize that step (adjust search settings, change model, etc.)
  1. Filter by Error status
  2. Pick the failed Run marked red ●
  3. Check error message in the Error section
  4. Verify passed parameters in Inputs
  1. Check total tokens count on the message card
  2. Compare per-LM Run prompt_tokens / completion_tokens in the Run tree
  3. Check token ratio of Phase 1 (react_agent) vs Phase 2 (final_answer)
  4. Identify unnecessarily large prompts or repeated calls

Accessing Tracing from Chat

Click View Tracing in the message option menu on the chat screen to navigate directly to that message’s trace screen.
PermissionVisible Button
Admin or evaluation read/write permissionView Tracing → navigate to trace screen
Other usersCopy Message ID → forward to admin for investigation
When regular users encounter response problems, copy the Message ID and forward to an admin. The admin can look up the trace by ID to identify the cause.

FAQ

Yes — when message tracing is enabled (default: enabled), all AI requests are auto-recorded. No additional setup needed.
Default retention is 30 days. Admins can change settings or manually clean up.
Trace recording is asynchronously processed in the background, so it has nearly no impact on response speed.
Yes — trace analysis is a separate LLM call, tracked in usage as trace_analysis. Analysis only runs when manually triggered.

Guardrail Logs

Dedicated log for guardrail detection events

Auto-evaluation

Agent response quality auto-evaluation results

Usage

Token usage and cost analysis