Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nextchanges/air/air-run-help-skill.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `databricks air run --help` now shows how to install the databricks-ai-runtime coding agent skill. ([#7628](https://github.com/databricks/cli/pull/7628))
5 changes: 5 additions & 0 deletions acceptance/air/config-help/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ field, pass its path to -h as a separate argument:
databricks air run -h config.compute one section
databricks air run -h config.compute.accelerator_type one field

To have a coding agent write the YAML and follow the run, install the
databricks-ai-runtime skill:

databricks aitools install --skills-only --skills databricks-ai-runtime

Usage:
databricks air run [flags]

Expand Down
9 changes: 9 additions & 0 deletions cmd/air/air_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,12 @@ func TestRunErrorOmitsDebugTipWhenDebugEnabled(t *testing.T) {
assert.Same(t, originalErr, err)
assert.NotContains(t, err.Error(), "use the --debug flag")
}

func TestRunHelpPointsToAgentSkill(t *testing.T) {
run := findSubcommand(t, New(), "run")
var out bytes.Buffer
run.SetOut(&out)
run.HelpFunc()(run, nil)
assert.Contains(t, out.String(), "databricks-ai-runtime skill")
assert.Contains(t, out.String(), " "+skillInstallCommand+"\n")
}
7 changes: 6 additions & 1 deletion cmd/air/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ field, pass its path to -h as a separate argument:

databricks air run -h config all fields
databricks air run -h config.compute one section
databricks air run -h config.compute.accelerator_type one field`,
databricks air run -h config.compute.accelerator_type one field

To have a coding agent write the YAML and follow the run, install the
databricks-ai-runtime skill:

` + skillInstallCommand,
Example: ` # Submit and stream logs until the run finishes
databricks air run -f workload.yaml --watch

Expand Down
6 changes: 5 additions & 1 deletion cmd/air/runconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,11 +922,15 @@ func renderConfigField(w io.Writer, f configField, computeOptions []computeOptio
}
}

// skillInstallCommand installs the databricks-ai-runtime agent skill. Help
// pages that point coding agents at the skill share it.
const skillInstallCommand = "databricks aitools install --skills-only --skills databricks-ai-runtime"

// agentSkillHelp closes `-h config`: users look up the schema while writing
// YAML, which is when an agent skill that writes it for them is most useful.
const agentSkillHelp = `
Let a coding agent write this YAML for you with the databricks-ai-runtime skill:
databricks aitools install --skills-only --skills databricks-ai-runtime
` + skillInstallCommand + `
(add --scope project to install into the current project)
https://github.com/databricks/databricks-agent-skills/tree/main/skills/databricks-ai-runtime
`
Expand Down
Loading