Skip to main content
Through your connected account, an agent can query your PostHog data with HogQL, read trends, funnels, insights, dashboards, persons, feature flags, session recordings, experiments, surveys and error-tracking issues, and create new insights, dashboards, annotations and feature flags. It cannot change members, project settings or API keys, delete, archive or edit people and saved insights, dashboards, cohorts or flags, set up exports or destinations, or roll out flags, experiments or surveys.

What it does

When PostHog is enabled on an agent, the agent can perform PostHog actions as part of its reasoning. You ask a question or give it a task, and the agent decides when and how to use your PostHog account on your behalf.

Prerequisites

You must have an active PostHog connection in your workspace before enabling this tool. If no active connection exists, the toggle is disabled.
  1. Go to Integrations for your workspace.
  2. Find PostHog in the integrations grid.
  3. Click Connect and enter your API key.
  4. Return to your agent and enable the tool.

Adding the tool to an agent

  1. Open an agent in the editor.
  2. Click the button with the tooltip Add MCP Tool or Sub Agent.
  3. In MCP Tools, click PostHog. The PostHog node appears on the canvas.
  4. Click the node to open the Settings panel on the right.
  5. In the Authentication field, select the connected PostHog account the agent should use.
  6. If no active connection is found, the settings panel shows a warning with a link to Integrations to connect first.

Use cases

  • Weekly product metrics digest
  • Investigate a user
  • Review feature flags and experiments

Notes

  • The agent uses your connected PostHog account to perform actions.
  • This tool counts as 1 credit per action the agent performs.
See also: Integrations, Creating and Configuring