X-ray vision for your AI product

Know exactly what every LLM call costs, broken down by model, feature, and user. Trace latency and errors straight from your editor with the PostHog MCP, for any model.

Get started free

First 100k LLM events per month are free. Works with OpenAI, Anthropic, LangChain, and 40+ more.

X-ray vision for your AI product
Kilo Code

AI teams using PostHog AI Observability in production.
(Yes, we use it ourselves. Hedgehogs need observability, too.)

Wrap your LLM calls, get instant visibility

Drop-in SDK wrappers sit in front of your existing LLM calls. Your code barely changes. Inputs, outputs, tokens, cost, latency, model, and provider are captured automatically.

Install PostHog with one command

Paste this into your terminal and make AI do all the work.

Learn more
PostHog Wizard hedgehog

Or pick your model directly

Query AI traces from your editor

Install the PostHog MCP and your coding agent can query your LLM data directly — costs, errors, latency, traces — without switching to a browser.

  • "Why did my LLM costs spike 40% since last deploy?"
  • "Which model is the most expensive for the chat feature this week?"
  • "Are there any generation errors in the last 30 minutes?"
  • "Show me the 10 slowest traces from today."
  • "Compare token usage between GPT-4 and Claude on the search endpoint."
MCP docs

See cost, tokens, inputs and outputs

Each LLM call becomes a generation — a full record of what went in and what came out, with token counts, automatic cost calculation, and latency attached.

  • Full conversation context — the complete message array, roles and all
  • Token counts + automatic cost calculation per model
  • Response latency, model name, provider, and any tools called
  • Enrichable with user IDs, groups, and custom properties

Your AI dashboard, zero config

First generation in, dashboard on. Costs by model, active users, latency trends, error rates — all pre-built. Fully customizable when you need more.

AI Observability dashboard

Trace multi-step AI workflows end to end

Group related LLM calls into traces, nest operations into spans, and link traces into sessions. The full hierarchy for agentic workflows, RAG pipelines, and multi-turn conversations.

AI Observability traces

Working in Slack? Talk to the Hog.

PostHog watches your LLM metrics and pings your Slack channel when something's wrong — cost threshold crossed, error rate spiked, latency jumped. Then tag @PostHog to go from signal to fix without ever opening a dashboard.

Ask @PostHog about your AI product

  • "Why did generation costs jump 40% since last deploy?"
  • "Which users are hitting the most LLM errors today?"
  • "Is average LLM latency trending up or down this week?"
  • "Are error rates higher for Claude or GPT-4 on the search feature?"
PostHog Slack app showing AI observability alerts and answers

Tag @PostHog to ship the fix

Once you've found the problem, tag @PostHog to fix it. It reads your codebase, writes the change, and opens a draft PR — from the same Slack thread where you spotted the issue. No editor required.

Use for free

TL;DR 💸

  • No credit card required to start
  • First 100k LLM events/mo are free with 30-day retention
  • Above 100k: $0.00006/event with volume discounts
  • Set billing limits to avoid surprise charges
  • See pricing page for full details

Your LLMs are burning tokens and you're reading landing pages. Respect. Now go fix that.

PostHog hedgehog

Install the SDK, capture your first generation. Takes about five minutes.

Questions about this page? or post a community question.