Ask questions about PostHog
A managed agent for read-only PostHog analytics through OAuth.
- chat
- posthog-answerer
- posthog-analytics
posthog-answerer-pool
- posthog-answerer-model
posthog
What this template gives you
Interface
A chat window, in your browser
Use the included interface to send a request to this template.
Gateway
posthog-analytics gateway
This template sends its requests through posthog-analytics gateway, where its access rules and limits apply.
Model
posthog-answerer-model
This template uses posthog-answerer-model through the posthog-answerer-pool pool.
Usage
Hand this template to an AI agent to set up this template
Node.js and npm to run npx.
Dome CLI, installed with brew install dome-systems/tap/dome, then signed in with dome auth login.
Docker Compose to run the companion app locally.
- 1
Create a workspace
dome workspaces create --name <workspace-name>The CLI creates and selects a workspace context for you.
- 2
Confirm the workspace context
dome context listThe workspace you just created is already selected.
- 3
Pull the template
npx @domesystems/templates pull dome-systems/ai-agent-for-posthog@0.1.0 --dir ai-agent-for-posthogDownloads this immutable release and verifies its digest.
- 4
Run the template
npx @domesystems/templates up --dir ai-agent-for-posthogImports it into Dome and starts the companion app.
Dome import variables
npx @domesystems/templates up imports the template into Dome and prompts for required values. For unattended runs, set them as DOME_IMPORT_VAR_… environment variables.
Required values
DOME_IMPORT_VAR_anthropic_api_key
Setup guide
Follow this template's setup guidance for agent variables and upstream connections.
# Configure PostHog
PostHog's hosted MCP server supports OAuth. This template uses the upstream
`readonly=true` option, which removes write MCP tools from the session.
- `anthropic_api_key`: enter the Anthropic key used by this agent's model.
- After import, complete shared OAuth as a dedicated test member and select the
intended organization and project. Verify a known test insight or event is
visible and another project is unavailable.
PostHog's MCP exposes a generic `exec` tool, so tool-name filtering alone is
not a complete read-only boundary. Keep the upstream read-only setting, and pin
the connection to one project when production use requires a fixed boundary.
For a headless connection, use a separate personal API key with PostHog's MCP
Server preset instead of modifying this OAuth template.Runtime environment
These variables are required to run the agent. During pull, .env.example is copied to .env when available. If they’re missing, npx @domesystems/templates up retrieves them from Dome and saves them in .env. Pass --provision to refresh them.
No .env.example is included in this release.Agent instructions
Use PostHog only for analytical, read-only questions. Never create, change, or
delete feature flags, experiments, dashboards, data, people, surveys, or any
other PostHog resource. If a request could change state, refuse it and provide
the read-only analysis or a proposed action instead.