# Investigate AI session

> Investigate AI session is an open-source agent skill for developer tools. Diagnoses why specific Amplitude-instrumented AI agent sessions failed and traces root. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/amplitude/mcp-marketplace/tree/main/plugins/amplitude/skills/investigate-ai-session
- **Repository:** https://github.com/amplitude/mcp-marketplace
- **GitHub stars:** 50
- **License:** MIT
- **Skill name:** investigate-ai-session
- **Collection:** https://github.com/amplitude/mcp-marketplace
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill investigates individual AI agent sessions or recurring failure patterns in projects that already use Amplitude Agent Analytics. It moves from a session ID, a complaint about a user, or a flagged issue to a root cause analysis by reading the conversation, the execution spans, and the evaluator enrichment for each session.

The workflow pulls the session detail, transcript and span trace in parallel, looks for errored spans, slow tool calls, repeated retries and oversized model calls, and then classifies the failure as a tool, model, orchestration, user-confusion or context problem. It then checks whether similar sessions or tool reliability changes point to a one-off or a systemic issue, and limits deep dives to a handful of sessions.

The skill is built around calls to the Amplitude agent analytics tool and expects an Amplitude project with agent instrumentation. It is designed to follow the monitor-ai-quality skill, which surfaces the problem before this one explains it.

## When your agent uses it

> Deep-dives into specific AI agent sessions or failure patterns to explain why something went wrong. Only use when the user has Amplitude Agent Analytics instrumented in their project. Use when investigating a specific session ID, debugging agent failures, understanding why quality is low, tracing tool errors, or when monitor-ai-quality surfaces an issue that needs root cause analysis.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/amplitude/mcp-marketplace/tree/HEAD/plugins/amplitude/skills/investigate-ai-session)
- [License: MIT](https://github.com/amplitude/mcp-marketplace/tree/HEAD/plugins/amplitude/skills/investigate-ai-session)

## Features

- **Session deep dive:** Pulls detailed enrichment, conversation transcript and execution spans for a given session.
- **Failure classification:** Sorts failures into tool, model, orchestration, user confusion or missing context categories.
- **Pattern search:** Finds related sessions by agent, tool, error flag, topic or user to test whether a failure is systemic.
- **Tool reliability checks:** Compares tool error rates and latency over time to spot when a dependency started failing.
- **Root cause report:** Produces a summary, session table, trace highlights, scope assessment and numbered fixes.

## Good for

- Explain why a specific agent session with ID abc-123 produced a bad result
- Find out why Chart Agent sessions have been failing this week
- Trace which tool call caused a timeout in a customer's conversation
- Check whether a tool's error rate rose after a recent deployment
- Investigate why answer quality dropped for a set of recent sessions

## Install

### Claude Code

This skill ships in the `amplitude` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add amplitude/mcp-marketplace
/plugin install amplitude@amplitude
```

Or copy only this skill to `~/.claude/skills/investigate-ai-session`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/investigate-ai-session &&
cp -R "$tmp/plugins/amplitude/skills/investigate-ai-session" ~/.claude/skills/investigate-ai-session &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/investigate-ai-session` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/investigate-ai-session` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/investigate-ai-session &&
cp -R "$tmp/plugins/amplitude/skills/investigate-ai-session" ~/.agents/skills/investigate-ai-session &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/investigate-ai-session` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/investigate-ai-session` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/investigate-ai-session &&
cp -R "$tmp/plugins/amplitude/skills/investigate-ai-session" ~/.cursor/skills/investigate-ai-session &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/investigate-ai-session` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/amplitude/mcp-marketplace.git --path plugins/amplitude/skills/investigate-ai-session
```

Or copy the folder to `~/.gemini/skills/investigate-ai-session` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/investigate-ai-session`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/investigate-ai-session &&
cp -R "$tmp/plugins/amplitude/skills/investigate-ai-session" ~/.copilot/skills/investigate-ai-session &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/investigate-ai-session` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git
```

Then copy `mcp-marketplace/plugins/amplitude/skills/investigate-ai-session` into your agent's skills folder as `investigate-ai-session`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Investigate AI session require before it can run?

It is only meant for projects that have Amplitude Agent Analytics instrumented, and it calls the Amplitude agent analytics tool to read sessions, conversations, spans and tool reliability data.

### When does Investigate AI session trigger?

It triggers when investigating a session ID, debugging agent failures, understanding low quality, tracing tool errors, or when monitor-ai-quality surfaces an issue needing root cause analysis.

### Does Investigate AI session change anything in my agent or project?

The skill describes reading and analyzing session data and recommends fixes; it does not describe making changes to code or configuration itself.

### What if spans are missing for a session?

The skill says span data requires OpenTelemetry-compatible tracing in the agent. Without it, it reports what is available at the session and conversation level and notes that span data would help.

### How do I install Investigate AI session in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/investigate-ai-session to use it in all your projects, or to .claude/skills/investigate-ai-session in one project. Or install the amplitude plugin, which includes it: /plugin marketplace add amplitude/mcp-marketplace, then /plugin install amplitude@amplitude.

### Does Investigate AI session run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Investigate AI session?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Investigate AI session?

The closest alternatives to Investigate AI session are Monitor AI quality, Agent insights, Diagnosing superpowers, Agent introspection debugging and Agent architecture audit.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Monitor AI quality](https://ai-powered.com/skills/monitor-ai-quality): Monitor AI quality is an open-source agent skill for developer tools.
- [Agent insights](https://ai-powered.com/skills/agent-insights): Agent insights is an open-source agent skill for developer tools.
- [Diagnosing superpowers](https://ai-powered.com/skills/diagnosing-superpowers): Diagnosing superpowers is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging-fmarzochi): Agent introspection debugging is an open-source agent skill for developer tools.
- [Agent architecture audit](https://ai-powered.com/skills/agent-architecture-audit): Agent architecture audit is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging): Agent introspection debugging is an open-source agent skill for developer tools.
- [Axiom analyze test failures](https://ai-powered.com/skills/axiom-analyze-test-failures): Axiom analyze test failures is an open-source agent skill for developer tools.
- [Debug replay](https://ai-powered.com/skills/debug-replay): Debug replay is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/investigate-ai-session
