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

# Update Agent

> Updates the data of an agent.

## Endpoint

`PUT https://gateway.orkeia.ai/agents/{id}`

## Headers

```
authorization:  <your_token>
Content-Type: application/json
```

### Path Parameters

```json theme={null}
{
  "id": "Agent ID (required)"
}
```

### Request Body

All fields of Agents, except for the id, are mutable.

| Field          | Type                                 | Description                                                                                                                                     |
| -------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| name           | string                               | Name of the agent                                                                                                                               |
| enabled        | boolean                              | Whether the agent is active                                                                                                                     |
| model          | string / Model                       | ID of the model or AI model                                                                                                                     |
| auto           | boolean                              | Whether the agent is active                                                                                                                     |
| reasoning      | boolean                              | Whether the agent has permission to process thought                                                                                             |
| publisher      | string                               | ID of who created the agent                                                                                                                     |
| temperature    | number (0.0 to 1.0)                  | Controls the randomness of the model's responses. Values closer to 0 tend to be more deterministic, while closer to 1 tend to be more variable. |
| role           | string                               | Role that the agent will play                                                                                                                   |
| objective      | string                               | Objective of the agent in each interaction                                                                                                      |
| referencies    | string                               | Textual reference that the agent will use                                                                                                       |
| can.delegate   | boolean                              | Can the agent delegate tasks?                                                                                                                   |
| can\_code      | boolean                              | Can the agent program?                                                                                                                          |
| multimodal     | boolean                              | Does the agent have the ability to interact with multiple modes (image, text, audio)?                                                           |
| sectors        | array(String)                        | Array of sectors that will use the agent                                                                                                        |
| tools          | array(String) / array(Tools)         | Array of tools that the agent can use                                                                                                           |
| knowledgeBases | array(String) / array(KnowledgeBase) | Array of knowledge bases that can be used by the agent                                                                                          |

```json theme={null}
{
  "name": "New agent name",
  "enabled": true
}
```

### Example (cURL)

```bash theme={null}
curl -X PUT "https://gateway.orkeia.ai/agents/agent123" \
  -H "authorization:  <your_token>" \
  -H "Content-Type: application/json" \
  -d '{ "name": "New agent name", "enabled": true}'
```

## Responses

### Response - Success

```json theme={null}
{
"status": "OK",
   "data": { "true" }
}
```

### 500 — Bad Request

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```
