Skip to content

yggdrasil.databricks.assistant

assistant

Databricks Assistant ("Genie") configuration for ygg[databricks].

The in-product Databricks Assistant — the Genie that writes and runs code in notebooks for the user — works best when it routes every operation through the ygg Python API instead of a terminal. Serverless notebooks and jobs cannot shell out (no %sh / !cmd / ygg/databricks CLI), and ygg is already on the pre-built serverless image seeded by ygg databricks deploy. These files teach the Assistant exactly that.

This package is the single source of truth for the three Assistant artifacts:

  • assistant guidance — :func:workspace_instructions (workspace-wide) and :func:user_instructions (per-user preferences),
  • skills — :func:skills, the per-task markdown the Assistant routes to.

ygg databricks deploy deploys them into a workspace via :func:deploy: the workspace bundle (guidance + skills) under /Workspace/Shared and a per-user bundle under /Workspace/Users/<me>, plus a best-effort attempt at any live Assistant-settings API the SDK exposes.

skill_names

skill_names() -> list[str]

Sorted *.md filenames under skills/.

skills

skills() -> dict[str, str]

Map <skill>.md → markdown body for every packaged skill.

workspace_instructions

workspace_instructions() -> str

Workspace-wide Assistant guidance (paste into workspace instructions).

user_instructions

user_instructions() -> str

Per-user Assistant preferences (paste into the user instructions slot).

deploy

deploy(
    client: Any, *, check: bool = False, overwrite: bool = True
) -> "dict[str, Any]"

Deploy (or, with check, verify) the Assistant bundle in a workspace.

Writes the workspace guidance + skills under :data:WORKSPACE_ASSISTANT_DIR and the per-user guidance + skills under :data:USER_ASSISTANT_DIR, then attempts a live Assistant-settings push.

With overwrite=False (append semantics) a file that already exists is left untouched — only missing files are written — and is reported under skipped rather than uploaded.

Returns {"uploaded": [paths], "missing": [paths], "skipped": [paths], "api": status}.