subtext_url, opens that person’s real session, and walks the decisive moments with screenshots, the component tree, network, and console. Amplitude detects; Subtext diagnoses.
This guide assumes the Subtext capture snippet is installed and the Amplitude Browser SDK (
@amplitude/analytics-browser) is initialized.Attach the session URL
Store the current Subtext session URL on your Amplitude data so it travels with the signal. There are two places to attach it, depending on how precise the link needs to be.On the user profile
Attach the URL to the Amplitude user profile with theIdentify class. Call it wherever your app already identifies the user — on auth resolution, not at module top level. Amplitude typically uses snake_case for property names, but match whatever convention your project already uses.
On every event
An Amplitude enrichment plugin runs on every event, reading the URL fresh each time. Becauseurl.now carries a timestamp, the link deep-links to the moment each event fired. Register the plugin once at initialization, before any track calls.
From signal to session
Amplitude shows you that a metric moved and who it moved for; the session shows the confusion, error, or broken state behind it. However you first hear about a problem in Amplitude, the path is the same: get to thesubtext_url, then hand it to your agent for a Detect-vs-Diagnose read.
An anomaly alert on a key metric
An anomaly alert on a key metric
An Amplitude alert fires by email or Slack: “
Onboarding Completed is anomalously low — 25% below forecast.”From the alert, open the chart and segment to users who started but didn’t complete in the window. Open a user, go to User Properties, and copy subtext_url. Grab several, then hand them to your agent:A scheduled dashboard email
A scheduled dashboard email
Your scheduled Amplitude dashboard email shows activation down versus last week.Click into the offending chart, drill into the down segment, open the affected users, and copy
subtext_url.A live funnel or retention drill-down
A live funnel or retention drill-down
You build a funnel in Amplitude, see a sharp drop at one step, and click into the users who didn’t advance.Open a non-converting user’s profile, go to User Properties, and copy
subtext_url.For agents
An autonomous agent can run the whole loop against Amplitude directly: discover the friction, extract thesubtext_url, and hand each session to the Subtext MCP. Amplitude ships an official MCP server at https://mcp.amplitude.com/mcp (EU: https://mcp.eu.amplitude.com/mcp) over streaming HTTP, authenticated with OAuth 2.0.
1
Discover who is affected
The MCP is best for discovery: drive funnel, segmentation, and retention queries in natural language to find the drop steps. Its tool registry is dynamic, so discover tools at runtime via the meta-tools
get_amplitude_context, list_tool_categories, get_category_tools, and describe_tool, plus query_chart.For deterministic work, use the Dashboard REST API instead — base https://amplitude.com/api/2/... (US) or https://analytics.eu.amplitude.com/api/2/... (EU), HTTP Basic -u {api_key}:{secret_key}:GET /api/2/events/segmentation finds low-converting slices, and the Behavioral Cohorts API (/api/3/cohorts) defines or exports at-risk user groups.2
Extract the session URL
Read
subtext_url per user from the User Profile REST API:3
Hand off to Subtext
For each URL, call
review-open(session_url=<subtext_url>) on the Subtext MCP. Event-level URLs are moment-precise, so the review opens exactly when the signal fired.subtext_url only round-trips if it was attached at capture time (see Attach the session URL) — as a user property, and optionally an event property via the enrichment plugin. For autonomous or headless runs, prefer the API-key Basic-auth REST path over the MCP’s OAuth browser flow. Match your region (US vs EU) for the MCP and Dashboard API endpoints; the User Profile API is US-only.Related
- Session Review overview — what your agent does once a session is open.
- Install the capture snippet — required before any session URL exists to attach.

