> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mithunai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Change an assistant's knowledge or model

> Change an assistant's name, knowledge collections, model, instruction or status. Send the revision you last read, so a concurrent edit is reported, not lost.

Every body field is optional. A field you leave out, or send as `null`, is left unchanged, except `instruction`, where `null` clears it. The request must change at least one field, or it fails with `400`.

Send the `revision` you last read to guard against concurrent edits. If someone else has updated the assistant since, the request fails with `409` and nothing is changed; read the assistant again and retry. If you omit `revision`, your change is applied over whatever is stored.

An assistant that does not exist, belongs to another organization, or has a malformed ID returns `404`. Updating an assistant requires the owner, admin or editor role.

## Status values

| Status     | Meaning                                                                                                                       |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `active`   | Configured and answering. New conversations can start.                                                                        |
| `disabled` | Configured but not answering. New conversations cannot start.                                                                 |
| `archived` | Retired. Kept so existing conversations still resolve their assistant. Hidden from `GET /assistants` unless you filter on it. |

Only an `active` assistant with at least one knowledge base is `answerable`. There is no delete route; archiving is how you retire an assistant, and you can set it back to `active` later.

<ParamField path="assistant_id" type="string" required>
  The assistant's ID (UUID).
</ParamField>

<ParamField body="name" type="string">
  New display name. Trimmed; must be 1 to 120 characters on a single line, with no control,
  invisible formatting or line-separator characters. Must not match another assistant's name in your
  organization, or the request fails with `409`.
</ParamField>

<ParamField body="knowledge_base_ids" type="string[]">
  Replaces the full list of knowledge bases. At most 20 after duplicates are removed. Each must
  exist in your organization, or the request fails with `400`. Send `[]` to remove them all, which
  makes the assistant not `answerable`.
</ParamField>

<ParamField body="model" type="string">
  New model selector, `provider/model` or a bare model name. The provider must be one the platform
  supports, and a bare model name must match exactly one model in the platform's catalogue, or the
  request fails with `400`.
</ParamField>

<ParamField body="instruction" type="string">
  New instruction, cleaned the same way as on create. Text longer than 8,000 characters is cut and
  ends with ` […truncated]`. Send `""` or `null` to clear the instruction; leave the field out to
  keep it unchanged.
</ParamField>

<ParamField body="description" type="string">
  New description, up to 500 characters on a single line. Send `""` to clear it.
</ParamField>

<ParamField body="status" type="string">
  New lifecycle status: `active`, `disabled` or `archived`.
</ParamField>

<ParamField body="revision" type="integer">
  The `revision` you last read, a whole number of at least `1`. A stale value returns `409`.
</ParamField>

## Response

Returns the updated assistant. `revision` is one higher than before.

<ResponseField name="id" type="string" required>
  The assistant's ID (UUID).
</ResponseField>

<ResponseField name="name" type="string" required>
  Display name.
</ResponseField>

<ResponseField name="description" type="string" required>
  Description. Empty string when none is set.
</ResponseField>

<ResponseField name="status" type="string" required>
  `active`, `disabled` or `archived`.
</ResponseField>

<ResponseField name="model" type="string" required>
  The model selector.
</ResponseField>

<ResponseField name="knowledge_base_ids" type="string[]" required>
  Knowledge bases the assistant answers from.
</ResponseField>

<ResponseField name="instruction" type="string | null" required>
  The stored instruction, or `null` when there is none.
</ResponseField>

<ResponseField name="answerable" type="boolean" required>
  `true` when the assistant is `active` and has at least one knowledge base.
</ResponseField>

<ResponseField name="revision" type="integer" required>
  The new concurrency revision.
</ResponseField>

<ResponseField name="created_at" type="string | null" required>
  When the assistant was created, ISO 8601 in UTC. Treat a value without an offset as UTC.
</ResponseField>

<ResponseField name="updated_at" type="string | null" required>
  When the assistant was last changed, ISO 8601 in UTC.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl --request PATCH "$MITHUNAI_URL/arukz/api/v1/assistants/5b1e9c2a-7d4f-4e3b-9a61-0c8f2d7e4a13" \
    --header "Authorization: Bearer $MITHUNAI_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{"status": "disabled", "revision": 1}'
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os, requests

  assistant_id = "5b1e9c2a-7d4f-4e3b-9a61-0c8f2d7e4a13"
  response = requests.patch(
      f"{os.environ['MITHUNAI_URL']}/arukz/api/v1/assistants/{assistant_id}",
      headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
      json={"status": "disabled", "revision": 1},
      timeout=60,
  )
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const assistantId = '5b1e9c2a-7d4f-4e3b-9a61-0c8f2d7e4a13'
  const response = await fetch(`${process.env.MITHUNAI_URL}/arukz/api/v1/assistants/${assistantId}`, {
    method: 'PATCH',
    headers: {
      Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ status: 'disabled', revision: 1 }),
  })
  console.log(await response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "5b1e9c2a-7d4f-4e3b-9a61-0c8f2d7e4a13",
    "name": "Developer docs assistant",
    "description": "Answers questions on the developer portal",
    "status": "disabled",
    "model": "anthropic/claude-sonnet-5",
    "knowledge_base_ids": ["a3c7e1f0-2b9d-4c56-8e14-7f0a9b3d6e21"],
    "instruction": "Answer for developers integrating the public API. Prefer code samples.",
    "answerable": false,
    "revision": 2,
    "created_at": "2026-09-20T14:03:11.482190",
    "updated_at": "2026-09-21T08:15:42.907113+00:00"
  }
  ```

  ```json 400 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "validation_error", "message": "The update contained no changes." }
  ```

  ```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "not_found", "message": "The requested resource was not found." }
  ```

  ```json 409 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "conflict", "message": "The assistant changed while this request was in progress." }
  ```
</ResponseExample>
