# Update

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

Updates a Knowledge Assistant.

API scopes: knowledge-assistants

## Path parameters

- `knowledge_assistant` (object, optional)
  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.
  - `name` (string, optional)
    The resource name of the Knowledge Assistant.
     Format: knowledge-assistants/{knowledge_assistant_id}
  - `state` (string, optional)
    State of the Knowledge Assistant. Not returned in List responses.
    Possible values: `STATE_UNSPECIFIED`, `CREATING`, `ACTIVE`, `FAILED`
  - `id` (string, optional)
    Deprecated: use knowledge_assistant_id instead.
  - `display_name` (string, optional)
    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, optional)
    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.
  - `creator` (string, optional)
    The creator of the Knowledge Assistant.
  - `create_time` (string, optional)
    Creation timestamp.
  - `endpoint_name` (string, optional)
    The name of the knowledge assistant agent endpoint.
  - `experiment_id` (string, optional)
    The MLflow experiment ID.
  - `error_info` (string, optional)
    Error details when the Knowledge Assistant is in FAILED state.

## Query parameters

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

## Returns

Returns the KnowledgeAssistant object.

## Response

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

