Manage Feature Flags with PostHog AI

PostHog AI creates and manages Feature Flags using natural language. Describe the flag you want – including rollout percentage, targeting rules, and variants – and PostHog AI sets it up for you.

How it works

When you ask PostHog AI to create a flag, it creates it with your specified key and rollout percentage, configures targeting rules based on user properties, cohorts, or groups, and sets up variants and payloads for multivariate flags. It can also search your existing flags, identify stale flags not modified recently, and help you plan flag cleanup.

Manage existing flags

PostHog AI also helps you manage existing flags:

  • Find stale flags – Ask "which flags not evaluated in 90 days?" to identify flags you should remove
  • Audit flag usage – Ask "how many users are seeing the new-checkout flag?" to check rollout status
  • Generate cleanup prompts – PostHog AI can generate code search prompts for removing flag references from your codebase
  • Modify existing flags – "Roll out dark-mode to 50%" or "add the enterprise cohort to the beta-features flag"

Try it

Select a prompt to try it out in the PostHog app:

Tips for better results

  • Include the flag key – "Create a flag called new-checkout-flow" saves a step compared to letting PostHog AI generate a name
  • Describe targeting rules – "only for users on the pro plan in the US" translates directly into property filters
  • Specify rollout strategy – "10% rollout" or "only for the beta-testers cohort" tells PostHog AI exactly how to configure the release
  • Ask about cleanup – "Which flags not evaluated in 90 days?" helps you find flags to remove

Get started

To start managing flags with PostHog AI, set up PostHog AI.

Community questions

Was this page useful?

Questions about this page? or post a community question.