Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(onboarding): add AI section to quick start checklist (#64728)

Rafael Audibert593e756fffec
diff --git a/frontend/src/generated/core/api.schemas.ts b/frontend/src/generated/core/api.schemas.ts
index acf17f7496ec..89ec967c71f4 100644
--- a/frontend/src/generated/core/api.schemas.ts
+++ b/frontend/src/generated/core/api.schemas.ts
@@ -464,6 +464,10 @@ export const BusinessModelEnumApi = {
* * `test_endpoint` - test_endpoint
* * `create_early_access_feature` - create_early_access_feature
* * `update_feature_stage` - update_feature_stage
+ * * `use_posthog_ai` - use_posthog_ai
+ * * `use_posthog_code` - use_posthog_code
+ * * `use_posthog_mcp` - use_posthog_mcp
+ * * `use_posthog_in_slack` - use_posthog_in_slack
*/
export type AvailableSetupTaskIdsEnumApi =
(typeof AvailableSetupTaskIdsEnumApi)[keyof typeof AvailableSetupTaskIdsEnumApi]
@@ -534,6 +538,10 @@ export const AvailableSetupTaskIdsEnumApi = {
TestEndpoint: 'test_endpoint',
CreateEarlyAccessFeature: 'create_early_access_feature',
UpdateFeatureStage: 'update_feature_stage',
+ UsePosthogAi: 'use_posthog_ai',
+ UsePosthogCode: 'use_posthog_code',
+ UsePosthogMcp: 'use_posthog_mcp',
+ UsePosthogInSlack: 'use_posthog_in_slack',
} as const
/**
diff --git a/frontend/src/lib/components/ProductSetup/ProductSetupPopover.tsx b/frontend/src/lib/components/ProductSetup/ProductSetupPopover.tsx
index 8003cd113750..dad2fc1b287f 100644
--- a/frontend/src/lib/components/ProductSetup/ProductSetupPopover.tsx
+++ b/frontend/src/lib/components/ProductSetup/ProductSetupPopover.tsx
@@ -3,13 +3,14 @@ import { useActions, useValues } from 'kea'
import { router } from 'kea-router'
import { useEffect, useMemo, useRef, useState } from 'react'
-import { IconCheck, IconExternal, IconLock, IconTarget } from '@posthog/icons'
+import { IconCheck, IconExternal, IconLock, IconSparkles, IconTarget } from '@posthog/icons'
import { LemonButton, LemonSelect, Link } from '@posthog/lemon-ui'
import { useHogfetti } from 'lib/components/Hogfetti/Hogfetti'
import { SetupTaskId } from 'lib/components/ProductSetup'
import { Popover } from 'lib/lemon-ui/Popover'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
+import { inStorybook, inStorybookTestRunner } from 'lib/utils/dom'
import { addProductIntent } from 'lib/utils/product-intents'
import { teamLogic } from 'scenes/teamLogic'
@@ -133,6 +134,10 @@ export function ProductSetupPopover({
const setupTasks = (tasksWithState as SetupTaskWithState[]).filter((t) => t.taskType === 'setup')
const onboardingTasks = (tasksWithState as SetupTaskWithState[]).filter((t) => t.taskType === 'onboarding')
const exploreTasks = (tasksWithState as SetupTaskWithState[]).filter((t) => t.taskType === 'explore')
+ const aiTasks = (tasksWithState as SetupTaskWithState[]).filter((t) => t.taskType === 'ai')
+
+ // Skip the rainbow animation in Storybook so visual-regression snapshots don't flake on the moving gradient.
+ const aiTitleClassName = `rainbow-text${inStorybook() || inStorybookTestRunner() ? '' : ' rainbow-text-animating'}`
const productName = config?.title.replace('Get started with ', '') || ''
@@ -290,6 +295,21 @@ export function ProductSetupPopover({
}
/>
)}
+
+ {aiTasks.length > 0 && (
+ <TaskSection
+ title="AI"
+ tasks={aiTasks}
+ onTaskClick={handleTaskClick}
+ onSkip={handleSkip}
+ onUnskip={handleUnskip}
+ onMarkComplete={handleMarkComplete}
+ onUnmarkComplete={handleUnmarkComplete}
+ onHover={handleTaskHover}
+ titleClassName={aiTitleClassName}
+ titleIcon={<IconSparkles className="size-3 shrink-0 text-warning" />}
+ />
+ )}
</>
)}
</div>
@@ -537,6 +557,8 @@ interface TaskSectionProps {
onUnmarkComplete?: (e: React.MouseEvent, taskId: SetupTaskId) => void
onHover?: (task: SetupTaskWithState | null, element?: HTMLElement) => void
actionButton?: React.ReactNode
+ titleClassName?: string
+ titleIcon?: React.ReactNode
}
function TaskSection({
@@ -549,13 +571,18 @@ function TaskSection({
onUnmarkComplete,
onHover,
actionButton,
+ titleClassName,
+ titleIcon,
}: TaskSectionProps): JSX.Element {
const completedCount = tasks.filter((t) => t.completed || t.skipped).length
return (
<div className="py-1" role="group" aria-label={`${title} (${completedCount} of ${tasks.length} complete)`}>
<div className="px-3 py-1 flex items-center justify-between">
- <span className="text-[10px] font-semibold text-muted uppercase tracking-wider">{title}</span>
+ <span className="inline-flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider">
+ {titleIcon}
+ <span className={titleClassName ?? 'text-muted'}>{title}</span>
+ </span>
{actionButton}
</div>
<div role="list">
diff --git a/frontend/src/lib/components/ProductSetup/productSetupRegistry.ts b/frontend/src/lib/components/ProductSetup/productSetupRegistry.ts
index 4639b0446e0c..5fd7d5f351a3 100644
--- a/frontend/src/lib/components/ProductSetup/productSetupRegistry.ts
+++ b/frontend/src/lib/components/ProductSetup/productSetupRegistry.ts
@@ -32,6 +32,49 @@ export const SET_UP_REVERSE_PROXY: SetupTask = {
getUrl: () => urls.settings('organization-proxy'),
}
+/**
+ * AI tasks - appended to the end of every product's setup flow.
+ * These surface PostHog's AI capabilities regardless of which product the user onboards with.
+ */
+export const AI_TASKS: SetupTask[] = [
+ {
+ id: SetupTaskId.UsePosthogAi,
+ title: 'Try PostHog AI',
+ description:
+ "Ask Max, PostHog's AI assistant, to build insights, write SQL, and answer questions about your data.",
+ taskType: 'ai',
+ requiresManualCompletion: true,
+ getUrl: () => urls.ai(),
+ },
+ {
+ id: SetupTaskId.UsePosthogCode,
+ title: 'Try PostHog Code',
+ description:
+ 'An AI devtool that understands your product, not just your codebase — it triages bugs and opens pull requests from your product data.',
+ taskType: 'ai',
+ requiresManualCompletion: true,
+ docsUrl: 'https://posthog.com/code',
+ },
+ {
+ id: SetupTaskId.UsePosthogMcp,
+ title: 'Try PostHog MCP',
+ description:
+ 'Query your PostHog data in plain English from your coding agent — run funnels, check errors, and toggle flags without leaving your editor.',
+ taskType: 'ai',
+ requiresManualCompletion: true,
+ docsUrl: 'https://posthog.com/mcp',
+ },
+ {
+ id: SetupTaskId.UsePosthogInSlack,
+ title: 'Try PostHog in Slack',
+ description:
+ 'Tag @PostHog in any Slack thread to ask data questions, run SQL, and draft pull requests — plus get insights and alerts delivered to your channels.',
+ taskType: 'ai',
+ requiresManualCompletion: true,
+ getUrl: () => urls.integration('slack'),
+ },
+]
+
// ============================================================================
// Product Setup Registry
// ============================================================================
@@ -120,6 +163,7 @@ export const PRODUCT_SETUP_REGISTRY: Partial<Record<ProductKey, ProductSetupConf
title: 'Track custom events',
description: 'Go beyond autocapture by tracking specific actions that matter.',
taskType: 'explore',
+ dependsOn: [SetupTaskId.IngestFirstEvent],
requiresManualCompletion: true,
docsUrl: 'https://posthog.com/tutorials/event-tracking-guide#setting-up-custom-events',
targetSelector: '[data-attr="help-button"]',
@@ -700,19 +744,22 @@ export function getProductSetupConfig(productKey: ProductKey): ProductSetupConfi
return PRODUCT_SETUP_REGISTRY[productKey] ?? null
}
-/** Get all tasks for a product, optionally filtered by type */
+/** Get all tasks for a product, optionally filtered by type. AI tasks are appended to every product. */
export function getTasksForProduct(
productKey: ProductKey,
- taskType?: 'setup' | 'onboarding' | 'explore' | 'all'
+ taskType?: 'setup' | 'onboarding' | 'explore' | 'ai' | 'all'
): SetupTask[] {
const config = getProductSetupConfig(productKey)
if (!config) {
return []
}
+
+ const tasks = [...config.tasks, ...AI_TASKS]
if (!taskType || taskType === 'all') {
- return config.tasks
+ return tasks
}
- return config.tasks.filter((t) => t.taskType === taskType)
+
+ return tasks.filter((t) => t.taskType === taskType)
}
/** List of products that have setup flows configured */
diff --git a/frontend/src/lib/components/ProductSetup/types.ts b/frontend/src/lib/components/ProductSetup/types.ts
index 7d11fb616a8c..f8f24f6847d5 100644
--- a/frontend/src/lib/components/ProductSetup/types.ts
+++ b/frontend/src/lib/components/ProductSetup/types.ts
@@ -13,8 +13,10 @@ export type SetupTaskId = AvailableSetupTaskIdsEnumApi
* Examples: Create first insight, watch first recording, create first survey
* - explore: Advanced/optional features to try after getting started
* Examples: Create funnel, set up cohorts, create multivariate flag
+ * - ai: PostHog's AI surfaces, shown for every product
+ * Examples: PostHog AI, PostHog Code, PostHog MCP, PostHog in Slack
*/
-export type TaskType = 'setup' | 'onboarding' | 'explore'
+export type TaskType = 'setup' | 'onboarding' | 'explore' | 'ai'
/** Definition of a single setup task */
export interface SetupTask {
@@ -34,6 +36,8 @@ export interface SetupTask {
* Task type:
* - 'setup': Mandatory configuration (install SDK, enable features)
* - 'onboarding': Getting started guidance (create first X, explore Y)
+ * - 'explore': Advanced/optional features to try after getting started
+ * - 'ai': PostHog's AI surfaces, shown for every product
* Defaults to 'onboarding' if not specified
*/
taskType?: TaskType
diff --git a/posthog/models/team/setup_tasks.py b/posthog/models/team/setup_tasks.py
index 9b3fef04335e..f4b53a6f4efc 100644
--- a/posthog/models/team/setup_tasks.py
+++ b/posthog/models/team/setup_tasks.py
@@ -96,3 +96,9 @@ class SetupTaskId(StrEnum):
# Early Access Features
CreateEarlyAccessFeature = "create_early_access_feature"
UpdateFeatureStage = "update_feature_stage"
+
+ # AI (shown for every product)
+ UsePostHogAi = "use_posthog_ai"
+ UsePostHogCode = "use_posthog_code"
+ UsePostHogMcp = "use_posthog_mcp"
+ UsePostHogInSlack = "use_posthog_in_slack"
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 7437503b1871..2d38b33061c7 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -9423,6 +9423,10 @@ export namespace Schemas {
* * `test_endpoint` - test_endpoint
* * `create_early_access_feature` - create_early_access_feature
* * `update_feature_stage` - update_feature_stage
+ * * `use_posthog_ai` - use_posthog_ai
+ * * `use_posthog_code` - use_posthog_code
+ * * `use_posthog_mcp` - use_posthog_mcp
+ * * `use_posthog_in_slack` - use_posthog_in_slack
*/
export type AvailableSetupTaskIdsEnum = typeof AvailableSetupTaskIdsEnum[keyof typeof AvailableSetupTaskIdsEnum];
@@ -9493,6 +9497,10 @@ export namespace Schemas {
TestEndpoint: 'test_endpoint',
CreateEarlyAccessFeature: 'create_early_access_feature',
UpdateFeatureStage: 'update_feature_stage',
+ UsePosthogAi: 'use_posthog_ai',
+ UsePosthogCode: 'use_posthog_code',
+ UsePosthogMcp: 'use_posthog_mcp',
+ UsePosthogInSlack: 'use_posthog_in_slack',
} as const;
export type AzureBlobDestinationConfigType = typeof AzureBlobDestinationConfigType[keyof typeof AzureBlobDestinationConfigType];