Agent trace debugger

From fritzprix/libr-agent · View interactive version

Agent trace debugger is an AI agent skill from the GitHub repository fritzprix/libr-agent. Parse .trace.json files and correlate with backend events and tool calls. Use when debugging agent behavior, investigating tool call patterns, or validating concurrency limits.

How to use this skill

Skill file

Agent Trace Debugger

Parse and analyze LibrAgent agent session trace files (.trace.json).

Trace File Location

Trace files are typically stored in:

Analysis Workflow

1. Load Trace File

import { readFileSync } from 'fs';
const trace = JSON.parse(readFileSync('session.trace.json', 'utf-8'));

2. Extract Tool Call Sequence

const toolCalls = trace.messages
  .filter((m) => m.role === 'assistant' && m.tool_calls)
  .flatMap((m) => m.tool_calls);

3. Correlate with Backend Events

Match trace tool calls with agent:event payloads:

4. Identify Workflow Phases

LibrAgent uses Think-Act-Observe loop:

5. Detect Issues

Key Patterns to Look For

{
  "session_id": "uuid-here",
  "messages": [
    {
      "role": "user",
      "content": "Task description"
    },
    {
      "role": "assistant",
      "content": "Reasoning...",
      "tool_calls": [
        {
          "id": "call_123",
          "function": {
            "name": "planning_create_task",
            "arguments": "{\"title\": \"Task\"}"
          }
        }
      ]
    },
    {
      "role": "tool",
      "tool_call_id": "call_123",
      "content": "Task created"
    }
  ]
}

Integration with Other Tools

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.