agent-tracing

Inspect JSON execution snapshots and step-level traces from .agent-tracing.

1|Updated May 9, 2026
One-click install
npx skills add https://github.com/duwenji/generative-ai-oss-tutorials --skill agent-tracing-duwenji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-tracing
Source: https://github.com/duwenji/generative-ai-oss-tutorials/tree/main/sandbox/lobe-chat/.agents/skills/agent-tracing
Command: npx skills add https://github.com/duwenji/generative-ai-oss-tutorials --skill agent-tracing-duwenji

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agent tracing helps you debug why an LLM agent behaved a certain way by letting you inspect execution snapshots, including the exact context-engine input and final LLM payload sent to the model.

Core Features & Use Cases

  • Execution snapshot inspection: View completed traces and drill into individual steps to understand what happened and when.
  • Context engine deep-dive: Compare context-engine input (DB messages, system role, model, tools, memory) versus the processed final LLM payload.
  • Message, tools, and event forensics: Inspect messages, tool calls/results, raw runtime events, user memory, and payload diffs across steps.

Quick Start

Run agent-tracing inspect latest and use the step and flags to view the context payload that was sent to the LLM.

Frequently Asked Questions about agent-tracing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug unexpected LLM agent behavior and inspect execution snapshots?

Debug unexpected LLM agent behavior by inspecting recorded execution snapshots and step-level traces. You can view completed traces to drill into individual steps and understand exactly what happened during the agent runtime.

How can I compare context-engine input versus the final LLM payload sent to the model?

Compare context-engine input against the final LLM payload by using agent tracing to deep-dive into context payloads. This reveals how DB messages, system role, model, tools, and memory are processed before reaching the LLM.

How do I inspect agent tool calls, messages, and raw runtime events from a trace?

Inspect agent tool calls, messages, and raw runtime events by using CLI inspection flags on completed JSON traces. These flags allow you to view tool call results, event forensics, user memory, and payload diffs across steps.

What is the best way to view the context payload sent to the LLM for a specific agent step?

View the context payload sent to the LLM by running the CLI inspection command on the latest trace. You can navigate to a specific step and apply flags to inspect the exact messages and context delivered to the model.

Do I need to generate local snapshots in development mode to use agent tracing?

Yes, you need to generate local snapshots in development mode to use agent tracing. The diagnostic process requires reading completed JSON traces from the .agent-tracing directory to inspect recorded execution steps.

Why does my LLM agent behave differently than expected despite correct context-engine inputs?

If your LLM agent behaves unexpectedly, inspect the payload diff between context-engine input and the final LLM payload. Analyzing execution snapshots and step-level traces helps identify where the context transformation diverged.