exploring-llm-traces

Analyze MCP-captured LLM agent traces from PostHog URLs or JSON exports.

58|5|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/PostHog/skills --skill exploring-llm-traces
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exploring-llm-traces
Source: https://github.com/PostHog/skills/tree/main/skills/omnibus/exploring-llm-traces
Command: npx skills add https://github.com/PostHog/skills --skill exploring-llm-traces

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

PostHog users need to debug and inspect LLM/AI agent traces captured by MCP tools to understand tool usage, context surfaced, and agent decisions.

Core Features & Use Cases

  • Trace exploration: inspect the event tree of an interaction to see tool invocations, inputs, outputs, and decision points.
  • State visibility: view the $ai_input_state and $ai_output_state to verify data surfaced and decisions made.
  • Reproducible analysis: use the included scripts to summarize, timeline, drill into specific spans, and search traces for keywords.

Quick Start

Paste a trace URL (or upload a trace JSON) and run the included scripts to generate a concise trace summary.

Frequently Asked Questions about exploring-llm-traces

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

FAQPage Schema
How do I debug LLM traces captured by MCP tools in PostHog?

To debug LLM traces in PostHog, you can parse trace URLs or JSON exports to inspect the event tree, tool invocations, and model responses. This allows you to identify agent decisions and verify the data surfaced during interactions.

What is the best way to inspect AI agent tool usage and state visibility from a trace?

Inspecting AI agent tool usage involves viewing the event tree and the `$ai_input_state` and `$ai_output_state` properties. This reveals tool inputs, outputs, and decision points to verify exactly what data influenced the agent's actions.

Can I analyze large LLM trace payloads without losing context?

Yes, you can analyze large LLM trace payloads by using scripts to summarize activity and generate timelines. These scripts parse large exports, expose structured properties for filtering, and allow searching traces for specific keywords.

Does this trace analysis approach work with raw JSON exports or do I need a direct URL?

This trace analysis approach works with both direct PostHog trace URLs and raw JSON exports. You can paste a URL or upload a JSON file to generate a concise trace summary and drill into specific spans.

How do I search across trace trees for specific keywords during observability checks?

You can search across trace trees for specific keywords by running included scripts against the parsed trace data. This enables auditing and correlation by exposing structured properties for filtering throughout the trace payload.