---
schema_version: "1"
id: f13aac7dddcac47d2acc7f28f245de3879c02bc854aae9ec17a57c1d64c6d493
title: Adding a Scanner for Databricks Agent Bricks
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/exchange/adding-databricks-agent-bricks-scanner.md
canonical_url: https://docs.mulesoft.com/exchange/adding-databricks-agent-bricks-scanner
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 20d01095b7dc02be66be8cf9b9daf2684056f82dfffe21f6ccfdba8cf13f22fb
description: MuleSoft Documentation Site
latest: true
---
---
product: Exchange
---

# Adding a Scanner for Databricks Agent Bricks

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Add a scanner to discover, import, and sync agents from Databricks Agent Bricks into Exchange. Then
you can govern the agents and consume them in other applications.

## Before You Begin

Before adding the scanner, verify that you have these prerequisites:

- Exchange Administrator permission

- Databricks Workspace access

- Workspace URL

- Databricks client ID

- Databricks client secret

- Service Principal requires CAN\_QUERY permission on each serving endpoint to enable full discovery
  and invocation.

  Use the Databricks Permissions API:

  ```json
  PATCH /api/2.0/permissions/serving-endpoints/{endpoint_id}
  {
    "access_control_list": [
      {
        "service_principal_name": "<clientId>",
        "permission_level": "CAN_QUERY"
      }
    ]
  }
  ```

  <table><colgroup><col> <col></colgroup><thead><tr><th>API Endpoint</th><th>Required Permission</th></tr></thead><tbody><tr><td><p>GET /api/2.0/serving-endpoints</p></td><td><p>CAN_VIEW or higher</p></td></tr><tr><td><p>GET /api/2.0/serving-endpoints/{name}</p></td><td><p>CAN_VIEW or higher</p></td></tr><tr><td><p>GET /api/2.0/serving-endpoints/{name}/openapi</p></td><td><p>CAN_VIEW or higher</p></td></tr><tr><td><p>POST /serving-endpoints/{name}/invocations</p></td><td><p>CAN_QUERY or higher</p></td></tr></tbody></table>

## Agent Discoverability

Not all Databricks endpoints are discoverable by the scanner. Before running a scan, confirm that
the scanner can discover your agent. === What the Scanner Discovers

<table><colgroup><col> <col></colgroup><thead><tr><th>Requirement</th><th>Required Value</th></tr></thead><tbody><tr><td><p>Deployment type</p></td><td><p>Model Serving Endpoint</p></td></tr><tr><td><p>Model source</p></td><td><p>Custom model registered in Unity Catalog</p></td></tr><tr><td><p>Entity name pattern</p></td><td><p><code>catalog.schema.model_name</code> (for example, <code>ml_catalog.agents.customer_support_v2</code>)</p></td></tr><tr><td><p>Endpoint state</p></td><td><p><code>READY</code></p></td></tr></tbody></table>

### What the Scanner Doesn’t Discover

<table><colgroup><col> <col></colgroup><thead><tr><th>Agent Type</th><th>Exclusion Reason</th></tr></thead><tbody><tr><td><p>Foundation models (GPT, Claude, Llama, Gemini, and so on)</p></td><td><p>These are platform-provided models, not custom agents.</p></td></tr><tr><td><p>External models</p></td><td><p>These are hosted outside Databricks.</p></td></tr><tr><td><p>Knowledge Assistants (Agent Builder)</p></td><td><p>These use a foundation model internally and aren’t registered as a custom Unity Catalog model.</p></td></tr><tr><td><p>Databricks Apps</p></td><td><p>These use a different deployment path and aren’t Model Serving Endpoints.</p></td></tr></tbody></table>

### Make an Agent Discoverable

If you built your agent with Databricks Agent Builder (for example, a Knowledge Assistant), it isn’t
discovered automatically. To make it scannable:

1.  Log the agent with MLflow, the Databricks framework for model logging and tracking.

    Use `mlflow.langchain.log_model()` or `mlflow.pyfunc.log_model()` in a notebook.

2.  Register the model in Unity Catalog.

    Register the model under a catalog and schema (for example,
    `my_catalog.my_schema.knowledge_assistant_mulesoft`).

3.  Deploy the model as a Serving Endpoint.

    Create a Model Serving Endpoint from the registered Unity Catalog model.

4.  Grant permissions to the scanner service principal.

    The service principal used in the scanner must have at least **CAN\_QUERY** on the endpoint.

    After this deployment, the scanner discovers the agent in the next scan.

### Quick Check

Run this API call with your service principal credentials to verify what the scanner can see:

`GET [https://<workspace-url>/api/2.0/serving-endpoints](https://\<workspace-url\>/api/2.0/serving-endpoints)`

Look for your agent in the response. If `served_entities[0].entity_name` follows the
`catalog.schema.model_name` pattern, the scanner discovers it.

## Add a Scanner for Databricks Agent Bricks

1.  Verify that you are in the business group where you want to add the scanner.

2.  From the sidebar in Exchange, click **Scanners**.

3.  Enter a name for the scanner.

4.  From **Scanner Run Configuration**, complete these fields or options:

    <table><colgroup><col> <col></colgroup><thead><tr><th><strong>Field/Option</strong></th><th><strong>Value</strong></th></tr></thead><tbody><tr><td><p><strong>Run Schedule</strong></p></td><td><p>Select a frequency and time.</p></td></tr><tr><td><p><strong>Sync Review</strong></p></td><td><p>Select an option: <strong>Auto-resolve</strong> or <strong>Ask to review</strong>.</p></td></tr></tbody></table>

5.  From **Connection Configuration**, complete these fields:

    <table><colgroup><col> <col></colgroup><thead><tr><th><strong>Field</strong></th><th><strong>Value</strong></th></tr></thead><tbody><tr><td><p><strong>Provider</strong></p></td><td><p>Select <strong>Databricks</strong>.</p></td></tr><tr><td><p><strong>Platform</strong></p></td><td><p>Select <strong>Agent Bricks</strong>.</p></td></tr><tr><td><p><strong>Service Type</strong></p></td><td><p>Select <strong>Agents</strong> selected by default.</p></td></tr><tr><td><p><strong>Authentication Method</strong></p></td><td><p><strong>OAuth</strong> selected by default.</p></td></tr><tr><td><p><strong>Workspace URL</strong></p></td><td><p>Enter the workspace URL.</p></td></tr><tr><td><p><strong>Client ID</strong></p></td><td><p>Enter the client ID.</p></td></tr><tr><td><p><strong>Client Secret</strong></p></td><td><p>Enter the client secret.</p></td></tr></tbody></table>

6.  Click **Test Connection**.

    If the connection fails, review the **Connection Configuration** settings. Update the settings,
    and then test the connection again.

7.  To send email notifications:

    1.  Select **Advanced Settings** and turn on **Send Email Notifications**.

    2.  Enter an email address.

8.  Click **Add Scanner**.

## See Also

- [Agent Scanners](https://docs.mulesoft.com/exchange/agent-scanners)

- [Discovering and Cataloging External Services with Scanners](https://docs.mulesoft.com/exchange/discovering-and-importing-external-agents)

- [Managing Scanners In Exchange](https://docs.mulesoft.com/exchange/managing-scanners)
