Add tutorial: give your AI agent session context with Signals agentic contexts - #1895
Add tutorial: give your AI agent session context with Signals agentic contexts#1895jborlase-snowplow wants to merge 8 commits into
Conversation
New framework-agnostic walkthrough at tutorials/signals-agentic-contexts: define an agentic context, publish it, retrieve the rolling session record as JSON or an LLM-ready narrative, and iterate on the prompt. All example outputs are real captures from a live pipeline, verified against snowplow-signals 0.4.6 and @snowplow/signals-node 0.4.0. Documents a reality gap found while building: publish() and unpublish() return 409 for an event log that already exists, because the SDK's create-or-update fallback only handles 400. Prompt edits and unpublishing are routed through Console, and page 2 flags the SDK limitation. Console screenshots and the Snowplow Inspector step are still outstanding. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…utorial Wires the live Console screenshots into the agentic contexts tutorial and corrects the control names the pages had inferred from prose in docs/signals/agentic-contexts. Verified against the live Console: - the create screen is one scrolling "Create context" form with Details, Prompt, Lookback Window, and Events and Properties sections, not a stepped wizard - the fields are "Prompt" and "Primary owner", not "Prompt instructions" and "Owner" - the Console tab never told a Console-only reader to set the lookback window or select events, so that path could not be completed; both are now covered, keyed to the event selection screenshot - page 4 now routes the prompt edit through the Edit and Publish buttons that exist on the details page Also reworks the Snowplow Inspector instruction so every claim it makes is one docs/testing/snowplow-inspector/signals-integration supports, and restores an [END CONTEXT] marker missing from a captured narrative example on page 4. A third screenshot, agentic-context-draft-publish.png, is included but not referenced: it shows the dev-org prefixed resource name rather than the session_context name the tutorial ships. Either re-shoot or remove it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
documentation | 22d76f5 | Commit Preview URL Branch Preview URL |
Aug 04 2026, 02:10 PM |
Style reviewOverall this is a well-written tutorial: second person throughout, no marketing language, sentence-case headings, descriptive alt text, imports via A few things to fix: 1. Prerequisite list items aren't capitalized
The style guide (Lists) says "Capitalize the first word of each item." Sibling tutorials follow this — Fix: capitalize the first word of all four items, e.g. "A Snowplow pipeline with a [Collector endpoint]…" and "Page view tracking on a website you can browse…". 2. An added image is never referenced
3. Non-parallel construction
"has reached … not idly browsing" doesn't parallel. Fix: "this user has reached a checkout rather than idly browsing a product page." 4. Wrong admonition type for the SDK bug
Per CLAUDE.md, 5. "back end" should be hyphenated
The style guide (General technical terms) says "Always hyphenate: back-end, front-end, server-side, client-side." Fix: "send it to your back-end". ( 6. Ambiguous sentence
As written, "and a minute or two after that" reads as a second, contradictory clause. Fix: "Remember that buffering only started a minute or two after you published." Minor
|
The publish page carried a warning naming an SDK version and the HTTP status code returned when republishing an existing agentic context, and described the behavior as a bug. Replace it with a positive pointer to the Console edit and publish flow, which is the flow the rest of the tutorial already teaches. Also drop the measured config-apply durations on the publish and retrieval pages. Both still tell the reader that buffering starts after publishing, so the wait is clear without stating a figure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed 🤖 Generated with Claude Code |
Feature the AI-assisted route first: an AI assistant tab, default in both tab groups, with copy/paste prompts for defining, publishing, retrieving, and tearing down the agentic context, linking the Snowplow Assistant and the MCP connect page rather than duplicating setup. Trim the prerequisites to a Snowplow account and pipeline, Signals, and page view tracking, and drop the Micro/full-pipeline panel, the credentials prerequisite, and the Python version note (now in the SDK tab). Remove the four remaining admonitions, keeping only the load-bearing constraints as prose: publish before you browse, and one live agentic context per name. Cut the rationale paragraphs after the prompts and examples, the duplicated publish-then-browse and retrieve-every-turn instructions, and the third copy of the narrative block. Use "plain-language narrative" over "LLM-ready", align the meta.json title with the page title, hyphenate back-end, and drop the unreferenced draft screenshot. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The MCP server docs page covers connection; add the tutorial link once its PR merges. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed
🤖 Generated with Claude Code |
…ntro Retrieval belongs in the agent's back-end, not in an MCP-connected chat, so page 4 now teaches appending the narrative to a system prompt per turn and hands off to the three framework tutorials. Page 1 opens on the problem the feature solves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed 🤖 Generated with Claude Code |
|
Claude (@claude) review please |
Terminology, tense, and voice corrections against the extended style guide: "JavaScript tracker" not "browser tracker", "configuration" not "setup", hyphenated "front-end", present tense for Console's window display and for what attributes can tell an agent, active voice for what Signals captures, and "in the moment" for the banned temporal "now". Also gave the canonical event link descriptive text, split a 56-word recap sentence, and bumped the date on the two pages that were still on 2026-07-29. Owner overrides respected: no admonitions added, no rationale paragraphs, no timings or error strings, "agentic context" and the verbatim narrative output left untouched by the context-to-entity and US-spelling rules. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed 🤖 Generated with Claude Code |
What changed?
New tutorial
tutorials/signals-agentic-contexts/(5 pages + 2 live Console screenshots): define anEventLogagentic context (Console and Python SDK), retrieve the rolling session record as JSON and as an LLM-ready narrative (Python + Node.js), use it with any chat LLM, and iterate on thepromptfield. Framework-agnostic, ~15 minutes, no agent scaffolding.Why?
Agentic contexts are GA but had no tutorial; this is the canonical walkthrough the agent-framework retrofits link back to.
Reviewer guidance
publish()works for fresh names butunpublish()/delete()can never succeed for event logs via the SDK (raw endpoints verified working; same latent pattern across all five resource types). The docs' documented unpublish/delete lifecycle doesn't currently work in code; the tutorial routes tidy-up through Console.agentic-context-draft-publish.png) is committed but unreferenced — it shows a dev-org prefixed resource name; re-shoot on asession_context-named resource or drop it.getDomainSessionIdone-liner, and the details-page ⋮ menu contents (all need a live tracked browser session).🤖 Generated with Claude Code