knowledge_assistants
Creates, updates, deletes, gets or lists a knowledge_assistants resource.
Overview​
| Name | knowledge_assistants |
| Type | Resource |
| Id | databricks_workspace.knowledgeassistants.knowledge_assistants |
Fields​
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Deprecated: use knowledge_assistant_id instead. |
name | string | The resource name of the Knowledge Assistant. Format: knowledge-assistants/{knowledge_assistant_id} |
experiment_id | string | The MLflow experiment ID. |
display_name | string | The display name of the Knowledge Assistant, unique at workspace level. Required when creating a Knowledge Assistant. When updating a Knowledge Assistant, optional unless included in update_mask. |
endpoint_name | string | The name of the knowledge assistant agent endpoint. |
create_time | string (date-time) | Creation timestamp. |
creator | string | The creator of the Knowledge Assistant. |
description | string | Description of what this agent can do (user-facing). Required when creating a Knowledge Assistant. When updating a Knowledge Assistant, optional unless included in update_mask. |
error_info | string | Error details when the Knowledge Assistant is in FAILED state. |
instructions | string | Additional global instructions on how the agent should generate answers. Optional on create and update. When updating a Knowledge Assistant, include this field in update_mask to modify it. |
state | string | State of the Knowledge Assistant. Not returned in List responses. (ACTIVE, CREATING, FAILED) |
| Name | Datatype | Description |
|---|---|---|
id | string | Deprecated: use knowledge_assistant_id instead. |
name | string | The resource name of the Knowledge Assistant. Format: knowledge-assistants/{knowledge_assistant_id} |
experiment_id | string | The MLflow experiment ID. |
display_name | string | The display name of the Knowledge Assistant, unique at workspace level. Required when creating a Knowledge Assistant. When updating a Knowledge Assistant, optional unless included in update_mask. |
endpoint_name | string | The name of the knowledge assistant agent endpoint. |
create_time | string (date-time) | Creation timestamp. |
creator | string | The creator of the Knowledge Assistant. |
description | string | Description of what this agent can do (user-facing). Required when creating a Knowledge Assistant. When updating a Knowledge Assistant, optional unless included in update_mask. |
error_info | string | Error details when the Knowledge Assistant is in FAILED state. |
instructions | string | Additional global instructions on how the agent should generate answers. Optional on create and update. When updating a Knowledge Assistant, include this field in update_mask to modify it. |
state | string | State of the Knowledge Assistant. Not returned in List responses. (ACTIVE, CREATING, FAILED) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | knowledge_assistant_id, deployment_name, workspace_domain | Gets a Knowledge Assistant. | |
list | select | deployment_name, workspace_domain | page_size, page_token | List Knowledge Assistants |
create | insert | deployment_name, workspace_domain, display_name, description | Creates a Knowledge Assistant. | |
update | update | knowledge_assistant_id, update_mask, deployment_name, workspace_domain, display_name, description | Updates a Knowledge Assistant. | |
delete | delete | knowledge_assistant_id, deployment_name, workspace_domain | Deletes a Knowledge Assistant. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks workspace deployment name: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME) |
knowledge_assistant_id | string | The knowledge_assistant_id segment of the name resource name (knowledge-assistants/{knowledge_assistant_id}). The resource name of the knowledge assistant to be deleted. Format: knowledge-assistants/{knowledge_assistant_id} |
update_mask | object | Comma-delimited list of fields to update on the Knowledge Assistant. Allowed values: display_name, description, instructions. Examples: - display_name - description,instructions |
workspace_domain | string | The Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}}) |
page_size | integer | The maximum number of knowledge assistants to return. If unspecified, at most 100 knowledge assistants will be returned. The maximum value is 100; values above 100 will be coerced to 100. |
page_token | string | A page token, received from a previous ListKnowledgeAssistants call. Provide this to retrieve the subsequent page. If unspecified, the first page will be returned. |
SELECT examples​
- get
- list
Gets a Knowledge Assistant.
SELECT
id,
name,
experiment_id,
display_name,
endpoint_name,
create_time,
creator,
description,
error_info,
instructions,
state
FROM databricks_workspace.knowledgeassistants.knowledge_assistants
WHERE knowledge_assistant_id = '{{ knowledge_assistant_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
;
List Knowledge Assistants
SELECT
id,
name,
experiment_id,
display_name,
endpoint_name,
create_time,
creator,
description,
error_info,
instructions,
state
FROM databricks_workspace.knowledgeassistants.knowledge_assistants
WHERE deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples​
- create
- Manifest
Creates a Knowledge Assistant.
INSERT INTO databricks_workspace.knowledgeassistants.knowledge_assistants (
display_name,
description,
create_time,
creator,
endpoint_name,
error_info,
experiment_id,
id,
instructions,
name,
state,
deployment_name,
workspace_domain
)
SELECT
'{{ display_name }}' /* required */,
'{{ description }}' /* required */,
'{{ create_time }}',
'{{ creator }}',
'{{ endpoint_name }}',
'{{ error_info }}',
'{{ experiment_id }}',
'{{ id }}',
'{{ instructions }}',
'{{ name }}',
'{{ state }}',
'{{ deployment_name }}',
'{{ workspace_domain }}'
RETURNING
id,
name,
experiment_id,
display_name,
endpoint_name,
create_time,
creator,
description,
error_info,
instructions,
state
;
# Description fields are for documentation purposes
- name: knowledge_assistants
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the knowledge_assistants resource.
- name: workspace_domain
value: "{{ workspace_domain }}"
description: Required parameter for the knowledge_assistants resource.
- name: display_name
value: "{{ display_name }}"
description: |
The display name of the Knowledge Assistant, unique at workspace level. Required when creating a Knowledge Assistant. When updating a Knowledge Assistant, optional unless included in update_mask.
- name: description
value: "{{ description }}"
description: |
Description of what this agent can do (user-facing). Required when creating a Knowledge Assistant. When updating a Knowledge Assistant, optional unless included in update_mask.
- name: create_time
value: "{{ create_time }}"
description: |
Creation timestamp.
- name: creator
value: "{{ creator }}"
description: |
The creator of the Knowledge Assistant.
- name: endpoint_name
value: "{{ endpoint_name }}"
description: |
The name of the knowledge assistant agent endpoint.
- name: error_info
value: "{{ error_info }}"
description: |
Error details when the Knowledge Assistant is in FAILED state.
- name: experiment_id
value: "{{ experiment_id }}"
description: |
The MLflow experiment ID.
- name: id
value: "{{ id }}"
description: |
Deprecated: use knowledge_assistant_id instead.
- name: instructions
value: "{{ instructions }}"
description: |
Additional global instructions on how the agent should generate answers. Optional on create and update. When updating a Knowledge Assistant, include this field in update_mask to modify it.
- name: name
value: "{{ name }}"
description: |
The resource name of the Knowledge Assistant. Format: knowledge-assistants/{knowledge_assistant_id}
- name: state
value: "{{ state }}"
description: |
State of the Knowledge Assistant. Not returned in List responses.
UPDATE examples​
- update
Updates a Knowledge Assistant.
UPDATE databricks_workspace.knowledgeassistants.knowledge_assistants
SET
display_name = '{{ display_name }}',
description = '{{ description }}',
create_time = '{{ create_time }}',
creator = '{{ creator }}',
endpoint_name = '{{ endpoint_name }}',
error_info = '{{ error_info }}',
experiment_id = '{{ experiment_id }}',
id = '{{ id }}',
instructions = '{{ instructions }}',
name = '{{ name }}',
state = '{{ state }}'
WHERE
knowledge_assistant_id = '{{ knowledge_assistant_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
AND display_name = '{{ display_name }}' --required
AND description = '{{ description }}' --required
RETURNING
id,
name,
experiment_id,
display_name,
endpoint_name,
create_time,
creator,
description,
error_info,
instructions,
state;
DELETE examples​
- delete
Deletes a Knowledge Assistant.
DELETE FROM databricks_workspace.knowledgeassistants.knowledge_assistants
WHERE knowledge_assistant_id = '{{ knowledge_assistant_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
;