databricks-agent-bricks
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgent Bricks
Agent Bricks
Agent Bricks are pre-built AI tiles in Databricks that provide conversational interfaces. This skill covers Knowledge Assistants and Supervisor Agents.
| Brick | Purpose | This Skill |
|---|---|---|
| Knowledge Assistant (KA) | Document Q&A using RAG on PDFs/text in Volumes | ✓ |
| Supervisor Agent | Orchestrates multiple agents (KA, endpoints, UC functions, MCP) | ✓ |
Agent Bricks是Databricks中提供对话界面的预制AI组件。本技能涵盖Knowledge Assistant和Supervisor Agent。
| 组件 | 用途 | 本技能覆盖 |
|---|---|---|
| Knowledge Assistant (KA) | 基于Volumes中的PDF/文本,使用RAG实现文档问答 | ✓ |
| Supervisor Agent | 编排多个Agent(KA、端点、UC函数、MCP) | ✓ |
Knowledge Assistant
Knowledge Assistant
bash
undefinedbash
undefinedFind volumes
Find volumes
databricks volumes list CATALOG SCHEMA
databricks experimental aitools tools query --warehouse WH "LIST '/Volumes/catalog/schema/volume/'"
databricks volumes list CATALOG SCHEMA
databricks experimental aitools tools query --warehouse WH "LIST '/Volumes/catalog/schema/volume/'"
Create KA
Create KA
databricks knowledge-assistants create-knowledge-assistant "Name" "Description"
databricks knowledge-assistants create-knowledge-assistant "Name" "Description"
Add knowledge source. With --json, pass ONLY the PARENT as a positional arg
Add knowledge source. With --json, pass ONLY the PARENT as a positional arg
and put display_name / description / source_type / the source body (files|index|file_table)
and put display_name / description / source_type / the source body (files|index|file_table)
inside the JSON. Mixing positional DISPLAY_NAME/DESCRIPTION/SOURCE_TYPE with --json errors.
inside the JSON. Mixing positional DISPLAY_NAME/DESCRIPTION/SOURCE_TYPE with --json errors.
databricks knowledge-assistants create-knowledge-source
"knowledge-assistants/{ka_id}"
--json '{ "display_name": "Docs", "description": "Documentation files", "source_type": "files", "files": {"path": "/Volumes/catalog/schema/volume/"} }'
"knowledge-assistants/{ka_id}"
--json '{ "display_name": "Docs", "description": "Documentation files", "source_type": "files", "files": {"path": "/Volumes/catalog/schema/volume/"} }'
databricks knowledge-assistants create-knowledge-source
"knowledge-assistants/{ka_id}"
--json '{ "display_name": "Docs", "description": "Documentation files", "source_type": "files", "files": {"path": "/Volumes/catalog/schema/volume/"} }'
"knowledge-assistants/{ka_id}"
--json '{ "display_name": "Docs", "description": "Documentation files", "source_type": "files", "files": {"path": "/Volumes/catalog/schema/volume/"} }'
Sync and check status
Sync and check status
databricks knowledge-assistants sync-knowledge-sources "knowledge-assistants/{ka_id}"
databricks knowledge-assistants get-knowledge-assistant "knowledge-assistants/{ka_id}"
databricks knowledge-assistants sync-knowledge-sources "knowledge-assistants/{ka_id}"
databricks knowledge-assistants get-knowledge-assistant "knowledge-assistants/{ka_id}"
List/manage
List/manage
databricks knowledge-assistants list-knowledge-assistants
databricks knowledge-assistants delete-knowledge-assistant "knowledge-assistants/{ka_id}" # destructive & irreversible — confirm the id first
**Source types:** `files` (Volume path) or `index` (Vector Search: `index.index_name`, `index.text_col`, `index.doc_uri_col`)
**Status:** `CREATING` (2-5 min) → `ONLINE` → `OFFLINE`
---databricks knowledge-assistants list-knowledge-assistants
databricks knowledge-assistants delete-knowledge-assistant "knowledge-assistants/{ka_id}" # destructive & irreversible — confirm the id first
**数据源类型:** `files`(Volume路径)或 `index`(向量检索:`index.index_name`, `index.text_col`, `index.doc_uri_col`)
**状态:** `CREATING`(2-5分钟)→ `ONLINE` → `OFFLINE`
---Supervisor Agent
Supervisor Agent
Native CLI: (Beta, requires CLI ≥ v1.0.0). Resource paths look like — every command takes either that full path or a of that shape. and / return bare JSON arrays.
databricks supervisor-agentssupervisor-agents/{id}PARENTlist-supervisor-agentslist-exampleslist-toolsbash
undefined原生CLI:(Beta版本,要求CLI版本≥v1.0.0)。资源路径格式为 —— 所有命令都需传入完整路径或该格式的参数。、/返回纯JSON数组。
databricks supervisor-agentssupervisor-agents/{id}PARENTlist-supervisor-agentslist-exampleslist-toolsbash
undefinedCreate the supervisor agent (display name positional, description/instructions as flags)
Create the supervisor agent (display name positional, description/instructions as flags)
databricks supervisor-agents create-supervisor-agent "My Supervisor"
--description "Routes queries to specialized agents"
--instructions "Route data questions to analyst, document questions to docs_agent."
--description "Routes queries to specialized agents"
--instructions "Route data questions to analyst, document questions to docs_agent."
databricks supervisor-agents create-supervisor-agent "My Supervisor"
--description "Routes queries to specialized agents"
--instructions "Route data questions to analyst, document questions to docs_agent."
--description "Routes queries to specialized agents"
--instructions "Route data questions to analyst, document questions to docs_agent."
→ returns {name: "supervisor-agents/<uuid>", endpoint_name: "mas-<short>-endpoint", ...}
→ returns {name: "supervisor-agents/<uuid>", endpoint_name: "mas-<short>-endpoint", ...}
List / get / find by name
List / get / find by name
databricks supervisor-agents list-supervisor-agents
databricks supervisor-agents get-supervisor-agent supervisor-agents/<id>
databricks supervisor-agents list-supervisor-agents | jq '.[] | select(.display_name == "My Supervisor")'
databricks supervisor-agents list-supervisor-agents
databricks supervisor-agents get-supervisor-agent supervisor-agents/<id>
databricks supervisor-agents list-supervisor-agents | jq '.[] | select(.display_name == "My Supervisor")'
Update — UPDATE_MASK + new DISPLAY_NAME are positional; description/instructions optional flags
Update — UPDATE_MASK + new DISPLAY_NAME are positional; description/instructions optional flags
databricks supervisor-agents update-supervisor-agent supervisor-agents/<id>
"display_name,description,instructions" "My Supervisor (v2)"
--description "..." --instructions "..."
"display_name,description,instructions" "My Supervisor (v2)"
--description "..." --instructions "..."
databricks supervisor-agents update-supervisor-agent supervisor-agents/<id>
"display_name,description,instructions" "My Supervisor (v2)"
--description "..." --instructions "..."
"display_name,description,instructions" "My Supervisor (v2)"
--description "..." --instructions "..."
Delete (destructive & irreversible — confirm the id first)
Delete (destructive & irreversible — confirm the id first)
databricks supervisor-agents delete-supervisor-agent supervisor-agents/<id>
undefineddatabricks supervisor-agents delete-supervisor-agent supervisor-agents/<id>
undefinedTools (the agents the supervisor routes to)
工具(Supervisor路由的目标Agent)
Each tool wires the supervisor to a downstream resource. lives in (the CLI rejects it as a positional when is used). Each type has a type-specific block (, , etc.) whose identifier field differs by type — see the table below.
tool_type--json--jsongenie_spaceknowledge_assistantbash
undefined每个工具用于将Supervisor连接到下游资源。需放在参数中(当使用时,CLI不接受其作为位置参数)。每种类型都有特定类型的配置块(、等),其标识符字段因类型而异——见下表。
tool_type--json--jsongenie_spaceknowledge_assistantbash
undefinedAttach a Genie space — find its space_id with databricks genie list-spaces
databricks genie list-spacesAttach a Genie space — find its space_id with databricks genie list-spaces
databricks genie list-spacesdatabricks supervisor-agents create-tool supervisor-agents/<id> analyst --json '{
"tool_type": "genie_space",
"description": "SQL analytics on the analytics warehouse",
"genie_space": {"id": "<genie_space_id>"}
}'
databricks supervisor-agents create-tool supervisor-agents/<id> analyst --json '{
"tool_type": "genie_space",
"description": "SQL analytics on the analytics warehouse",
"genie_space": {"id": "<genie_space_id>"}
}'
Attach a Knowledge Assistant — find ka_id with databricks knowledge-assistants list-knowledge-assistants
databricks knowledge-assistants list-knowledge-assistantsAttach a Knowledge Assistant — find ka_id with databricks knowledge-assistants list-knowledge-assistants
databricks knowledge-assistants list-knowledge-assistantsdatabricks supervisor-agents create-tool supervisor-agents/<id> docs_agent --json '{
"tool_type": "knowledge_assistant",
"description": "Answers from product documentation",
"knowledge_assistant": {"knowledge_assistant_id": "<ka_id>"}
}'
databricks supervisor-agents create-tool supervisor-agents/<id> docs_agent --json '{
"tool_type": "knowledge_assistant",
"description": "Answers from product documentation",
"knowledge_assistant": {"knowledge_assistant_id": "<ka_id>"}
}'
List / get / delete tools
List / get / delete tools
databricks supervisor-agents list-tools supervisor-agents/<id>
databricks supervisor-agents get-tool supervisor-agents/<id>/tools/<tool_id>
databricks supervisor-agents delete-tool supervisor-agents/<id>/tools/<tool_id>
**Tool types** (`tool_type` value → type-specific block):
| `tool_type` | Block | Use for |
|---|---|---|
| `genie_space` | `{"id": "<space_id>"}` | Natural language → SQL via Genie |
| `knowledge_assistant` | `{"knowledge_assistant_id": "<ka_id>"}` | Document Q&A via a KA |
| `uc_function` | `{"name": "catalog.schema.func"}` | UC SQL/Python function |
| `uc_connection` | `{"name": "<connection_name>"}` | External MCP server via UC HTTP Connection |
| `volume` | `{"name": "<full_volume_name>"}` | UC Volume browsing |
| `app` | `{"name": "<app_name>"}` | Databricks App |
| Other types (`serving_endpoint`, `lakeview_dashboard`, `supervisor_agent`, `uc_table`, `vector_search_index`, `catalog`, `schema`, `web_search`) | Block name and field shape vary | Run `databricks supervisor-agents create-tool --help` and probe — these were not verified end-to-end here. |databricks supervisor-agents list-tools supervisor-agents/<id>
databricks supervisor-agents get-tool supervisor-agents/<id>/tools/<tool_id>
databricks supervisor-agents delete-tool supervisor-agents/<id>/tools/<tool_id>
**工具类型**(`tool_type`值 → 对应特定配置块):
| `tool_type` | 配置块 | 适用场景 |
|---|---|---|
| `genie_space` | `{"id": "<space_id>"}` | 通过Genie实现自然语言转SQL |
| `knowledge_assistant` | `{"knowledge_assistant_id": "<ka_id>"}` | 通过KA实现文档问答 |
| `uc_function` | `{"name": "catalog.schema.func"}` | UC SQL/Python函数 |
| `uc_connection` | `{"name": "<connection_name>"}` | 通过UC HTTP连接对接外部MCP服务器 |
| `volume` | `{"name": "<full_volume_name>"}` | UC Volume浏览 |
| `app` | `{"name": "<app_name>"}` | Databricks应用 |
| 其他类型(`serving_endpoint`, `lakeview_dashboard`, `supervisor_agent`, `uc_table`, `vector_search_index`, `catalog`, `schema`, `web_search`) | 配置块名称和字段格式各不相同 | 运行`databricks supervisor-agents create-tool --help`查看详情——本文未对这些类型进行端到端验证。 |Examples (training the supervisor)
示例(训练Supervisor)
Examples must use — the positional arg doesn't accept any encoding because guidelines is a .
--jsonGUIDELINESrepeated stringbash
databricks supervisor-agents create-example supervisor-agents/<id> --json '{
"question": "What were Q4 revenue numbers?",
"guidelines": ["Route to analyst Genie space", "Always group by region"]
}'
databricks supervisor-agents list-examples supervisor-agents/<id>
databricks supervisor-agents get-example supervisor-agents/<id>/examples/<ex_id>
databricks supervisor-agents delete-example supervisor-agents/<id>/examples/<ex_id>Endpoint readiness: after , the serving endpoint takes up to ~10 minutes to come online before it can answer queries. returns the endpoint name immediately, but querying it is gated on the endpoint's own readiness — check via .
create-supervisor-agentget-supervisor-agentdatabricks serving-endpoints get <endpoint_name>示例必须使用参数——位置参数不接受任何编码,因为guidelines是类型。
--jsonGUIDELINESrepeated stringbash
databricks supervisor-agents create-example supervisor-agents/<id> --json '{
"question": "What were Q4 revenue numbers?",
"guidelines": ["Route to analyst Genie space", "Always group by region"]
}'
databricks supervisor-agents list-examples supervisor-agents/<id>
databricks supervisor-agents get-example supervisor-agents/<id>/examples/<ex_id>
databricks supervisor-agents delete-example supervisor-agents/<id>/examples/<ex_id>端点就绪状态: 创建后,服务端点需要约10分钟才能上线并响应查询。会立即返回端点名称,但查询需等待端点就绪——可通过检查状态。
supervisor-agentget-supervisor-agentdatabricks serving-endpoints get <endpoint_name>Reference
参考资料
| Topic | File |
|---|---|
| KA source types, index, troubleshooting | references/1-knowledge-assistants.md |
| UC functions, MCP servers, examples | references/2-supervisor-agents.md |
| 主题 | 文件 |
|---|---|
| KA数据源类型、索引、故障排除 | references/1-knowledge-assistants.md |
| UC函数、MCP服务器、示例 | references/2-supervisor-agents.md |