subtext_url, opens that person’s session, and walks the decisive moments with screenshots, the component tree, network, and console. Sprig detects; Subtext diagnoses.
This guide assumes the Subtext capture snippet is installed and the Sprig browser SDK is initialized (via the Sprig HTML snippet, or via
@sprig-technologies/sprig-browser using the equivalent method-call syntax, Sprig.setAttributes(...) / Sprig.setUserId(...)).Attach the session URL
Attach the current Subtext session URL to the Sprig visitor withsetAttributes. It rides along on the visitor and is stamped onto any survey responses they submit, so each response carries a deep link back to what the user was doing. Call it wherever your app already identifies the user — on auth resolution, not at module top level.
From signal to session
However you first hear about it in Sprig — a detractor notification, a vague verbatim, a recurring theme at study wrap-up — the path is the same: get to thesubtext_url, then hand it to your agent for a Detect-vs-Diagnose read. A Sprig response is what the user said; the subtext_url stamped on it is what they did.
A detractor or low-score response notification
A detractor or low-score response notification
Sprig notifies you of a low-score response with a comment like “couldn’t find where to export.”Open the study, go to Responses, open the response, go to Attributes, and copy
subtext_url. Then hand it to your agent:A confusing open-text comment
A confusing open-text comment
A response says something ambiguous — “it just didn’t work” — and the words alone are useless.Open that response, go to Attributes, and copy
subtext_url.A theme in negative feedback at study wrap-up
A theme in negative feedback at study wrap-up
You’re closing out a study and a recurring complaint shows up across several responses.Filter responses by the low score or theme and copy
subtext_url from each (or export the responses — subtext_url is a column).For agents
An autonomous agent can run the whole loop against Sprig directly: find the low-score or themed feedback, extract the storedsubtext_url, and hand each session to the Subtext MCP.
Sprig ships an official MCP server at https://mcp.sprig.com/mcp, authenticated with OAuth 2.0 (an admin enables it at Settings → Agents → Sprig MCP; members connect their own accounts, scoped to workspace permissions). It exposes three tools — Retrieve Surveys, Retrieve Responses, and Retrieve Themes — enough for the discovery loop below; use the Data Export API when you need bulk extraction.
1
Discover the friction
Start with the Sprig MCP: Retrieve Surveys lists the studies in the workspace, Retrieve Responses fetches a study’s responses, and Retrieve Themes returns Sprig’s AI-generated themes — its open-text analysis auto-clusters free-text feedback — with their associated responses. Filter by score (low CSAT/NPS) and theme to isolate the complaints worth reviewing. For bulk extraction, fall back to the Data Export API (
Authorization: Bearer <token>) against the REST base https://api.sprig.com. (The Public API v2, Authorization: API-Key <key>, imports People, Events, and Attributes — and also reads them back: GET /v2/users/{userId} returns a visitor’s attributes and events.)2
Extract the session URL
subtext_url is a respondent attribute (imported via the Public API’s People/Attributes) and appears alongside each response in the Data Export. You don’t need a separate lookup to get it: pass with_snapshots=true on the Data Export request and each response includes a visitorSnapshot with the visitor’s attributes (including subtext_url) as of survey delivery. Alternatively, for identified visitors, take the response’s externalUserId and read attributes directly with GET https://api.sprig.com/v2/users/{userId} (Authorization: API-Key <key>) — note this returns current attributes (the snapshot preserves the value at survey time) and only works for visitors with user IDs; externalUserId is null for anonymous respondents.3
Hand off to Subtext
For each URL, call
review-open(session_url=<subtext_url>) on the Subtext MCP. Each review grounds the feedback in what actually happened — a Detect-vs-Diagnose read of what the respondent said versus what the session shows they did. For a theme, review several respondents’ sessions together to find the shared pattern.subtext_url only round-trips if it was stamped onto the response as a visitor attribute at capture time (see Attach the session URL).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.

