Create Agent Bricks: Knowledge Assistants (KA) for document Q&A and Supervisor Agents for multi-agent orchestration (MAS).
日本語の概要は準備中です。原文の説明を表示しています。
Build apps on Databricks Apps platform. Use when asked to create data apps, analytics tools, or custom interactive visualizations. A plain "create a dashboard" request means a managed AI/BI (Lakeview) dashboard → use databricks-aibi-dashboards, not this skill. Evaluates data access patterns (analytics vs Lakebase synced tables) before scaffolding. Invoke BEFORE starting implementation.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
FIRST: Use the parent databricks-core skill for CLI basics, authentication, and profile selection.
Package manager — resolve this before any install or command below:
Databricks Apps officially supports npm and pnpm only.
package.json's packageManager field → lockfile (pnpm-lock.yaml → pnpm, package-lock.json → npm).Throughout this skill and its guides, substitute what you resolved:
<pm> → that manager, for installs and package scripts (<pm> install, <pm> run typegen).<pm> is a documentation placeholder, not a shell variable — expand it, don't type it.
Is this even a Databricks App? Don't assume an app is the only way to show data. For a simple "dashboard with a few charts" and no app-specific need, the managed AI/BI (Lakeview) dashboard is the simpler path → use the databricks-aibi-dashboards skill, not this one. Reach for a custom Databricks App only when the user needs something AI/BI can't give them — bespoke interactivity/components, write-back, embedded or auth-gated workflows, a Genie/chat surface inside the app — or explicitly asks for an app. If it's genuinely ambiguous, surface both options (managed AI/BI dashboard vs custom app) and let the user choose instead of defaulting to an app. Once an app is the right call, it's fine for this skill to favor an app-based dashboard, and databricks-app-design covers building it well.
For data UI design (required for any data-displaying app): once you've confirmed the user wants a custom-code app (not a managed AI/BI dashboard — see above), if the app shows ANY data — a KPI/overview page, report, chart, table, query results, OR a conversational / chat / Genie natural-language assistant — you MUST use the databricks-app-design skill (alongside this one) to decide layout, charts, KPIs, semantic color, required states, and AI-result trust, and map them to AppKit components. This includes chat/Genie apps, not just static data views — if in doubt, use it.
Build apps that deploy to Databricks Apps platform.
| Phase | READ BEFORE proceeding |
|---|---|
| Scaffolding | ⚠️ STOP — review the State Storage Guidance and complete the Data Access Decision Gate below before scaffolding. Parent databricks-core skill (auth, warehouse discovery); then run databricks apps manifest + databricks apps init with --features and --set (see AppKit section below) |
| Writing SQL queries | SQL Queries Guide |
| Writing UI components | Frontend Guide |
Using useAnalyticsQuery | AppKit SDK |
| Querying a governed UC Metric View | Metric Views Guide |
| Adding API endpoints | Custom Endpoints Guide |
| Using Lakebase (OLTP database) | Lakebase Guide |
| Adding Genie chat / Genie-powered apps | Genie Guide — follow the Genie agent workflow below |
| Using Model Serving (ML inference) | Model Serving Guide |
| Hosting an AI agent (tool-using chatbot, beta) | Agents Guide — import from @databricks/appkit/beta |
| Typed data contracts (proto-first design) | Proto-First Guide and Plugin Contracts |
| Managing files in UC Volumes | Files Guide |
| Triggering / monitoring Lakeflow Jobs from the app | Jobs Guide |
| Platform rules (permissions, deployment, limits) | Platform Guide — READ for ALL apps including AppKit |
| Non-AppKit app (Streamlit, FastAPI, Flask, Gradio, Next.js, etc.) | Other Frameworks |
databricks apps init, keep the base name to 26 characters because its development workflow adds a dev- prefix. DABs does not add that prefix.databricks apps validate --profile <PROFILE> before deploying.tests/smoke.spec.ts selectors BEFORE running validation. Default template checks for "Minimal Databricks App" heading and "hello world" text — these WILL fail in your custom app. See testing guide.getByRole, getByText, getByPlaceholder, getByLabel. getByLabelText does not exist in Playwright (it is a React Testing Library method) and throws TypeError at runtime. See testing guide or npx playwright codegen.INVALID_REQUEST: Event exceeds max size of 1048576 bytes and net::ERR_ABORTED, leaving every asserted UI element absent. Use LIMIT or an aggregated query (e.g. COUNT(*) GROUP BY status) — never raw row dumps.@databricks/appkit or @databricks/appkit-ui version in package.json — databricks apps init sets the correct version. Do not install a different version of either package unless explicitly asked by the user. If you need a different version, re-scaffold with databricks apps init --version <version>.databricks-core skill.createApp, plugin shapes, useAnalyticsQuery, useMetricView, etc.), run npx @databricks/appkit docs <section> and use the actual signature. Training data has stale shapes; a single invented signature fails tsc --noEmit during validate. The docs ship with the installed AppKit and are the authoritative source.as unknown as <T> double-assertions — appkit lint enforces no-double-type-assertion and one violation fails the entire validate step. Instead: narrow with Zod (z.infer<typeof schema>), use a runtime type guard, or write a typed mapper function. If a query result needs reshaping, type the row schema via queryKey types rather than casting.databricks apps init --features analytics)client/src/App.tsx — main React component (start here)config/queries/*.sql — SQL query files (queryKey = filename without .sql)config/metric-views/definitions.json — governed UC Metric View bindings (optional; see Metric Views)server/server.ts — backend entry (onPluginsReady + Express routes)tests/smoke.spec.ts — smoke test (⚠️ MUST UPDATE selectors for your app)client/src/appKitTypes.d.ts — auto-generated types (<pm> run typegen)databricks apps init --features lakebase)server/server.ts — backend with Lakebase pool + Express routesclient/src/App.tsx — React frontendapp.yaml — manifest with database resource declarationpackage.json — includes @databricks/lakebase dependencyconfig/queries/ — Lakebase apps use appkit.lakebase.query() in Express routes, not SQL filesBefore writing any SQL, use the parent databricks-core skill for data exploration — search information_schema by keyword, then batch discover-schema for the tables you need. Do NOT skip this step.
State Storage Guidance (evaluate BEFORE the Decision Gate):
If the user's app description involves storing or persisting data — forms, CRUD operations, user submissions, orders, todos, or other user-generated content — the app likely needs a Lakebase database.
databricks-lakebase skill to obtain the branch and database resource names:
databricks postgres list-projects, then list-branches / list-databases, and let the user pick the project, branch, and database; confirm which schema the app will own (a fresh/dedicated schema avoids the service-principal ownership conflict).production branch + databricks_postgres database).--features lakebase and pass --set lakebase.postgres.branch=<BRANCH_NAME> --set lakebase.postgres.database=<DATABASE_NAME>.--features analytics or use Lakebase synced tables.Do NOT add Lakebase to analytics, dashboard, or visualization apps unless the user explicitly requests persistent write-back storage. Read-only data display, filters, and preferences do not require a database.
Data Access Decision Gate (REQUIRED before scaffolding):
If the app reads from Unity Catalog / lakehouse tables, you MUST show the comparison below to the user and ask them to choose. Do not skip this. Do not choose for them.
| (A) Lakebase synced tables | (B) Analytics | |
|---|---|---|
| Speed | Sub-second responses | Takes a few seconds |
| Best for | Full-text search, typeahead, autocomplete, real-time lookups, operational apps | Dashboards, charts, aggregations, KPIs, filtered queries, browsing |
| How it works | Data synced from Delta into Lakebase Postgres | Queries run on SQL warehouse at read time |
After showing the table, add a brief recommendation. Default to recommending Analytics (B) for most read-only apps — dashboards, charts, filtered queries, browsing, and aggregations. Recommend Lakebase synced tables (A) only when the app needs sub-second latency for full-text search, typeahead/autocomplete, real-time lookups by ID, or operational data serving. Note: "search" or "filter" in a prompt usually means SQL WHERE clauses (Analytics), not full-text search (Lakebase). Always let the user make the final call.
After the user chooses:
--features lakebase. See Lakebase Guide for full workflow.--features analytics. Within Analytics, if the data is a governed UC Metric View (pre-defined semantic measures/dimensions), query it via the metric-view path — see Metric Views — otherwise write config/queries/ SQL.--features analytics,lakebase if the app needs both patterns.--features flag.Analytics apps (--features analytics):
config/queries/<pm> run typegen — verify all queries show ✓client/src/appKitTypes.d.ts to see generated typesApp.tsx using the generated typestests/smoke.spec.ts selectorsdatabricks apps validate --profile <PROFILE>DO NOT write UI code before running typegen — types won't exist and you'll waste time on compilation errors.
Lakebase apps (--features lakebase): No SQL files or typegen. See Lakebase Guide for the onPluginsReady pattern: initialize schema at startup, register Express routes in server/server.ts, then build the React frontend.
After completing the decision gate above, use this routing table:
queryKey propuseAnalyticsQuery hookuseAnalyticsQuery, transform client-sideuseMetricView hook + config/metric-views/definitions.json — see Metric ViewsonPluginsReady — see Lakebase Guidegenie() plugin — see Genie Guideserving() plugin — see Model Serving Guidesystem.ai.*): Declare a uc_securable (MODEL_SERVICE) resource and call the service name on /ai-gateway/mlflow/v1 — see Unity Catalog model services and the databricks-unity-gateway skill (not serving(), which takes serving-endpoint names)agents() plugin (import from @databricks/appkit/beta, beta) — see Agents Guidejobs() plugin — see Jobs Guideconfig/queries/useAnalyticsQuery for Lakebase data — it queries the SQL warehouse onlyTypeScript/React framework with type-safe SQL queries and built-in components.
Official Documentation — the source of truth for all API details. Use the project-local appkit CLI from the installed @databricks/appkit package:
npx @databricks/appkit docs # ← ALWAYS start here to see available pages
npx @databricks/appkit docs <query> # view a section by name or doc path
npx @databricks/appkit docs --full # full index with all API entries
npx @databricks/appkit docs "appkit-ui API reference" # example: section by name
npx @databricks/appkit docs ./docs/plugins/analytics.md # example: specific doc file
DO NOT guess doc paths. Run without args first, pick from the index. The <query> argument accepts both section names (from the index) and file paths. Docs are the authority on component props, hook signatures, and server APIs — skill files only cover anti-patterns and gotchas.
App Manifest and Scaffolding
Agent workflow for scaffolding: get the manifest first, then build the init command.
Get the manifest (JSON schema describing plugins and their resources):
databricks apps manifest --profile <PROFILE>
# See plugins available in a specific AppKit version:
databricks apps manifest --version <VERSION> --profile <PROFILE>
# Custom template:
databricks apps manifest --template <GIT_URL> --profile <PROFILE>
The output defines:
--features), plus requiredByTemplate, and resources.--features (it is included automatically); you must still supply all of its required resources via --set. If false or absent, the plugin is optional — add it to --features only when the user's prompt indicates they want that capability (e.g. analytics/SQL), and then supply its required resources via --set.resources.required and resources.optional (arrays). Each item has resourceKey and fields (object: field name → description/env). Use --set <plugin>.<resourceKey>.<field>=<value> for each required resource field of every plugin you include.Scaffold (use the Databricks CLI only):
databricks apps init --name <NAME> --features <plugin1>,<plugin2> \
--set <plugin1>.<resourceKey>.<field>=<value> \
--set <plugin2>.<resourceKey>.<field>=<value> \
--description "<DESC>" --run none --profile <PROFILE>
# --run none: skip auto-run after scaffolding (review code first)
# With custom template:
databricks apps init --template <GIT_URL> --name <NAME> --features ... --set ... --profile <PROFILE>
Optionally use --version <VERSION> to target a specific AppKit version.
--name, --profile. Name: ≤26 chars, lowercase letters/numbers/hyphens only. Use --features only for optional plugins the user wants (plugins with requiredByTemplate: false or absent); mandatory plugins must not be listed in --features.--set for every required resource (each field in resources.required) for (1) all plugins with requiredByTemplate: true, and (2) any optional plugins you added to --features. Add --set for resources.optional only when the user requests them.databricks-core skill to resolve IDs (e.g. warehouse: databricks warehouses list --profile <PROFILE> or databricks experimental aitools tools get-default-warehouse --profile <PROFILE>).DO NOT guess plugin names, resource keys, or property names — always derive them from databricks apps manifest output. Example: if the manifest shows plugin analytics with a required resource resourceKey: "sql-warehouse" and fields: { "id": ... }, include --set analytics.sql-warehouse.id=<ID>.
Execution identity (auth mode) requires databricks CLI >= v1.20.0 (the first release with the auth-mode feature; it is not in v1.19.0 or earlier). On CLIs without it these flags do not exist; every resource is bound to the service principal and the flags below must not be used. By default every resource is still bound to the service principal (SP), and omitting these flags produces exactly the same output as before.
--auth-mode obo|sp sets the app-wide default. sp is the default. --auth-mode obo applies only to resources that can run on behalf of the user; resources that cannot (e.g. secret, Lakebase) stay on the SP and the CLI prints a note listing them. --auth-mode both is not valid at the app level.--set <plugin>.<resourceKey>.authMode=obo|sp|both sets one resource's identity and overrides the app-wide default. both is only valid here, per resource.authMode on a resource that cannot run OBO is an error (the CLI names the resource and the fix).--features or --set means no prompt and the default SP.What each mode emits, and the databricks apps validate OBO checks, are in the Platform Guide. Default to SP; choose OBO only when the app must enforce the viewing user's own permissions (row-level or per-user data access). Mixed is common, e.g. an analytics warehouse OBO plus a job as SP.
Scaffolding Rules Protocol — databricks apps manifest may emit scaffolding.rules at the template level (top-level scaffolding.rules) and on individual plugins (plugins[].scaffolding.rules). Each block has must / should / never arrays of short directive strings. Consume them as follows:
--features list AND every plugin with requiredByTemplate: true, read plugins[].scaffolding.rules. Union those with the top-level template scaffolding.rules into one working set, tagged by source (template vs <plugin>).Before init MUST be executed before databricks apps init. Rules beginning with After init MUST be executed after init completes (e.g. migrations, typegen, connectivity checks). Rules without a phase prefix apply throughout the scaffold/develop loop.must rule contradicts a template never rule on the same target (or vice versa), STOP and ask the user which to follow before proceeding. Do not silently pick one. Treat must vs never on the same action as a conflict; should is advisory and does not block.databricks apps init, surface the merged working set to the user grouped by phase (Before init / After init / Always) and by severity (must / should / never), so the active guardrails are explicit.READ AppKit Overview for project structure, workflow, and pre-implementation checklist.
Genie Agent Workflow — when the user wants a Genie-powered app, do not start by asking for a Genie Space ID. Instead:
catalog.schema.table).databricks genie create-space (see Genie Guide for syntax and serialized space format).databricks genie list-spaces --profile <PROFILE> and let the user pick.--set keys from databricks apps manifest.Read the Genie Guide for configuration, SSE endpoints, and frontend integration.
# ❌ WRONG: name is NOT a positional argument
databricks apps init --features analytics my-app-name
# → "unknown command" error
# ✅ CORRECT: use --name flag
databricks apps init --name my-app-name --features analytics --set "..." --profile <PROFILE>
databricks apps init creates directories in kebab-case matching the app name.
App names must be lowercase with hyphens only (≤26 chars).
Databricks Apps supports any framework that runs as an HTTP server. LLMs already know these frameworks — the challenge is Databricks platform integration.
READ Other Frameworks Guide BEFORE building any non-AppKit app. It covers port/host configuration, app.yaml and databricks.yml setup, dependency management, networking, and framework-specific gotchas.
After deploying, verify the app is running:
databricks apps get <app-name> --profile <PROFILE> -o json # Check app_status.state: RUNNING; the `url` field is the app's URL
databricks apps logs <app-name> --follow --profile <PROFILE> # Stream live logs (Ctrl+C to stop)
Note:
databricks apps logsrequires OAuth authentication and does not work with PAT. Usedatabricks apps getfor status checks if using PAT auth.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Create Agent Bricks: Knowledge Assistants (KA) for document Q&A and Supervisor Agents for multi-agent orchestration (MAS).
日本語の概要は準備中です。原文の説明を表示しています。
Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment, ai_similarity, ai_parse_document, ai_prep_search, ai_query, ai_forecast) to add AI capabilities directly to SQL and PySpark pipelines without managing model endpoints. Also covers document parsing and building custom RAG pipelines (parse → prep_search → index → query).
日本語の概要は準備中です。原文の説明を表示しています。
Databricks AI Runtime, the `databricks air` CLI commands for submitting and managing GPU training workloads on Databricks serverless compute. Use for: writing and submitting `databricks air` workload YAML, passing hyperparameters and secrets, checking run status, listing/cancelling runs, streaming a run's logs and watching its progress, custom Docker image setup, and environment configuration.
日本語の概要は準備中です。原文の説明を表示しています。
Create Databricks AI/BI dashboards. Must use when creating, updating, or deploying Lakeview dashboards as Databricks Dashboard have a unique json structure. CRITICAL: You MUST test ALL SQL queries via CLI BEFORE deploying. Follow guidelines strictly.
日本語の概要は準備中です。原文の説明を表示しています。
Design the UX of custom-code Databricks Apps (AppKit/React) data screens — KPI/overview pages, reports, charts, tables, and Genie/chat data assistants — mapped to concrete AppKit components. Use when BUILDING or reviewing the UI of an AppKit/React app that displays data or answers data questions: choosing genre, layout, charts, KPIs, semantic color, required states (loading/empty/error), IBCS notation, and AI-result trust (showing generated SQL/sources for Genie/chat). A plain "create a dashboard" request means a managed AI/BI (Lakeview) dashboard → use databricks-aibi-dashboards, NOT this skill. Also NOT for non-data frontend (forms, settings, auth, marketing) or scaffolding/build/deploy (→ databricks-apps). Complements databricks-apps; use it alongside whenever a custom app has a chart, table, KPI, report, or Genie/chat/AI surface.
日本語の概要は準備中です。原文の説明を表示しています。
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex. **Default for a new Databricks App is `databricks-apps` (AppKit — Node/TypeScript/React) — reach for it first.** Use this skill only when the user asks for a Python backend, extends an existing Python app, or the team is Python-only. Covers OAuth auth, app resources, SQL warehouse and Lakebase connectivity, foundation-model / Vector Search / model-serving APIs (via `databricks-python-sdk`), and deployment via CLI or DABs.
日本語の概要は準備中です。原文の説明を表示しています。