# Update a Knowledge Assistant

Launch stage: Beta

`PATCH /api/2.1/{name=knowledge-assistants/*}`

Updates a Knowledge Assistant.

API scopes: knowledge-assistants

## Path parameters

- `name` (string, required, ID, Immutable)
  The resource name of the Knowledge Assistant.
   Format: knowledge-assistants/{knowledge_assistant_id}

## Query parameters

- `update_mask` (string, required)
  Comma-delimited list of fields to update on the Knowledge Assistant.
   Allowed values: `display_name`, `description`, `instructions`.
   Examples:
   - `display_name`
   - `description,instructions`

## Request body

The Knowledge Assistant update payload.
 Only fields listed in update_mask are updated.
 REQUIRED annotations on Knowledge Assistant fields describe create-time
 requirements and do not mean all those fields are required for update.
- `display_name` (string, ^[\w.-]+$, required)
  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.
  Constraints: `[ 4 .. 63 ] characters`
- `description` (string, required)
  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.
- `instructions` (string, optional)
  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.

## Returns

Returns the KnowledgeAssistant object.

## Response

```json
{
  "name": "string",
  "state": "CREATING",
  "id": "string",
  "display_name": "string",
  "description": "string",
  "instructions": "string",
  "creator": "string",
  "create_time": "string",
  "endpoint_name": "string",
  "experiment_id": "string",
  "error_info": "string"
}
```

