klaridian()
How-to guidesPlugins

PostHog

See which tools agents actually use.

Enable it

npx klaridian generate --spec ./api.yaml --out ./my-server --plugin posthog

Every tool call sends a PostHog event with the tool name, how long it took, and whether it succeeded. This tells you which tools get used—OpenTelemetry tells you if a call is slow or broken, but not whether anyone's calling it.

Configure it

POSTHOG_API_KEY=phc_... \
POSTHOG_HOST=https://app.posthog.com \
node dist/src/index.js

Why this is a separate plugin from OTel

Tracing has one open standard—OpenTelemetry—so one otel plugin works with every backend. Product analytics doesn't have that: PostHog, Amplitude, and Mixpanel each need their own integration. posthog is the first; amplitude and mixpanel work the same way.

Code mode

With --architecture code-mode, the execute_code event also carries api_call_count and api_operations: how many API calls the script made and which operations they were. Arguments and response bodies aren't sent.

One plugin at a time

Today you can pick one plugin per server—otel, or one of the analytics plugins, not both together. Combining an engineering plugin and a product plugin on the same server is planned, not built yet.

On this page