Visit the adapters directory to see other available official and vendor-official adapters.
Quick start
The adapter auto-detects credentials from GITLAB_TOKEN and either GITLAB_WEBHOOK_SIGNING_TOKEN or GITLAB_WEBHOOK_SECRET. Unless both are configured, it looks up the bot's username and user ID from the token during initialization:
import { Chat } from "chat";import { createGitLabAdapter } from "@chat-adapter/gitlab";import { createMemoryState } from "@chat-adapter/state-memory";const bot = new Chat({ userName: "my-bot", adapters: { gitlab: createGitLabAdapter(), }, state: createMemoryState(),});bot.onNewMention(async (thread, message) => { await thread.post("Hello from GitLab!");});
Point a project or group webhook at /api/webhooks/gitlab and select the Comments trigger, plus Emoji events if you handle reactions.
On serverless platforms, set GITLAB_BOT_USER_ID to the bot's numeric user ID so the bot recognizes its own comments without depending on the GET /user lookup.
Configuration
Option
Description
token
Access token with the api scope. Auto-detected from GITLAB_TOKEN.
webhookSigningToken
Webhook signing token, the whsec_ value GitLab shows (the prefix is optional). Auto-detected from GITLAB_WEBHOOK_SIGNING_TOKEN.
webhookSecret
Webhook secret token sent in X-Gitlab-Token. Auto-detected from GITLAB_WEBHOOK_SECRET.
apiUrl
REST API base URL for GitLab Self-Managed or Dedicated. Auto-detected from GITLAB_API_URL.
token is required, plus a webhook signing token, a secret token, or a custom webhookVerifier. See the full configuration reference for the remaining options.
AI Coding Agents
If you use an AI coding agent such as OpenAI Codex, Claude Code, or Cursor, install the Chat SDK skill so it knows the SDK APIs, adapter patterns, and project conventions before writing code.
npx skills add vercel/chat
The skill references bundled documentation in node_modules/chat/docs, plus adapter guides and starter templates in the published package.
You can also install the Vercel Plugin for a broader agent toolkit — it includes the Chat SDK skill alongside specialist agents, agent slash commands, and more:
npx plugins add vercel/vercel-plugin
The plugin is optional; the skill alone is enough to build with Chat SDK.