Build an app with an AI agent
Build and deploy a Keboola app from Claude Code, Claude Desktop, Cursor, VS Code, the ChatGPT app or a terminal with the dataapp-developer plugin and kbagent: what you get by default, setting up your client, the prompt, and checking the app.
An AI agent on your computer can build a Keboola app from one prompt. With the dataapp-developer plugin from Keboola’s AI Kit, it reads your data, writes the code, creates the app with a Git repository that Keboola manages, pushes the code there and deploys it. You end up with a running app at its own URL, and the code in a repository you can keep changing.
To build inside Keboola instead, Kai does the same from the Create App screen, with a live preview. To write the code yourself in your own repository, see Build an app locally.
Before you start
Section titled “Before you start”- A Keboola project. No project yet? Create a free one.
- The data the app should show, as a table in Storage. No data yet? Download the sample opportunity.csv and load it as in Manual Data Loading, which takes a few minutes and gives you the table
in.c-csv-import.opportunity; Describe the app has a prompt for it. For your own data, use a data source connector. - kbagent, connected to that project. Creating the push token for the app’s repository needs admin rights in the project.
- Git, which pushes the app’s code.
- An AI client: Claude Code, Claude Desktop, Cursor, VS Code or the ChatGPT app. You can also skip the agent and use the Terminal tab below, or another agent.
What you get by default
Section titled “What you get by default”Unless the prompt says otherwise, a dashboard comes out as a Python/JS app built with Node.js and Chart.js, with its code in a new Keboola-managed Git repository. The app runs at the tiny size, sleeps after 15 minutes without visitors, gets access to your Storage data (on the kbagent route only once the repository block is added, see If the app can’t read Storage), and sits behind a shared password.
The agent usually can’t show you that password, because kbagent data-app password needs a Manage API token. The password is on the app’s page in Keboola, next to Open App: open Apps from the left navigation and then your app. The prompt below asks the agent for a direct link to that page.
To make the app public, say so in the prompt. Anyone with its URL can then open it and see the data it shows. Changing an existing app’s sign-in, including to single sign-on, belongs in its Authentication settings.
Set up your client
Section titled “Set up your client”-
Install kbagent, connect your project and add the
kbagentplugin. kbagent with AI agents has the steps;/kbagent:setupwith your stack’s URL installs the CLI and signs you in. -
Add the app-building plugin from the same marketplace:
/plugin install dataapp-developer@keboola-claude-kit -
Paste the prompt from Describe the app. Approve the commands it asks to run, unless you’ve allowed them.
The plugin gives the agent a skill with Keboola’s app layout, Storage access and deployment rules, plus app templates.
- Connect Keboola’s MCP server for your stack, as in Using with Claude Desktop.
- Open Customise → Plugins → Add → Add from marketplace, paste
keboola/ai-kit, and adddataapp-developer. The same route installs thekbagentplugin; see kbagent with AI agents. - Start a new chat and paste the prompt from Describe the app, with “using kbagent, not an MCP server, in the project kbagent is connected to” replaced by “through the Keboola MCP server”. The skill prefers the MCP route in Claude Desktop, described in The MCP route; if it also finds kbagent, it asks which one to use. Without a way to push to Git, it builds a Streamlit app instead.
- Install kbagent and connect your project in a terminal, as in First, in a terminal.
- Add the AI Kit marketplace as in Cursor, with the full URL
https://github.com/keboola/ai-kit. Under Keboola Ai Kit, add bothkbagentanddataapp-developer. - Paste the prompt from Describe the app into Cursor’s chat. Approve the terminal commands it asks to run.
If Cursor offers to sign you in to a keboola MCP server, decline to stay on kbagent. The plugin’s own server points at the US GCP stack (us-east4), so signing in to it can send the agent to a project there.
VS Code runs the agent through GitHub Copilot, so you need the Copilot extension with agent mode.
- Install kbagent and connect your project in a terminal, as in First, in a terminal.
- Install the plugins from source as in VS Code: run Chat: Install Plugin from Source, paste
https://github.com/keboola/ai-kit, confirm the Trust prompt, and pickkbagent. Do the same fordataapp-developer. - Open the Chat view (
⌃⌘I, orCtrl+Alt+Ion Windows), switch to agent mode, and paste the prompt from Describe the app. Approve the terminal commands it asks to run.
-
Install kbagent and connect your project in a terminal, as in First, in a terminal.
-
Turn on Developer mode and add the marketplace as in ChatGPT app, then install
kbagentanddataapp-developerfrom the Personal tab. From a shell, that’s:Terminal window codex plugin marketplace add https://github.com/keboola/ai-kitcodex plugin add kbagent@keboola-claude-kitcodex plugin add dataapp-developer@keboola-claude-kit -
Start a new chat and paste the prompt from Describe the app. Approve the commands it asks to run.
Without an agent, run the same steps yourself. kbagent project list shows three values you need: your project’s name in kbagent (Alias, <alias> below), its Project ID (<project-id>) and its Stack URL (<Keboola URL>).
-
Create the app. It prints the App ID (
<id>below) and the Config ID (<config-id>), and doesn’t deploy yet, because the new repository is empty:Terminal window kbagent data-app create --project <alias> --name "Orders per day" --slug orders-per-day --use-managed-git-repo -
Get the repository’s HTTPS URL (
<https-url>) and a push token. The token is a one-time secret, so save it now:Terminal window kbagent data-app git-repo --project <alias> --app-id <id>kbagent data-app git-credentials-create --project <alias> --app-id <id> --type http_token --permissions readWrite --yes -
Commit your code and push it to
main. The code has to follow the layout in the skill’s reference. Clearing Git’s credential helper for this push makes Git ask for the token instead of sending a stored login, which fails withRepository not found. When it asks, use any username and the token as the password.Terminal window git -c credential.helper= push <https-url> HEAD:main -
Until keboola/cli#765 ships, add the repository block to the app’s configuration, or the app gets no Storage access (why):
Terminal window kbagent config update --project <alias> --component-id keboola.data-apps --config-id <config-id> --merge --configuration '{"parameters":{"dataApp":{"git":{"repository":"<https-url>","branch":"main","private":true}}}}' -
Deploy, then print the app’s URL:
Terminal window kbagent data-app deploy --project <alias> --app-id <id> --waitkbagent data-app detail --project <alias> --app-id <id>
The password is on the app’s page, <Keboola URL>/admin/projects/<project-id>/data-apps/<config-id>, next to Open App. With a Manage API token, kbagent data-app password --project <alias> --app-id <id> prints it too.
If the app opens without data, kbagent data-app logs --project <alias> --app-id <id> shows its log. If it doesn’t start at all, kbagent data-app runs --project <alias> --app-id <id> shows why.
Describe the app
Section titled “Describe the app”Say what the app shows, which data it uses and where the code goes, and ask for a new, deployed app. Without the word new, the skill prefers changing an app that already exists. For example:
Build a Keboola app using kbagent, not an MCP server, in the project kbagentis connected to. It shows the number of orders per day as a line chart, fromthe orders table. Put the code in a new Keboola-managed Git repository, deploythe app, check that it loads its data, and give me its URL and its page inKeboola (<Keboola URL>/admin/projects/<project-id>/data-apps/<config-id>).Swap the orders table and the chart for your own data and keep the rest as it is; the agent fills in the page link itself. With the sample data from Before you start, use this one:
Build a Keboola app using kbagent, not an MCP server, in the project kbagentis connected to. It shows the number of opportunities created per month as aline chart, from the in.c-csv-import.opportunity table (CreatedDate column).Put the code in a new Keboola-managed Git repository, deploy the app, checkthat it loads its data, and give me its URL and its page in Keboola(<Keboola URL>/admin/projects/<project-id>/data-apps/<config-id>).It reads the skill, finds the table and queries a sample before it writes any code. If kbagent knows more than one project, replace “the project kbagent is connected to” with its alias. Name a framework too if it matters to you. To use your own GitHub repository instead, put its URL in the prompt; the repository then has to follow the layout in Build an app locally.
If the agent can reach Keboola more than one way, it may ask which to use, or offer to sign you in to an MCP server. Outside Claude Desktop, pick kbagent to follow this page and decline that sign-in. An MCP sign-in can reach other projects, and the agent may build wherever it finds the data first; that’s why the prompt names both kbagent and the project. The plugin’s own MCP server is fixed to the US GCP stack (us-east4): Claude Code can’t connect to it, Cursor offers a sign-in, and the ChatGPT app’s Codex engine reports that it needs one. The MCP route describes the other way in.
The MCP route
Section titled “The MCP route”Through a Keboola MCP server, the agent doesn’t run kbagent. It calls the server’s app tools instead, such as modify_python_js_data_app, create_python_js_data_app_git_credential and deploy_data_app. To take this route on purpose, connect the MCP server for your stack: Claude Desktop, Cursor, VS Code, ChatGPT.
- It creates the app with a Keboola-managed repository, and a draft of it next to the production app.
- The draft runs in development mode at its own URL, so you preview the app before anything goes live. If the repository has a
keboola-config/supervisord-dev/program, the draft reloads each push within seconds; otherwise the agent redeploys it. A draft can’t be public, even if you asked for a public app.
- The production app stays undeployed until you approve the draft. Then the agent merges the draft into production and deploys it.
- The repository block is in the configuration from the start, so the workspace bug doesn’t apply.
Check the app
Section titled “Check the app”- The agent finishes with the app’s URL and its page in Keboola.
- The app asks for its password, which is on that page next to Open App.
- To let other people open it, see Publish and share.
- If the app opens without data, ask the agent to read the app’s log. Troubleshooting lists the common causes, including
Promise.withResolvers is not a functionfrom a too-new@keboola/api-client.
If the app can’t read Storage
Section titled “If the app can’t read Storage”Until keboola/cli#765 ships (still the case in kbagent 0.95.0), an app created with --use-managed-git-repo gets no workspace, however often you redeploy it with kbagent. It runs, but its code finds no WORKSPACE_ID. An app built from the plugin’s Node.js template logs Missing env vars: WORKSPACE_ID (or KBC_WORKSPACE_MANIFEST_PATH). Checking runtime.workspace.enabled in the configuration doesn’t catch it, because that flag is already on.
The app’s configuration is missing its repository block. The prompt above asks the agent to check that the app loads its data, so it should notice and add the block; kbagent’s rules make it ask you to confirm that change first. If it doesn’t notice, ask it to. By hand, it’s step 5 of the Terminal tab, followed by another kbagent data-app deploy. If you no longer have the config ID from create, kbagent --json data-app detail --project <alias> --app-id <id> shows it as config_id. After the fix ships, deploy adds the block itself.
Change the app later
Section titled “Change the app later”Ask the agent for the change. It pushes to the same repository and deploys again, and the app restarts on each deploy. To edit the code yourself, clone the repository from kbagent data-app git-repo with a fresh token from git-credentials-create, clearing Git’s credential helper as for the push: git -c credential.helper= clone <https-url>.
Stopping and waking the app, secrets, settings and deleting are in Operate and update an app. kbagent has no commands for drafts or copying an app, and kbagent data-app deploy --config-version runs an older configuration for one deploy without restoring it. Drafts, copying and a real rollback happen in the Keboola UI.
Other agents
Section titled “Other agents”Any agent that can run shell commands can follow the Terminal tab. For the push, it has to hand Git the token without a prompt, because an agent’s shell can’t answer one, and keep the token out of the push URL, where it would end up in the shell history. A one-off credential helper does both, with the token in an exported environment variable, GIT_PUSH_TOKEN:
git -c credential.helper= -c credential.helper='!f() { echo username=kbagent; echo "password=$GIT_PUSH_TOKEN"; }; f' push <https-url> HEAD:mainHave it load kbagent’s full command reference with kbagent context first (the context reference). If the agent can’t install plugins, give it the skill as files: the folder is on GitHub, with the app templates and reference guides the skill points to.