Agent Trace Skill
Description
Analyzes agent execution logs to visualize decision flow, tool calls, and identify bottlenecks or errors.
Usage
/agent-trace [incident-id]
Example: /agent-trace INC-2026-02-10-001
What This Skill Does
- •Reads
logs/agent-actions.jsonlfor specified incident (or latest) - •Reconstructs agent execution flow:
code
[10:30:45] Orchestrator: Received incident (payment-service high error rate) [10:30:46] Orchestrator → Tool: callDebugger [10:30:47] Debugger: Starting diagnostics [10:30:48] Debugger → Tool: getServiceHealth [10:30:49] Debugger ← Result: unhealthy (1/3 replicas ready) [10:30:50] Debugger → Tool: getRecentLogs [10:30:52] Debugger ← Result: 47 OOMKilled errors [10:30:53] Debugger → Tool: getMetrics [10:30:54] Debugger ← Result: memory at 98%, error_rate 15% [10:30:55] Debugger: Diagnosis complete (confidence: 0.89) [10:30:56] Orchestrator ← Result: Memory leak identified [10:30:57] Orchestrator → Tool: generateReport [10:30:58] Orchestrator: Report generated
- •Highlights:
- •Tool failures (red)
- •Low confidence diagnoses (yellow)
- •Escalations (orange)
- •Calculates:
- •Total execution time
- •Token usage estimate
- •Number of tool calls
- •Suggests optimizations if applicable
Example Output
code
Agent Trace: INC-2026-02-10-001 Execution Time: 13.2s Tool Calls: 7 Estimated Tokens: ~8,500 Decision Flow: ✅ Orchestrator correctly delegated to Debugger ✅ Debugger gathered comprehensive evidence (3 tools) ✅ High confidence diagnosis (0.89) ✅ Report generated successfully No issues detected.