# Create

`POST /api/2.1/knowledge-assistants`

Creates a Knowledge Assistant.

API scopes: knowledge-assistants

## Request body

- `knowledge_assistant` (object, optional)
  The Knowledge Assistant to create.
  - `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.

## 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"
}
```

