npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-openai-chatkit

v1.0.14

Published

Custom n8n node to manage OpenAI Agent Builder ChatKit sessions.

Readme

n8n-nodes-openai-chatkit

Custom n8n node for interacting with the OpenAI ChatKit (Agent Builder) beta without having to wire every HTTP call manually.

Features

  • Create session – request a short-lived client_secret for an Agent Builder workflow and keep it stored in the node state.
  • Refresh session – rotate the stored client_secret before it expires.
  • Send message – deliver user text (plus optional system prompt, metadata, and thread id) to the workflow and receive the full ChatKit response.
  • Manual session override – provide an existing session_id/client_secret pair directly when you do not want to use the stored state.

The node talks straight to the OpenAI API using the ChatKit beta header, so all you need is an API key with access to the feature preview.

Installation

npm install n8n-nodes-openai-chatkit

During local development you can build the project with:

npm install
npm run build

Copy the generated dist folder to your n8n custom nodes directory (usually ~/.n8n/custom/) and restart n8n.

Credentials

Create credentials of type OpenAI ChatKit API with the following fields:

  • API Key – required. Must have access to the ChatKit beta.
  • Base URL – optional. Defaults to https://api.openai.com. Override only when routing through a compatible proxy.
  • Organization / Project – optional. Forwarded as OpenAI-Organization / OpenAI-Project headers when provided.

Node usage

  1. Session → Create

    • Provide the Agent Builder workflowId and (optionally) a userId, metadata JSON, or extra session options JSON.
    • The response stores session.id, client_secret, and expires_at in the node state and returns the masked values.
  2. Message → Send

    • Supply the text in Message Text and map any incoming data from previous nodes.
    • By default the stored session is reused. Switch Session Source to Provide Manually if you want to paste a session id and client secret instead.
    • Optional fields: workflow override, thread id, role, system prompt, message metadata, and timeout.
  3. Session → Refresh (optional)

    • Requests a new client_secret for the stored session and updates the node state.
  4. Session → End (Local)

    • Clears the stored session information so the next run can start fresh.

API calls performed

The node issues the following REST requests against the configured base URL:

  • POST /v1/chatkit/sessions
  • POST /v1/chatkit/sessions/{session_id}/refresh
  • POST /v1/chatkit/sessions/{session_id}/messages

If an account still serves the earlier /v1/chat/sessions routes, the node automatically retries against those paths so you do not have to adjust any settings. Each request includes the OpenAI-Beta: chatkit_beta=v1 header required for the ChatKit preview.

Looking for end-to-end samples? The openai-chatkit-starter-app and openai-chatkit-advanced-samples repositories demonstrate how the workflows respond to these APIs.

Publishing

The repository ships a GitHub Actions workflow (.github/workflows/release.yml) that publishes the package to npm whenever a v*.*.* tag is pushed. The workflow runs npm ci, npm run build, and npm publish --provenance using the configured NPM_TOKEN secret.

License

MIT