trace-qa
Trace QA
Analyze agent execution traces to answer questions about what happened, why it failed, how efficient it was, or any other aspect of the run.
Workflow
Always start with overview to understand the trace before diving into details.
1. Get the overview first
python scripts/fetch_trace.py <trace_id> overview
This returns metadata (status, duration, tokens, model) and summaries (request, answer preview, tool usage counts). Use this to orient yourself before going deeper.
2. Explore steps or LLM calls as needed
Depending on the user's question, drill into the relevant data:
| User wants to know... | Command |
|---|---|
| What tools were called and in what order | steps [start] [count] |
| Full input/output of a specific tool call | step <N> |
| How many LLM calls and their token costs | llm-calls [start] [count] |
| What messages were sent to Claude in a specific turn | llm-call <N> |
| Just the final result | answer |
3. Handle long content with segmented reads
When content is large, the script automatically segments output to ~4000 characters.
If you see a [CONTINUED: ...] message at the end of output, call the command shown
in that message to read the next segment. Repeat until all content is read.
Example sequence:
python scripts/fetch_trace.py <id> step 5
# Output ends with: [CONTINUED: use 'step 5 --offset 4000' for next segment]
python scripts/fetch_trace.py <id> step 5 --offset 4000
# Output ends with: [CONTINUED: use 'step 5 --offset 8000' for next segment]
python scripts/fetch_trace.py <id> step 5 --offset 8000
# Full content now read
Command Reference
| Mode | Syntax | Description |
|---|---|---|
overview |
fetch_trace.py <id> overview |
Metadata + summary stats |
steps |
fetch_trace.py <id> steps [start] [count] |
Paginated step list (default: 30/page) |
step |
fetch_trace.py <id> step <N> [--offset <chars>] |
Single step full content |
llm-calls |
fetch_trace.py <id> llm-calls [start] [count] |
Paginated LLM call list |
llm-call |
fetch_trace.py <id> llm-call <N> [--offset <chars>] |
Single LLM call full content |
answer |
fetch_trace.py <id> answer |
Final answer only |
Common Analysis Patterns
Failure diagnosis: overview → find error → steps list → examine failing step detail
Token efficiency: overview (total tokens) → llm-calls list (per-call breakdown) → identify expensive calls
Behavior understanding: overview → steps list → step details for key tool calls
Tool usage audit: overview (tool summary) → steps list filtered by tool name
Environment
Set API_BASE_URL to override the default API endpoint (http://127.0.0.1:62610).
More from dp-archive/archive
skill-finder
Helps users discover and install agent skills from the open skills ecosystem (skills.sh). Use when users ask 'how do I do X', 'find a skill for X', 'is there a skill that can...', want to search for tools/templates/workflows, or express interest in extending agent capabilities.
12brand-identity
>
12code-to-diagram
Generate architecture diagrams, ER diagrams, sequence diagrams, flowcharts, and class diagrams from codebases using Mermaid.js. Use when users ask to visualize code structure, draw architecture diagrams, create ER diagrams from database models, generate sequence diagrams from API flows, or produce any diagram from source code. Triggers on: 'draw architecture', 'generate diagram', 'visualize code', 'ER diagram', 'sequence diagram', 'class diagram', 'flowchart from code', 'module dependency graph'.
10canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
8skill-evolver
Analyze skill execution traces to identify issues and automatically evolve/improve skills. Use when users provide trace files (JSON) from skill runs and want to improve skill performance based on real execution data. Triggers on requests like "analyze traces", "evolve skill based on traces", "improve skill from execution history", "find issues in skill traces", or when working with skill trace/log files.
8humanizer
|
8