PostHog for AI agents

Product analytics, feature flags, session replay, and experiments. Add an API key once and every agent you run can use it.

  • Connects with an API key
  • Ready to connect
  • Any MCP client
  • No card required

The route from an agent to PostHog

Once PostHog is set up in your workspace, any agent you run can reach it: a Spinrun agent, or Claude, ChatGPT and Cursor through one MCP endpoint. Every call passes through the Spinrun gateway, which sorts it by risk and writes it to the activity log.

By default, every change an agent makes in a connected app waits for your approval, on every plan. Enhanced Control adds per-app read, write and destructive rules at the gateway on Free and Pro.

PostHog in the catalog

Product analytics, feature flags, session replay, and experiments. · Analytics & Data

  1. An agent gets a jobFrom chat, a schedule, or your own AI client
  2. Spinrun checks the callSorted as a read, a write or a destructive call
  3. PostHog does the workThrough the connection you set up in your workspace
  4. Every call is loggedTool, outcome and duration, in one activity log

From Spinrun recipes

Jobs to hand an agent in PostHog

Each one is a real prompt from a Spinrun recipe or team page, ready to adapt to your own work.

  • “What changed in the funnel last week? Two sentences on the Growth page in Notion, backed by Analytics and PostHog.”

    Weekly funnel note

  • “Sprint planning on one Notion page: which items in the Linear backlog does PostHog's funnel from last week argue for?”

    Sprint planning page

  • “Did people stick with what we launched last Tuesday? Tell #product what Mixpanel and PostHog show for retention and adoption.”

    After-launch recap

Three steps

From connection to first call

  1. Connect an app once

    Sign in from your workspace with OAuth or an API key. Spinrun keeps the credential in an encrypted vault, never in an agent's config.

  2. Decide what it may do

    By default, every change an agent makes in a connected app waits for your approval, on every plan. Enhanced Control adds per-app rules for reads, writes and destructive calls on Free and Pro.

  3. Let any agent use it

    Claude, ChatGPT, Cursor or a Spinrun agent reach the app through one MCP endpoint, and every call is written to the same activity log.

What it can do

Every PostHog action, sorted by risk

Spinrun sorts every PostHog action into one of three tiers. By default, agents ask before a write; on Free and Pro, the rules you set decide which tiers run.

  • Writes

    Add dashboard collaborators with access level

    POSTHOG_ADD_DASHBOARD_COLLABORATORS_WITH_ACCESS_LEVEL

    Add collaborators to a specific project dashboard. requires 'project id' and 'dashboard id'. supports json, form-urlencoded, and multipart data. returns added collaborator details. auth: 'personalapikeyauth'.

  • Writes

    Add member to organization role

    POSTHOG_ADD_MEMBER_TO_ORGANIZATION_ROLE

    Add a member to an organization role by submitting their details and uuid in json/form, using organization and role ids. requires personalapikeyauth. success gives a 201 status.

  • Writes

    Add project specific member roles

    POSTHOG_ADD_PROJECT_SPECIFIC_MEMBER_ROLES

    Add members with specific roles to a project by providing their user uuid and level (member or admin). requires project id in the url. supports json, form-data, and form-urlencoded input. returns the newly created membership data upon success.

  • Writes

    Assign feature flag role based access

    POSTHOG_ASSIGN_FEATURE_FLAG_ROLE_BASED_ACCESS

    Set up role-based access for a feature flag using `project id` and `feature flag id`. submit access info in json or form format, with `feature flag:write` rights. success returns new details with a 201 code.

  • Writes

    Bookmark project activity notification

    POSTHOG_BOOKMARK_PROJECT_ACTIVITY_NOTIFICATION

    Create a bookmark for an activity notification in a project's activity log. requires a `project id` and json payload with activity details. supports verification status, impersonation flags, and system activity distinction.

  • Destructive

    Bulk create organization invites

    POSTHOG_BULK_CREATE_ORGANIZATION_INVITES

    Post /api/organizations/{organization id}/invites/bulk/: bulk-create organization invites with customizable levels, sender details, and validation checks. supports email automation and private project access settings.

  • Destructive

    Cancel insights for a project

    POSTHOG_CANCEL_INSIGHTS_FOR_A_PROJECT

    The "/api/projects/{project id}/insights/cancel/" endpoint allows users to cancel insights for a project by providing a project id and insight details in json or csv, and confirms cancellation in the response.

  • Reads

    Check pipeline destination updates

    POSTHOG_CHECK_PIPELINE_DESTINATION_UPDATES

    Get the newest updates and plugin info for a pipeline destination by organization and destination id via get request to /api/.../{id}/check for updates.

  • Reads

    Check pipeline import app updates

    POSTHOG_CHECK_PIPELINE_IMPORT_APP_UPDATES

    Retrieve the latest update information for a specific pipeline import app by its id within an organization. this endpoint returns details such as plugin type, name, description, and version data. requires 'id' and 'organization id' as path parameters.

Paired in recipes

Apps agents use with PostHog

These appear next to PostHog in Spinrun's templates, recipes and team pages.

Same category

Other Analytics & Data apps

Other apps in this category that your agents can use.

See every app in this category

Questions about PostHog

You paste an PostHog API key once. Spinrun keeps it in an encrypted vault rather than in an agent's config, and you can revoke it in one click.

Put PostHog to work. Start free.

Connect PostHog, decide what it may do, and give an agent its first job.

Before anything loads

We would like to switch on analytics, so we can see which pages are worth keeping. Nothing has loaded yet and nothing will until you choose. The cookies that keep you signed in and remember your language are not part of this.

Read the Cookie Policy