Posthog Openclaw banner
PostHog PostHog

Posthog Openclaw

Data community

Description

PostHog LLM Analytics plugin for OpenClaw

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

@posthog/openclaw

[![npm version](https://img.shields.io/npm/v/@posthog/openclaw)](https://www.npmjs.com/package/@posthog/openclaw) [![CI](https://github.com/PostHog/posthog-openclaw/actions/workflows/ci.yml/badge.svg)](https://github.com/PostHog/posthog-openclaw/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

PostHog LLM Analytics plugin for [OpenClaw](https://github.com/openclaw/openclaw). Captures LLM generations, tool executions, and conversation traces, sending them to PostHog as structured `$ai_*` events for the [LLM Analytics dashboard](https://posthog.com/docs/llm-analytics).

https://github.com/user-attachments/assets/bf7ce150-becb-4df9-b78d-5660d0a3e489

Install

openclaw plugins install @posthog/openclaw

Configuration

Add to your `openclaw.json` (or `openclaw.yaml`):

{
    "plugins": {
        "entries": {
            "posthog": {
                "enabled": true,
                "config": {
                    "apiKey": "phc_your_project_key",
                    "host": "https://us.i.posthog.com",
                    "privacyMode": false,
                    "traceGrouping": "message",
                    "sessionWindowMinutes": 60,
                },
            },
        },
    },
    "diagnostics": {
        "enabled": true,
    },
}

Options

Option Type Default Description
apiKey string (required*) Your PostHog project API key. Can also be provided via the POSTHOG_API_KEY environment variable