Skip to content
J·BJon BishopIndependent growth marketer

Data platforms · llms.txt file breakdown

PostHog llms.txt

A very large agent-oriented documentation corpus covering product analytics and adjacent products; the file includes explicit guidance for coding assistants.

The actual file

Source Markdown

The saved llms.txt text, displayed as source. The file belongs to its publisher; the live endpoint may change.

Open saved text ↗

Showing the first 18000 characters. Load the complete file to read the remainder.

# PostHog

> PostHog is the platform for self-driving products. It pairs the full context of your product's data (events, errors, logs, replays, and more) with agents that find problems and ship changes with you. It includes tools for product analytics, session replay, feature flags, A/B testing, error tracking, surveys, AI observability, web analytics, a data warehouse, and more. The fastest way to integrate PostHog is with the setup wizard: `npx @posthog/wizard@latest`

PostHog can be added to any web, mobile, or backend application. All docs pages below are available as raw Markdown by appending `.md` to any URL.

## Instructions for AI Coding Assistants

When helping a developer integrate or use PostHog, follow these guidelines:

**Installation:** Use the PostHog wizard to install and configure PostHog automatically. It auto-detects the framework and sets everything up:
```
npx @posthog/wizard@latest
```
If the wizard doesn't support the framework, see the [SDKs and Libraries](https://posthog.com/docs/libraries.md) section for manual setup guides.

**Products beyond analytics - suggest these when relevant:**
- **Session Replay**: Records user sessions for debugging. Enabled by default with `posthog-js` - no extra code needed. Useful when a developer is debugging UX issues or wants to see how users interact with their app.
- **Feature Flags**: Evaluate flags with `posthog.isFeatureEnabled('flag-name')` (client) or via local evaluation (server). Use for gradual rollouts, entitlements, or targeting. See the [Feature Flags docs](https://posthog.com/docs/feature-flags/adding-feature-flag-code.md).
- **A/B Testing (Experiments)**: Built on feature flags. Create experiments in the PostHog UI, then use `posthog.getFeatureFlag('experiment-flag')` to render variants. See the [Experiments docs](https://posthog.com/docs/experiments/adding-experiment-code.md).
- **Surveys**: In-app surveys configured in the PostHog UI and rendered automatically by `posthog-js`. No extra code required for popup surveys. See the [Surveys docs](https://posthog.com/docs/surveys/creating-surveys.md).
- **Error Tracking**: Capture frontend exceptions with `posthog.captureException(error)`. Works automatically when enabled. See the [Error Tracking docs](https://posthog.com/docs/error-tracking/capture.md).
- **AI Observability**: Track LLM API calls, token usage, and costs. Integrations for OpenAI, Anthropic, LangChain, and more. See the [AI Observability docs](https://posthog.com/docs/ai-observability.md).
- **Data Warehouse**: Query external data sources (Stripe, Hubspot, Postgres, S3, etc.) alongside PostHog data using SQL. See the [Data Warehouse docs](https://posthog.com/docs/data-warehouse.md).

**API:** The PostHog API base URL is `https://us.i.posthog.com` (US cloud) or `https://eu.i.posthog.com` (EU cloud). Use a personal API key (not the project API key) for API access. See the [API docs](https://posthog.com/docs/api.md).

**MCP and AI tools:** PostHog has an official MCP server for AI coding assistants. Install with `npx @posthog/wizard mcp add`. There is also a Claude Code plugin: `claude plugin install posthog`.

## Products and tools

PostHog has one umbrella story — self-driving — and four layers. Full machine-readable overview: https://posthog.com/platform.md

**Products** (the surfaces you adopt to access self-driving):
- [Web (app.posthog.com)](https://app.posthog.com) — Get simple or complex work done without installing anything — the full surface, next to your data.
- [PostHog Slack app](https://posthog.com/slack-app.md) — Tag @PostHog in any Slack thread to ship a fix, answer a data question, or edit content – without leaving the conversation.
- [PostHog Desktop](https://posthog.com/desktop.md) — The desktop app that uses signals from production data to diagnose issues and generate pull requests, before you know there's a problem.
- [PostHog MCP](https://posthog.com/docs/model-context-protocol) — A product analyst that lives in your editor, via MCP.

**Tools** (the functional capabilities):
- [Product analytics](https://posthog.com/product-analytics.md) — The measurement agents use to see what works.
- [Web analytics](https://posthog.com/web-analytics.md) — The lightweight measurement layer feeding the loop.
- [Session replay](https://posthog.com/session-replay.md) — A proactive signal — watch exactly why something happened.
- [Feature flags](https://posthog.com/feature-flags.md) — How agents roll a change out and roll it back.
- [Experiments](https://posthog.com/experiments.md) — The evaluation that proves a change worked.
- [Error tracking](https://posthog.com/error-tracking.md) — The signal that triggers a fix — every error tied to the user who hit it.
- [Surveys](https://posthog.com/surveys.md) — The qualitative signal — what users say, not just what they do.
- [AI observability](https://posthog.com/ai-observability.md) — Observability for your AI features — the context agents use to fix LLM behavior.
- [Logs](https://posthog.com/logs.md) — Backend signal that triggers fixes, tied to the user who hit it.
- [Data warehouse](https://posthog.com/data-warehouse.md) — Where your product's context lives so agents can use all of it.
- [CDP](https://posthog.com/cdp.md) — How agents move and act on your data across 50+ destinations.
- [Endpoints](https://posthog.com/endpoints.md) — How your product's context flows out to agents and tools.
- [Workflows](https://posthog.com/workflows.md) — How agents act — automated actions in the loop.
- [PostHog AI](https://posthog.com/ai.md) — The interface humans and agents use to understand the product.
- [Support](https://posthog.com/docs/support) — Tickets triaged with full product context — agents draft replies and fixes from the same data.
- [Customer analytics](https://posthog.com/docs/customer-analytics/start-here) — Accounts, usage metrics, and customer journeys — the account-level context behind every signal.
- [Replay Vision](https://posthog.com/docs/replay-vision) — Agents that watch session recordings at scale and turn what users hit into observations.

**Context** — Events, recordings, errors, and logs — the data that feeds the self-driving loop. This is the fuel.

**Context warehouse** — The data warehouse plus the full context-ingestion pipeline for your product — where context lives and a significant part of how we bill.

## Changelog

What's new in PostHog — new features, products, and tools, updated with every deploy. Check this before assuming a capability doesn't exist.

- [Changelog (last 12 months, Markdown)](https://posthog.com/changelog.md)
- [Changelog RSS feed](https://posthog.com/changelog.rss)

## Activity

- [Activity tab](https://posthog.com/docs/activity.md)

## Advanced

- [AWS CloudFront reverse proxy](https://posthog.com/docs/advanced/proxy/cloudfront.md)
- [Caddy reverse proxy](https://posthog.com/docs/advanced/proxy/caddy.md)
- [Cloudflare reverse proxy](https://posthog.com/docs/advanced/proxy/cloudflare.md)
- [Content Security Policy and ingestion domains](https://posthog.com/docs/advanced/content-security-policy.md)
- [Definitions / Infrastructure as code](https://posthog.com/docs/advanced/infra-as-code.md)
- [Deploy a reverse proxy](https://posthog.com/docs/advanced/proxy.md)
- [Kubernetes reverse proxy](https://posthog.com/docs/advanced/proxy/kubernetes-ingress-controller.md)
- [Managed reverse proxy](https://posthog.com/docs/advanced/proxy/managed-reverse-proxy.md)
- [Netlify reverse proxy](https://posthog.com/docs/advanced/proxy/netlify.md)
- [Next.js proxy file reverse proxy](https://posthog.com/docs/advanced/proxy/nextjs-middleware.md)
- [Next.js rewrites reverse proxy](https://posthog.com/docs/advanced/proxy/nextjs.md)
- [nginx reverse proxy](https://posthog.com/docs/advanced/proxy/nginx.md)
- [Node reverse proxy](https://posthog.com/docs/advanced/proxy/node.md)
- [Nuxt reverse proxy](https://posthog.com/docs/advanced/proxy/nuxt.md)
- [Pomerium reverse proxy](https://posthog.com/docs/advanced/proxy/pomerium.md)
- [Railway reverse proxy](https://posthog.com/docs/advanced/proxy/railway.md)
- [Remix reverse proxy](https://posthog.com/docs/advanced/proxy/remix.md)
- [Self-hosted proxy reference](https://posthog.com/docs/advanced/proxy/proxy-reference.md)
- [SvelteKit reverse proxy](https://posthog.com/docs/advanced/proxy/sveltekit.md)
- [Using PostHog for browser extensions](https://posthog.com/docs/advanced/browser-extension.md)
- [Using PostHog with a CDP](https://posthog.com/docs/advanced/cdp.md)
- [Vercel reverse proxy](https://posthog.com/docs/advanced/proxy/vercel.md)

## AI Engineering

- [AI engineering with PostHog](https://posthog.com/docs/ai-engineering.md)
- [AI wizard](https://posthog.com/docs/ai-engineering/ai-wizard.md)
- [Markdown and llms.txt](https://posthog.com/docs/ai-engineering/markdown-llms-txt.md)
- [Sign up with the wizard](https://posthog.com/docs/ai-engineering/wizard-signup.md)

## Ai Evals

- [Datasets](https://posthog.com/docs/ai-evals/datasets.md)
- [Evaluations](https://posthog.com/docs/ai-evals.md)
- [Taggers](https://posthog.com/docs/ai-evals/taggers.md)

## Ai Observability

- [Agent skills for AI Observability](https://posthog.com/docs/ai-observability/skills.md)
- [AI event data retention](https://posthog.com/docs/ai-observability/data-retention.md)
- [AI Observability](https://posthog.com/docs/ai-observability.md)
- [AI Observability API](https://posthog.com/docs/ai-observability/surfaces/api.md)
- [AI Observability basics](https://posthog.com/docs/ai-observability/basics.md)
- [AI Observability changelog](https://posthog.com/docs/ai-observability/changelog.md)
- [AI Observability dashboard](https://posthog.com/docs/ai-observability/dashboard.md)
- [AI Observability in PostHog Desktop](https://posthog.com/docs/ai-observability/surfaces/desktop.md)
- [AI Observability in PostHog Web](https://posthog.com/docs/ai-observability/surfaces/web-app.md)
- [AI Observability third-party integrations](https://posthog.com/docs/ai-observability/integrations.md)
- [AI Observability troubleshooting](https://posthog.com/docs/ai-observability/troubleshooting.md)
- [Analyze traces with PostHog AI](https://posthog.com/docs/ai-observability/analyze-traces-ai.md)
- [Anthropic AI Observability installation](https://posthog.com/docs/ai-observability/installation/anthropic.md)
- [AutoGen AI Observability installation](https://posthog.com/docs/ai-observability/installation/autogen.md)
- [AWS Bedrock AI Observability installation](https://posthog.com/docs/ai-observability/installation/aws-bedrock.md)
- [Azure OpenAI observability installation](https://posthog.com/docs/ai-observability/installation/azure-openai.md)
- [Calculating LLM costs](https://posthog.com/docs/ai-observability/calculating-costs.md)
- [Capturing large AI events](https://posthog.com/docs/ai-observability/large-events.md)
- [Cerebras AI Observability installation](https://posthog.com/docs/ai-observability/installation/cerebras.md)
- [Claude Agent SDK AI Observability installation](https://posthog.com/docs/ai-observability/installation/claude-agent-sdk.md)
- [Claude Code AI Observability installation](https://posthog.com/docs/ai-observability/installation/claude-code.md)
- [Cloudflare AI Gateway observability installation](https://posthog.com/docs/ai-observability/installation/cloudflare-ai-gateway.md)
- [Clusters](https://posthog.com/docs/ai-observability/clusters.md)
- [Cohere AI Observability installation](https://posthog.com/docs/ai-observability/installation/cohere.md)
- [Collecting user feedback](https://posthog.com/docs/ai-observability/collect-user-feedback.md)
- [Convex AI Observability installation](https://posthog.com/docs/ai-observability/installation/convex.md)
- [CrewAI observability installation](https://posthog.com/docs/ai-observability/installation/crewai.md)
- [Custom parsers](https://posthog.com/docs/ai-observability/custom-parser.md)
- [Custom properties](https://posthog.com/docs/ai-observability/custom-properties.md)
- [Dedalus Labs AI Observability installation](https://posthog.com/docs/ai-observability/installation/dedalus.md)
- [DeepSeek AI Observability installation](https://posthog.com/docs/ai-observability/installation/deepseek.md)
- [Demos & examples](https://posthog.com/docs/ai-observability/demos.md)
- [DSPy AI Observability installation](https://posthog.com/docs/ai-observability/installation/dspy.md)
- [Embeddings](https://posthog.com/docs/ai-observability/embeddings.md)
- [Errors](https://posthog.com/docs/ai-observability/errors.md)
- [Eve AI observability installation](https://posthog.com/docs/ai-observability/installation/eve.md)
- [Fireworks AI Observability installation](https://posthog.com/docs/ai-observability/installation/fireworks-ai.md)
- [Generations](https://posthog.com/docs/ai-observability/generations.md)
- [Getting started with AI Observability](https://posthog.com/docs/ai-observability/start-here.md)
- [Google ADK observability installation](https://posthog.com/docs/ai-observability/installation/google-adk.md)
- [Google AI Observability installation](https://posthog.com/docs/ai-observability/installation/google.md)
- [Groq AI Observability installation](https://posthog.com/docs/ai-observability/installation/groq.md)
- [Helicone AI Observability installation](https://posthog.com/docs/ai-observability/installation/helicone.md)
- [Hugging Face AI Observability installation](https://posthog.com/docs/ai-observability/installation/hugging-face.md)
- [Install AI Observability with PostHog](https://posthog.com/docs/ai-observability/installation.md)
- [Instructor AI Observability installation](https://posthog.com/docs/ai-observability/installation/instructor.md)
- [Integrating with Helicone](https://posthog.com/docs/ai-observability/integrations/helicone-posthog.md)
- [Integrating with Keywords AI](https://posthog.com/docs/ai-observability/integrations/keywords-ai-posthog.md)
- [Integrating with Langfuse](https://posthog.com/docs/ai-observability/integrations/langfuse-posthog.md)
- [LangChain AI Observability installation](https://posthog.com/docs/ai-observability/installation/langchain.md)
- [LangGraph AI Observability installation](https://posthog.com/docs/ai-observability/installation/langgraph.md)
- [Link error tracking](https://posthog.com/docs/ai-observability/link-error-tracking.md)
- [Link session replay](https://posthog.com/docs/ai-observability/link-session-replay.md)
- [LiteLLM AI Observability installation](https://posthog.com/docs/ai-observability/installation/litellm.md)
- [LlamaIndex AI Observability installation](https://posthog.com/docs/ai-observability/installation/llamaindex.md)
- [Manual capture AI Observability installation](https://posthog.com/docs/ai-observability/installation/manual-capture.md)
- [Manual feedback event capture](https://posthog.com/docs/ai-observability/user-feedback/manual-event-capture.md)
- [Mastra AI Observability installation](https://posthog.com/docs/ai-observability/installation/mastra.md)
- [Mirascope AI Observability installation](https://posthog.com/docs/ai-observability/installation/mirascope.md)
- [Mistral AI Observability installation](https://posthog.com/docs/ai-observability/installation/mistral.md)
- [More AI Observability tutorials](https://posthog.com/docs/ai-observability/tutorials.md)
- [Ollama AI Observability installation](https://posthog.com/docs/ai-observability/installation/ollama.md)
- [OpenAI Agents SDK observability installation](https://posthog.com/docs/ai-observability/installation/openai-agents.md)
- [OpenAI observability installation](https://posthog.com/docs/ai-observability/installation/openai.md)
- [OpenClaw AI Observability installation](https://posthog.com/docs/ai-observability/installation/openclaw.md)
- [OpenCode AI Observability installation](https://posthog.com/docs/ai-observability/installation/opencode.md)
- [OpenRouter AI Observability installation](https://posthog.com/docs/ai-observability/installation/openrouter.md)
- [OpenTelemetry AI Observability installation](https://posthog.com/docs/ai-observability/installation/opentelemetry.md)
- [Perplexity AI Observability installation](https://posthog.com/docs/ai-observability/installation/perplexity.md)
- [Pi Coding Agent AI Observability installation](https://posthog.com/docs/ai-observability/installation/pi.md)
- [Playground](https://posthog.com/docs/ai-observability/playground.md)
- [Portkey AI Observability installation](https://posthog.com/docs/ai-observability/installation/portkey.md)
- [Privacy mode](https://posthog.com/docs/ai-observability/privacy-mode.md)
- [Pydantic AI Observability installation](https://posthog.com/docs/ai-observability/installation/pydantic-ai.md)
- [React integration with useThumbSurvey](https://posthog.com/docs/ai-observability/user-feedback/use-thumb-survey.md)
- [Self-driving with AI Observability](https://posthog.com/docs/ai-observability/self-driving.md)
- [Semantic Kernel AI Observability installation](https://posthog.com/docs/ai-observability/installation/semantic-kernel.md)
- [Sentiment classification](https://posthog.com/docs/ai-observability/sentiment.md)
- [Sessions](https://posthog.com/docs/ai-observability/sessions.md)
- [smolagents AI Observability installation](https://posthog.com/docs/ai-observability/installation/smolagents.md)
- [Spans](https://posthog.com/docs/ai-observability/spans.md)
- [Together AI Observability installation](https://posthog.com/docs/ai-observability/installation/together-ai.md)
- [Tools](https://posthog.com/docs/ai-observability/tools.md)
- [Trace Reviews](https://posthog.com/docs/ai-observability/trace-reviews.md)
- [Trace summarization](https://posthog.com/docs/ai-observability/summarization.md)
- [Traceloop and OpenLLMetry](https://posthog.com/docs/ai-observability/integrations/traceloop-posthog.md)
- [Traces](https://posthog.com/docs/ai-observability/traces.md)
- [Use AI Observability over PostHog MCP](https://posthog.com/docs/ai-observability/surfaces/mcp.md)
- [Vercel AI 

Measured from the saved file

Links and embedded code

UTF-8 text size
449.9 KB460673 bytes
Token count
113501o200k_base encoding
Markdown links
44994488 distinct URLs
Fenced code blocks
14739 lines in the file

Size measures the captured UTF-8 text, not compressed transfer size. Tokens are counted with a named tokenizer; other models can count differently. Neither measure establishes context compatibility or answer quality.

Project H1
PostHog

Opening blockquote

PostHog is the platform for self-driving products. It pairs the full context of your product's data (events, errors, logs, replays, and more) with agents that find problems and ship changes with you. It includes tools for product analytics, session replay, feature flags, A/B testing, error tracking, surveys, AI observability, web analytics, a data warehouse, and more. The fastest way to integrate PostHog is with the setup wizard: `npx @posthog/wizard@latest`

Context architecture

How the content is divided

69 H2 sections organize 4499 parsed Markdown links. 4493 links point to .md or .markdown paths; 1 link occurrences use another hostname. Linked destinations have not been recursively validated.

H2 sectionLinksUTF-8 bytesTokens
Instructions for AI Coding AssistantsLine 782484603
Products and toolsLine 30213276755
ChangelogLine 63227969
ActivityLine 7015715
AdvancedLine 74221850488
AI EngineeringLine 99432094
Ai EvalsLine 106317456
Ai ObservabilityLine 1129090592297
Ai ResearchLine 20518325
AlertsLine 20914915
APILine 213428172
BillingLine 2205409108
Business KnowledgeLine 2289781176
Customer Data Platform (CDP)Line 2409037787723114
CliLine 114615118
Cmd KLine 115015717
Show 53 more sections
H2 sectionLinksUTF-8 bytesTokens
ContributeLine 1154430580
Csp TrackingLine 116118120
Customer AnalyticsLine 1165131195272
DataLine 1181211466368
Data WarehouseLine 12055860761438
DiscussionLine 126615715
Distributed TracingLine 1270121175268
EndpointsLine 1285332944725
Error TrackingLine 13217673771758
A/B Testing and ExperimentsLine 14006056301369
Feature Flag Use CasesLine 146318123
Feature FlagsLine 14675654161331
Getting StartedLine 15266474126
GlossaryLine 153515317
Health ChecksLine 1539131107294
Hog (Query Language)Line 155514316
How Posthog WorksLine 15596494137
IntegrateLine 156817521
IntegrationsLine 1572430881
Js SnippetsLine 1579321358
SDKs and LibrariesLine 15857449411411
LogsLine 1662403055820
Mcp AnalyticsLine 1705262265587
MetricsLine 1734141179274
MigrateLine 1751121004287
Model Context Protocol (MCP)Line 1766121116296
New To PosthogLine 17818837226
NotebooksLine 179215516
Posthog AiLine 1796171392400
Posthog DesktopLine 1816201753466
PrivacyLine 18398654174
Product AnalyticsLine 18506257511294
Prompt ManagementLine 1915325762
Replay VisionLine 1921151133309
Revenue AnalyticsLine 1939111035250
Self DrivingLine 1953282519635
Self HostLine 1984121125274
Semantic LayerLine 19998679164
Session ReplayLine 2010434141952
SettingsLine 2056151114274
SkillsLine 2074211631
SlackLine 2079429785
SQL and ClickHouseLine 20867503131
SupportLine 2096191330337
Support OptionsLine 211816716
SurveysLine 2122363024775
TasksLine 2161322956
ToolbarLine 2167429777
Vscode ExtensionLine 21746598138
Web AnalyticsLine 21834846921088
WorkflowsLine 2234282415600
LearnLine 2265293744904
OptionalLine 2297 · Optional243627394863381

Link counts exclude parsed fenced and inline code and resolve relative destinations against the final endpoint. Section sizes cover the text below each H2 until the next H2.

Embedded material

Code, installation and API examples

Fenced blocks
1 closed
Declared languages
unlabeled (1)
Package-install commands
0 detected in fenced or inline code
Authentication examples
0 fenced lines match API-key, Authorization, Bearer, OAuth or access-token patterns
HTTP request examples
0 fenced lines match request-method patterns
Authentication links
1 links have authentication-related labels

Embedded example text and links to further documentation are counted separately. A code block does not establish that a sample runs or that an authentication flow succeeds.

Publisher prioritization

The Optional section

1 H2 section named “Optional” contain 2436 parsed links. 2063 links sit outside those sections. That puts 54.1% of the file’s parsed links under Optional.

The community proposal uses Optional by convention for secondary links that can be skipped for a shorter context. This label does not establish that everything outside it is critical, or that the material inside it is deprecated.

Machine-readable routes

MCP references and configuration text

MCP-related text was detected in the captured file. 57 links have MCP-related labels or paths. 0 fenced lines match mcpServers, mcp_servers or an mcp add command.

These are text and link observations. No MCP server connection, authentication or tool call was tested.

Index and bundle

llms-full.txt companion

Not established

A verified text response establishes a companion at the checked URL. It does not prove the bundle contains all product documentation, that generation is automated, or that it fits an assistant’s context window.

Change evidence

What can be said about freshness

This capture establishes a baseline. Update frequency cannot be determined from one observation.

Linked release and migration material

38 links have release, changelog, deprecation or migration terms in their labels or paths. These provide places to investigate product changes separately.

File changes can reveal documentation edits or navigation changes. They do not by themselves measure product release velocity, accuracy, agent adoption or AI visibility.

Capture identity and measurement method
Requested endpoint
https://posthog.com/llms.txt
Final endpoint
https://posthog.com/llms.txt
HTTP status
200
Content type
text/plain; charset=utf-8
Text retrieval
Firecrawl literal text capture
Tokenizer
tiktoken 0.14.0 · o200k_base
SHA-256 of saved UTF-8 text
a15a88a0519e1fb5ce7cac6c093470d3b9e53c445755825d878e42603ed016a1

Counts use a deterministic parser, not a spec-compliance grade. Unusual Markdown and indented code can fall outside its recognized patterns. See the llms.txt proposal and tokenizer implementation.

Related tools and resources

Prefer to write? Send Jon a message.