Agent mode

Genie Code runs in Agent mode, which automates multi-step workflows, plans solutions, retrieves relevant assets, runs code, uses cell outputs to improve results, and fixes errors automatically. If you want a direct conversational response without autonomous task execution, say so in your prompt, for example, "Just explain this to me, don't run any code."

To complete tasks, Genie Code sends your prompt and relevant context to the model, including table and column names, descriptions, the code you are working with, data samples from tables, and cell outputs. All data sent to the model respects your Unity Catalog permissions. For details, see Data sent to the models.

Requirements

To use Genie Code's agentic capabilities, your workspace needs the following:

If partner-powered AI features are disabled, Genie Code is still available but without its agentic capabilities, using a Databricks-hosted model.

Approve tool actions

When Genie Code needs to use a tool, like running code, editing a notebook, or querying a table, it asks for your approval before proceeding. You can approve each request individually, or set an approval mode that applies to the rest of your current chat or to all future chats.

Approve a single request

When Genie Code requests permission to use a tool, click Allow to approve the action or Skip to refuse it.

To change how Genie Code handles future approval requests in the current chat, select one of the following from the same prompt:

Option Behavior
Ask every time Genie Code asks for approval every time it uses a tool.
Allow in current chat Genie Code can use the requested tool for the rest of the current chat without asking.
Always allow Genie Code can use the requested tool in every chat without asking.
Auto-approve (Recommended) Genie Code automatically approves tool actions for the rest of the current chat. An AI classifier checks each action against your request and blocks any actions that fall outside its scope.

Set a default approval mode

When you use Genie Code for the first time, the default mode for every chat is Auto-approve. To change the approval mode, set a new default in the Genie Code settings. Click Gear icon. in the Genie Code pane header to open settings.

Choose one of the following:

  • Ask first: Approve each tool when it runs. Per-tool overrides still apply.

  • Auto-approve: An AI classifier reviews each proposed action against your stated intent and approves or blocks each one, minimizing manual approvals while blocking actions that go beyond your intent.

    Important

    Auto-approve is a productivity feature, not a security boundary. The classifier is a best-effort heuristic that can be wrong. It might approve unsafe actions or block safe ones. Do not rely on it to enforce security, compliance, or access-control requirements. Keep auto-approve off when working with production data, sensitive workspaces, or shared resources where the consequences of an incorrect approval matter. You remain responsible for reviewing Genie Code's results.

When auto-approve is on, Genie Code approves the actions needed to carry out your request on resources you own or have referenced. For example, it runs read-only queries, edits your own files and notebooks, writes to tables you own, and runs jobs or pipelines you've already referenced. It also completes an action you explicitly ask for even when that action changes or removes data, such as dropping a table you name or deleting rows from a table you're working in. Auto-approve follows your intent, so it doesn't withhold an action only because the action is destructive.

Genie Code blocks actions that go beyond your request: a destructive change to data you didn't identify (for example, dropping a table you never mentioned), an operation more destructive than your request implies (for example, adding CASCADE to a DROP), or an action that escalates scope or affects shared resources (such as production deployments, permission and secret changes, calls that send data to third parties, and risky source control operations like force pushes).

When an action is blocked, Genie Code receives the reason and adapts, for example by retrying with a narrower scope.

Additional resources