back to docs

GitHub Actions

Learn how to run ChatBotKit AI agents inside GitHub Actions workflows using the official chatbotkit/github-actions integration.

ChatBotKit provides official GitHub Actions that let you run AI agents directly inside your CI/CD workflows. The chatbotkit/github-actions repository contains ready-to-use actions that invoke the ChatBotKit CLI without requiring a global install or manual setup.

Available Actions

agent

The agent action runs cbk agent via an isolated npm exec invocation inside a GitHub Actions job. It supports the full range of CLI options and requires only a prompt to get started.

Setup

The only environment variable you need is your ChatBotKit API key. Add it to your repository or organization secrets as CHATBOTKIT_API_KEY.

Basic Usage

Inputs

InputRequiredDescription
promptYesTask prompt passed to cbk agent --prompt
toolsNoComma-separated tool list, e.g. read,write,edit
botNoBot ID to use for this run
modelNoModel name override
datasetNoDataset ID
skillsetNoSkillset ID
cli-versionNoCLI version to execute, defaults to latest
node-versionNoNode.js version, defaults to 20
working-directoryNoWorking directory for the CLI, defaults to .

Optional inputs are applied in this order: tools, bot, model, dataset, skillset.

Full Example

Notes

Pin cli-version for reproducibility. Using a fixed version ensures consistent agent behavior across workflow runs, which is especially important in production pipelines.

No global install. The CLI is executed via npm exec without modifying the global environment, keeping self-hosted runners clean and avoiding conflicts between concurrent jobs.

Reusable workflows. For organizations managing many repositories, pair this action with a reusable workflow to centralize agent orchestration and call it from any repository in your organization.

Versioning

The action is versioned using a root VERSION file. Pin to the floating major tag (@v0) for automatic patch and minor updates, or pin to a specific version tag for full reproducibility.