# @posthog/ai

> PostHog Node.js AI integrations

Latest version **8.11.1** (published 2026-09-14) · MIT license · 423.3K weekly downloads

## Install

```sh
npm install @posthog/ai
pnpm add @posthog/ai
yarn add @posthog/ai
bun add @posthog/ai
```

## Health

**Score 85/100 (A)** — status: active.

Positive: moderate downloads; has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

## Facts

| | |
|---|---|
| Version | 8.11.1 |
| Published | 2026-09-14 |
| First published | 2025-01-21 |
| Weekly downloads | 423.3K |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^20.20.0 \|\| >=22.22.0 |
| Dependencies | 3 |
| Unpacked size | 2.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 604 |
| Author | PostHog |
| Maintainers | fuziontech, mariusandra, ben-posthog, timgl, rafael_posthog, fraserhopper, manoelposthog, robbie-c, gustavostrassburger, dustinbyrne, feliperalmeida, lucasheriques, frankposthog, tom-posthog, adamleithp, cat-ph, sarahxsanders, peterkirkhamposthog, ioannisj, joshuasnyder, huguespouillot |
| Keywords | posthog, ai, openai, anthropic, gemini, llm, observability, agents |

## Links

- npm: https://www.npmjs.com/package/@posthog/ai
- Repository: https://github.com/PostHog/posthog-js
- Homepage: https://github.com/PostHog/posthog-js-lite#readme
- Issues: https://github.com/PostHog/posthog-js-lite/issues
- npm.io page: https://npm.io/package/@posthog/ai

## Dependencies (3)

- [zod](https://npm.io/package/zod.md) ^4.1.13
- [uuid](https://npm.io/package/uuid.md) ^11.1.0
- [@posthog/core](https://npm.io/package/@posthog/core.md) ^1.53.3

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads
- [@oh-my-pi/pi-coding-agent](https://npm.io/package/@oh-my-pi/pi-coding-agent.md) — 63.4K weekly downloads

## Recent versions

- 8.11.1 (latest) — 2026-09-14
- 8.11.0 — 2026-09-10
- 8.10.4 — 2026-09-10
- 8.10.3 — 2026-09-09
- 8.10.2 — 2026-09-07
- 8.10.1 — 2026-09-03
- 8.10.0 — 2026-09-02
- 8.9.3 — 2026-09-01
- 8.9.2 — 2026-09-01
- 8.9.1 — 2026-09-01
- 8.9.0 — 2026-08-27
- 8.8.1 — 2026-08-25
- 8.8.0 — 2026-08-13
- 8.7.1 — 2026-08-07
- 8.7.0 — 2026-08-07
- … 210 more at https://npm.io/package/@posthog/ai/versions

## README

<p align="center">
  <img alt="posthoglogo" src="https://user-images.githubusercontent.com/65415371/205059737-c8a4f836-4889-4654-902e-f302b187b6a0.png">
</p>
<p align="center">
  <img alt="GitHub contributors" src="https://img.shields.io/github/contributors/posthog/posthog"/>
  <a href='http://makeapullrequest.com'><img alt='PRs Welcome' src='https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=shields'/></a>
  <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/posthog/posthog-js"/>
  <img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed/posthog/posthog-js"/>
</p>

# PostHog JS

This is a monorepo containing multiple packages to integrate with PostHog using JavaScript!

Please see the main [PostHog docs](https://posthog.com/docs).

## Packages

- [posthog-js](./packages/browser/README.md)
- [posthog-js-lite](./packages/web/README.md)
- [posthog-node](./packages/node/README.md)
- [posthog-react-native](./packages/react-native/README.md)
- [@posthog/react](./packages/react/README.md)
- [@posthog/ai](./packages/ai/README.md)
- [@posthog/convex](./packages/convex/README.md)
- [@posthog/nextjs-config](./packages/nextjs-config/README.md)
- [@posthog/nuxt](./packages/nuxt/README.md)
- [@posthog/openfeature-node-provider](./packages/openfeature-node-provider/README.md)
- [@posthog/openfeature-web-provider](./packages/openfeature-web-provider/README.md)
- [@posthog/plugin-utils](./packages/plugin-utils/README.md)
- [@posthog/rollup-plugin](./packages/rollup-plugin/README.md)
- [@posthog/types](./packages/types/README.md)
- [@posthog/webpack-plugin](./packages/webpack-plugin/README.md)

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md)

---
_Source: https://npm.io/package/@posthog/ai · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
