From 98a1e2a8d20af9c92a0815bb52208fb917ddef2a Mon Sep 17 00:00:00 2001 From: Andrew Maguire Date: Wed, 1 Apr 2026 12:55:01 +0100 Subject: [PATCH 1/2] docs(llma): add Claude Agent SDK installation page and nav entry Thin MDX wrapper that imports the shared onboarding content from the posthog repo (docs/onboarding/llm-analytics/claude-agent-sdk.tsx). Added nav entry under Anthropic in the LLM Analytics installation sidebar. Part of PostHog/posthog#53010. --- .../installation/claude-agent-sdk.mdx | 52 +++++++++++++++++++ src/navs/index.js | 5 ++ 2 files changed, 57 insertions(+) create mode 100644 contents/docs/llm-analytics/installation/claude-agent-sdk.mdx diff --git a/contents/docs/llm-analytics/installation/claude-agent-sdk.mdx b/contents/docs/llm-analytics/installation/claude-agent-sdk.mdx new file mode 100644 index 000000000000..828bb544781b --- /dev/null +++ b/contents/docs/llm-analytics/installation/claude-agent-sdk.mdx @@ -0,0 +1,52 @@ +--- +title: Claude Agent SDK LLM analytics installation +platformIconName: IconAnthropic +showStepsToc: true +tableOfContents: [ + { + url: 'install-the-posthog-sdk', + value: 'Install the PostHog SDK', + depth: 1, + }, + { + url: 'install-the-claude-agent-sdk', + value: 'Install the Claude Agent SDK', + depth: 1, + }, + { + url: 'initialize-posthog-and-run-a-query', + value: 'Initialize PostHog and run a query', + depth: 1, + }, + { + url: 'reusable-configuration-with-instrument', + value: 'Reusable configuration with instrument()', + depth: 1, + }, + { + url: 'tool-usage-and-multi-turn-conversations', + value: 'Tool usage and multi-turn conversations', + depth: 1, + }, + { + url: 'verify-traces-and-generations', + value: 'Verify traces and generations', + depth: 1, + }, +] +--- + + + +import { ClaudeAgentSDKInstallation } from 'onboarding/llm-analytics/claude-agent-sdk.tsx' +import { OnboardingContentWrapper } from 'components/Docs/OnboardingContentWrapper' +import NotableGenerationProperties from '../_snippets/notable-generation-properties.mdx' +import { addNextStepsStep } from './_snippets/shared-helpers.tsx' + + + + diff --git a/src/navs/index.js b/src/navs/index.js index 702befcf0c1c..e8e36646f8f1 100644 --- a/src/navs/index.js +++ b/src/navs/index.js @@ -5308,6 +5308,11 @@ export const docsMenu = { url: '/docs/llm-analytics/installation/anthropic', icon: 'IconAnthropic', }, + { + name: 'Claude Agent SDK', + url: '/docs/llm-analytics/installation/claude-agent-sdk', + icon: 'IconAnthropic', + }, { name: 'Google', url: '/docs/llm-analytics/installation/google', From f564e99315233d5d50e32ebe07bf2f28b2d1386e Mon Sep 17 00:00:00 2001 From: Andrew Maguire Date: Wed, 1 Apr 2026 13:17:25 +0100 Subject: [PATCH 2/2] docs(llma): add multi-turn conversations TOC entry --- .../docs/llm-analytics/installation/claude-agent-sdk.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contents/docs/llm-analytics/installation/claude-agent-sdk.mdx b/contents/docs/llm-analytics/installation/claude-agent-sdk.mdx index 828bb544781b..3923caa8da8a 100644 --- a/contents/docs/llm-analytics/installation/claude-agent-sdk.mdx +++ b/contents/docs/llm-analytics/installation/claude-agent-sdk.mdx @@ -28,6 +28,11 @@ tableOfContents: [ value: 'Tool usage and multi-turn conversations', depth: 1, }, + { + url: 'multi-turn-conversations-with-history', + value: 'Multi-turn conversations with history', + depth: 1, + }, { url: 'verify-traces-and-generations', value: 'Verify traces and generations',