> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Wizard overview - Handbook Developers love the [wizard](/docs/ai-engineering/ai-wizard.md). It started as the fastest way to get a deep, correct PostHog integration, without the hallucinations that come from naive agent-based attempts. It's growing into something more like a forward deployed agent. Terminal ```bash npx -y @posthog/wizard@latest ``` ## Why a CLI Users run the wizard with one `npx` command. This is a big reason it's so portable. Running a command feels better than copying and pasting a prompt into an agent, which is annoying. It works in any terminal, in any project, with no setup. Because we own the harness, a run is unlikely to be affected by the user's local setup, their model preferences, or whatever else is polluting their agent's context. We can also track the success rate of real runs on the [wizard dashboard](https://us.posthog.com/project/2/dashboard/811546), and use it to improve the docs. ## What it does today - Integrates PostHog. It installs the SDK and adds events across many frameworks. See the [public docs](/docs/ai-engineering/ai-wizard.md). - Sets up more products, like error tracking, revenue analytics, LLM analytics, and data warehouse sources. - Audits an existing PostHog integration. - Migrates a codebase from another analytics tool. - Adds the PostHog MCP server to the user's editor. ## Roadmap Things we'd like to work on, in no particular order. For what we're doing this quarter, see the team's [objectives](/teams/wizard-and-docs.md#objectives). - **Iterative instrumentation.** Start small and prove value, then give users more when they want it. Useful on day 1, day 10, and day 100. - **Better handoff to the user's agent.** An opinionated first draft, with enough context for the user's agent to make it theirs. - **Better handoff to the PostHog app.** Data already flowing when you open PostHog, plus suggested next steps: instrument more, improve data, build dashboards. - **Tracking new features.** Instrument a newly shipped feature properly. - **Act as a forward deployed agent.** Help audit, debug, and migrate a customer's setup. - **Performance.** Every run gets faster and cheaper. ## Who owns what The wizard has a shared ownership model. The [![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team](/teams/wizard-and-docs.md) owns the wizard as a harness, and makes it better for everyone. Product teams own the programs for their part of the product. | Part | Owner | Folder in the wizard | | --- | --- | --- | | Wizard core: agent, harness, TUI, and CLI | [![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team](/teams/wizard-and-docs.md) | `agent`, `tui`, `cli` | | TUI + npx wizard | [![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team](/teams/wizard-and-docs.md) | `posthog-integration` | | Headless CLI wizard | [![Growth mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_growth_0d54a1d11e?_a=AXAH4nI0)Growth Team![Growth mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_growth_0d54a1d11e?_a=AXAH4nI0)Growth Team](/teams/growth.md) | `headless` | | Cloud in-app wizard | [![Growth mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_growth_0d54a1d11e?_a=AXAH4nI0)Growth Team![Growth mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_growth_0d54a1d11e?_a=AXAH4nI0)Growth Team](/teams/growth.md) | `headless` | | Main integration | [![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team](/teams/wizard-and-docs.md) | `posthog-integration` | | Migration | [![Forward Deployed Engineering mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/foward_deployed_1b92fe69a0?_a=AXAH4nI0)Forward Deployed Engineering Team![Forward Deployed Engineering mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/foward_deployed_1b92fe69a0?_a=AXAH4nI0)Forward Deployed Engineering Team](/teams/forward-deployed-engineering.md) | `migration` | | Audit | [![Forward Deployed Engineering mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/foward_deployed_1b92fe69a0?_a=AXAH4nI0)Forward Deployed Engineering Team![Forward Deployed Engineering mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/foward_deployed_1b92fe69a0?_a=AXAH4nI0)Forward Deployed Engineering Team](/teams/forward-deployed-engineering.md) | `audit` | | Error tracking | [![Error Tracking mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/error_55b531aa4b?_a=AXAH4nI0)Error Tracking Team![Error Tracking mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/error_55b531aa4b?_a=AXAH4nI0)Error Tracking Team](/teams/error-tracking.md) | `error-tracking`, `error-tracking-upload-source-maps` | | Revenue analytics | [![Web Analytics mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_web_analytics_cbed0f5aae?_a=AXAH4nI0)Web Analytics Team![Web Analytics mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_web_analytics_cbed0f5aae?_a=AXAH4nI0)Web Analytics Team](/teams/web-analytics.md) | `revenue-analytics` | | Web analytics doctor | [![Web Analytics mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_web_analytics_cbed0f5aae?_a=AXAH4nI0)Web Analytics Team![Web Analytics mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_web_analytics_cbed0f5aae?_a=AXAH4nI0)Web Analytics Team](/teams/web-analytics.md) | `web-analytics-doctor` | | Warehouse sources | [![Warehouse Sources mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/warehouse_sources_mini_ae633bea69?_a=AXAH4nI0)Warehouse Sources Team![Warehouse Sources mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/warehouse_sources_mini_ae633bea69?_a=AXAH4nI0)Warehouse Sources Team](/teams/warehouse-sources.md) | `warehouse-source` | | Self-driving | [![Self-Driving mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/527750916_d78b457b_a86d_4d72_8820_6874a34b93fa_55a582e109?_a=AXAH4nI0)Self-Driving Team![Self-Driving mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/527750916_d78b457b_a86d_4d72_8820_6874a34b93fa_55a582e109?_a=AXAH4nI0)Self-Driving Team](/teams/self-driving.md) | `self-driving` | | MCP analytics | [![MCP Analytics mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/mcp_analytics_mini_fb1706184a?_a=AXAH4nI0)MCP Analytics Team![MCP Analytics mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/mcp_analytics_mini_fb1706184a?_a=AXAH4nI0)MCP Analytics Team](/teams/mcp-analytics.md) | `mcp-analytics` | | Metrics | [![APM mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/logs_47afcc8a6e?_a=AXAH4nI0)APM Team![APM mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/logs_47afcc8a6e?_a=AXAH4nI0)APM Team](/teams/apm.md) | `metrics` | | Replay vision | [![Replay mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_replay_45c37f5e80?_a=AXAH4nI0)Replay Team![Replay mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/crest_mini_replay_45c37f5e80?_a=AXAH4nI0)Replay Team](/teams/replay.md) | `replay-vision` | | AI observability | [![AI Observability mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/llm_mini_0a2ea453e5?_a=AXAH4nI0)AI Observability Team![AI Observability mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/llm_mini_0a2ea453e5?_a=AXAH4nI0)AI Observability Team](/teams/ai-observability.md) | `ai-observability` | | Run any skill with `wizard skill` | [![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team](/teams/wizard-and-docs.md) | `agent-skill` | | Feature flags, for now | [![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team](/teams/wizard-and-docs.md) | `feature-flags` | %%{init: {"block": {"padding": 16}}}%% block-beta columns 4 surfBand\["Wizard surfaces · owner per surface"\]:4 tui\["TUI wizard
team-wizard-docs"\] headless\["Headless CLI wizard
team-growth"\] cloud\["Cloud in-app wizard
team-growth"\] mcpw\["MCP wizard
team-context-mcp · coming soon"\] progBand\["Wizard programs · owner per program"\]:4 integ\["PostHog integration
team-wizard-docs"\] audit\["Audit
team-fde"\] eaudit\["Events audit
team-fde"\] askill\["Agent skill
team-wizard-docs"\] et\["Error tracking
team-error-tracking"\] sm\["Source maps upload
team-error-tracking"\] ff\["Feature flags
team-wizard-docs · for now"\] mig\["Migration
team-fde"\] aio\["AI observability
team-ai-observability"\] mcpa\["MCP analytics
mcp-analytics"\] met\["Metrics
team-apm"\] rv\["Replay vision
team-replay"\] rev\["Revenue analytics
team-web-analytics"\] wad\["Web analytics doctor
team-web-analytics"\] sd\["Self-driving
team-self-driving"\] wh\["Warehouse source
team-warehouse-sources"\] platBand\["Wizard platform · owner team-wizard-docs"\]:4 agent\["agent"\] tuip\["TUI"\] cli\["CLI"\] svc\["services"\] classDef wd fill:#3b82f626,stroke:#3b82f6,stroke-width:2px classDef pt fill:#22c55e26,stroke:#22c55e,stroke-width:2px classDef soon fill:none,stroke:#9ca3af,stroke-dasharray:4 3 classDef band fill:#9ca3af40,stroke:none class tui,integ,askill,ff,agent,tuip,cli,svc wd class headless,cloud,audit,eaudit,et,sm,mig,aio,mcpa,met,rv,rev,wad,sd,wh pt class mcpw soon class surfBand,progBand,platBand band Blue is the [![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team](/teams/wizard-and-docs.md), green is another team, and dashed is coming soon. Surfaces run programs, and programs run on the platform. New top-level command names need sign-off from the [![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team![Wizard & Docs mini crest](https://res.cloudinary.com/dmukukwp6/image/upload/f_png,h_20,w_20,c_fill,g_auto,q_auto/docs_and_wizards_c5bcdfd8d7?_a=AXAH4nI0)Wizard & Docs Team](/teams/wizard-and-docs.md), because a public command is hard to remove. Programs live in [`src/programs/`](https://github.com/PostHog/wizard/tree/main/src/programs). [`CODEOWNERS`](https://github.com/PostHog/wizard/blob/main/.github/CODEOWNERS) requests reviews from the owner. For who owns each skill, see the [context mill](/handbook/wizard-and-docs/context-mill.md#who-owns-which-skill). Ask questions in [#team-wizard-and-docs](https://posthog.slack.com/archives/C09GTQY5RLZ). ## Go deeper - [Architecture](/handbook/wizard-and-docs/wizard-architecture.md) - [Context mill](/handbook/wizard-and-docs/context-mill.md) - [Developing the wizard](/handbook/wizard-and-docs/developing-the-wizard.md) - [Extending the wizard](/handbook/wizard-and-docs/extending-the-wizard.md) - [Releasing the wizard](/handbook/wizard-and-docs/wizard-releases.md) - [Handling wizard incidents](/handbook/wizard-and-docs/wizard-incidents.md) ### Was this page useful? HelpfulCould be better