Skip to content
Keboola Docs

Get started with kbagent

A guided first run of the kbagent CLI — install it, connect a Keboola project, verify with doctor, and run your first read commands. Plus multi-project and organization setup.

This walkthrough takes you from nothing to browsing a real project with kbagent in a few minutes. Follow it top to bottom for a single project; the Connect more section covers multi-project and organization setup.

Pick your operating system:

Recommended — the prebuilt wheel via the install script:

Terminal window
curl -LsSf https://raw.githubusercontent.com/keboola/cli/main/install.sh | sh

Alternative — uv, if you want to pin to a version or uninstall cleanly:

Terminal window
uv tool install "git+https://github.com/keboola/cli"

Whichever method you use, kbagent keeps itself current with its own startup update check (kbagent update runs one manually).

Confirm it’s on your PATH (all platforms):

Terminal window
$ kbagent --version
kbagent v0.66.0

Register a project with the CLI so you (or your agent) can reach it. There are two ways in: sign in through the browser, or hand kbagent a Storage API token.

At your own keyboard, this is the shortest route. It needs no token.

First sign in to the stack:

Terminal window
kbagent auth login --stack https://connection.keboola.com

That opens a browser, and you finish the sign-in there. On a machine with no browser it prints a code you type into a page on another device instead.

Then pick which projects to register locally:

Terminal window
kbagent auth register-projects

It shows a picker of every project the account can reach and registers the ones you choose. Add --all to register all of them without the picker.

Both commands need a real terminal. There is no headless path through auth login.

Terminal window
kbagent project add --project prod --url https://connection.keboola.com --token YOUR_TOKEN

project add is the static-token route. It reads the token from --token, or from KBC_TOKEN if you’d rather keep it off the command line. With neither, it prompts with hidden input, so the value never lands in your shell history. That prompt needs a TTY an agent’s tool-run shell does not have.

Swap the URL for your own stack. prod is an alias you pick. You use it with --project later, or set it as the default with kbagent project use prod. Add as many projects as you want.

You sign in once per machine. Every tool reads the same local config, so a project you connected here is already there in Claude Code, Cursor, VS Code and the rest. kbagent project list shows what is registered, and its Auth column says session or static per project.

CI, containers, cron, and anything else running unattended need a Storage API token, because auth login cannot run there. A few features need a static token rather than a browser session too: Kai, data apps, the semantic layer, streams, and the Python SDK.

These docs cannot create a token for you. Open your project in the Keboola UI and go to Settings → Developer settings → Agentic CLI. That page builds the exact kbagent project add command for your project and your stack, and it can include a read-only token in it. Copy it from there.

If you don’t see Agentic CLI in your project’s settings, create the token yourself under Settings → API Tokens and pass it as --token. API tokens covers that screen.

A Storage API token is enough for browsing. Some commands need an admin (master) token, e.g. creating branches or workspaces needs admin privileges. Token types and scoping options are covered in API tokens.

kbagent doctor checks your configuration and connectivity. Once a project is connected it confirms the link and flags anything else worth doing (like installing the agent plugin):

kbagent doctor output: config found, project 'docs-demo' connected to the stack (L0 - Shopify, id 264), CLI version PASS, and warnings for the MCP server and Claude Code plugin

You can also test connectivity on its own with kbagent project status.

Explore what’s there. Recent jobs:

kbagent job list --limit 5: a table of recent jobs in docs-demo with job ID, success status, component, created time, and duration

Terminal window
kbagent job list --limit 5 # recent jobs (shown above)
kbagent project list # connected projects
kbagent config list # configurations across all connected projects

Find configs, tables, buckets, and flows by name or content:

Terminal window
kbagent search "shopify"
  • Add --json to any command for machine-readable output — this is what an AI agent consumes.

  • Set a conversation ID when an agent drives kbagent, so platform observability can correlate the session (adds an X-Conversation-ID header):

    Terminal window
    export KBAGENT_CONVERSATION_ID="<unique-id>"

Several projects — register each one with project add, or bulk-onboard with a Manage API token:

Terminal window
KBC_MANAGE_API_TOKEN=xxx kbagent --allow-env-manage-token \
org setup --project-ids 901,9621 --url https://connection.keboola.com --yes

A whole organization (org admin) — kbagent registers every project and mints per-project tokens:

Terminal window
KBC_MANAGE_API_TOKEN=xxx kbagent --allow-env-manage-token \
org setup --org-id 123 --url https://connection.keboola.com --yes

Read commands then fan out across every connected project — see multi-project.


Something failing along the way? The Troubleshooting page covers the most common errors and their fixes.

Next: How kbagent works →

Ask Kai

Hi, I'm Kai — Keboola's AI assistant for the docs. Ask me anything and I'll answer from the documentation and cite the pages I use.

Kai is an AI and can make mistakes. Check the sources it links.