
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@posthog/agent-toolkit
Advanced tools
Tools to give agents access to your PostHog data, manage feature flags, create insights, and more.
npm install @posthog/agent-toolkit
The toolkit provides integrations for popular AI frameworks:
import { openai } from '@ai-sdk/openai'
import { generateText } from 'ai'
import { PostHogAgentToolkit } from '@posthog/agent-toolkit/integrations/ai-sdk'
const toolkit = new PostHogAgentToolkit({
posthogPersonalApiKey: process.env.POSTHOG_PERSONAL_API_KEY!,
posthogApiBaseUrl: 'https://us.posthog.com', // or https://eu.posthog.com if you are hosting in the EU
})
const result = await generateText({
model: openai('gpt-4'),
tools: await toolkit.getTools(),
prompt:
'Analyze our product usage by getting the top 5 most interesting insights and summarising the data from them.',
})
→ See full Vercel AI SDK example
import { ChatPromptTemplate, MessagesPlaceholder } from '@langchain/core/prompts'
import { ChatOpenAI } from '@langchain/openai'
import { AgentExecutor, createToolCallingAgent } from 'langchain/agents'
import { PostHogAgentToolkit } from '@posthog/agent-toolkit/integrations/langchain'
const toolkit = new PostHogAgentToolkit({
posthogPersonalApiKey: process.env.POSTHOG_PERSONAL_API_KEY!,
posthogApiBaseUrl: 'https://us.posthog.com', // or https://eu.posthog.com if you are hosting in the EU
})
const tools = await toolkit.getTools()
const llm = new ChatOpenAI({ model: 'gpt-4' })
const prompt = ChatPromptTemplate.fromMessages([
['system', 'You are a data analyst with access to PostHog analytics'],
['human', '{input}'],
new MessagesPlaceholder('agent_scratchpad'),
])
const agent = createToolCallingAgent({ llm, tools, prompt })
const executor = new AgentExecutor({ agent, tools })
const result = await executor.invoke({
input: 'Analyze our product usage by getting the top 5 most interesting insights and summarising the data from them.',
})
→ See full LangChain.js example
For a list of all available tools, please see the docs.
FAQs
PostHog tools for AI agents
The npm package @posthog/agent-toolkit receives a total of 64 weekly downloads. As such, @posthog/agent-toolkit popularity was classified as not popular.
We found that @posthog/agent-toolkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.