Use PostHog with AI
AIPE reads pages and posts in PostHog, drafts content and maintains it. Connect PostHog Cloud (EU/US) or self-hosted with a personal API key. Agents run SQL (HogQL) over events and persons, read insights, dashboards, flags, experiments, surveys and recordings, and prepare feature-flag and annotation changes that run after your approval.
What AIPE gets done with it
- Search pages and posts
- Draft and revise copy
- Publish content
Try it now
The prompt carries over into your workspace after sign-in.
- Which pages in PostHog have not been updated for a long time?
- Draft a post in PostHog about our new product.
23 actions in AIPE
Names from the AIPE connector registry.
Explore API
List PostHog API bases, actions, docs and connected account.
Read any endpoint
Call any read-only PostHog API endpoint with pagination.
Change data (with approval)
Create, update or delete anything in PostHog after your approval.
List projects
Projects of the organization with id, name and timezone.
Run HogQL (SQL) query
Run SQL over PostHog data (events, persons, sessions, groups, data warehouse tables). Example hogql_query: {"kind":"HogQLQuery","query":"SELECT event, count() AS c FROM events WHERE timestamp > now() - INTERVAL 7 DAY GROUP BY event ORDER BY c DESC LIMIT 20"}. Returns columns and results rows.
List insights
List insights (paginated).
Read insight
Insight definition and computed result.
List dashboards
List dashboards (paginated).
Read dashboard
Read dashboard.
List feature flags
List feature flags (paginated).
Read feature flag
Read feature flag.
List persons
Persons with properties (paginated). For aggregates prefer posthog_runQuery.
Read person
Read person.
List event definitions
Tracked event names with volume and last seen (paginated).
List property definitions
List property definitions (paginated).
List cohorts
List cohorts (paginated).
List experiments
List experiments (paginated).
List surveys
List surveys (paginated).
List annotations
List annotations (paginated).
List session recordings
Session recordings with duration, start URL and person (paginated).
Create feature flag
Create a feature flag; filters.groups set rollout percentage and targeting. Requires approval.
Update feature flag
Change rollout, targeting, on/off state or delete a flag. Read it first to keep existing filters. Requires approval.
Create annotation
Mark a release, campaign or incident on all charts. Requires approval.
Frequently asked questions about PostHog and AIPE
What can AIPE do with PostHog?
AIPE reads pages and posts in PostHog, drafts content and maintains it. 23 actions are available, for example Explore API, Read any endpoint, Change data (with approval).
How do I connect PostHog to AIPE?
Under Connectors, pick PostHog and add an API key from PostHog. The key is stored encrypted and can be removed at any time.
Is PostHog data used to train AI models?
No. Under the data processing agreement (DPA), customer data is not used for training. Primary hosting is at Hetzner Online GmbH in Falkenstein, Germany; which model providers are involved depends on the selected model and is listed in the DPA.
Can agents and routines use PostHog?
Yes. Your own agents and scheduled routines in AIPE can use the PostHog actions, for example for recurring reports or tasks.


