rudder-ai-events-setup
RudderStack AI Events Setup
Takes an existing app with LLM features to the standard RudderStack AI events (spec v0.3): one ai_user_prompt_created and one ai_response_received per answer, ai_user_action for feedback, and mcp_* events for MCP servers, through the app's existing RudderStack client. SDKs, each for chat, background agents and MCP servers: @rudderstack/ai (Node.js 24+, or Deno via npm compatibility), rudderstack-ai (Python 3.12+) and github.com/rudderlabs/ai-sdk-go (public Go modules, one per provider integration; the Go floor is the go line of the chosen version's go.mod). Use 0.7.0 / v0.3.0 or later (the release with the migration check and recorders verify uses); resolve the latest in step 2.3 and never invent one. Other product events (non-AI features): rudder-code-first-instrumentation or rudder-design-first-instrumentation.
Workflow
| Step | What | Who |
|---|---|---|
| 1. Discover | Find every AI surface, read-only | this skill |
| 2. Plan | Write ai-events.md, ask once, then stop for approval |
this skill |
| 3. Instrument | Minimal code changes from the approved plan | rudder-ai-events-instrument |
| 4. Verify | Capture events locally, validate against the spec | rudder-ai-events-verify |
Resuming. If ai-events.md already exists at the repo root, read it, then before anything else: fetch and compare the branch with the default branch (git fetch, git log HEAD..origin/<default>) and, if it is behind, say so (the user decides whether to update it); re-resolve the latest SDK versions (step 2.3); re-check every entry under Dependencies and blockers. Correct the plan where any of these changed (an approved plan goes back to draft). Then status: approved goes to step 3; status: draft re-presents the plan (step 2.6).
Step 1: Discover (read-only)
Change nothing. Use Glob, Grep, Read and the read-only commands allowed above; do not run the app, install packages or read .env files. Patterns for every check: references/discovery.md.