# Update system agent configuration

Updates the configuration of the system agent in the current workspace.

```text
PUT $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/system-agent-setups/{agent_id}
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

Set the operation-specific values used in the request: `$AGENT_ID`.

## Request example

```bash
curl -X PUT "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/system-agent-setups/$AGENT_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "enabled": true,
    "channels": {},
    "knowledge_bases": {}
  }'
```

## Request body

| Parameters | Type | Is it required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | Yes | Whether to enable the system agent. |
| `channels` | object | Yes | Channel selection configured by channel slot key. Each item can contain `instance_id` or `create`. |
| `knowledge_bases` | object | Yes | Knowledge base selection configured by knowledge base slot key. Each item can contain `id` or `create`. |
| `model` | object | No | Model configuration, can contain `model_config_ref`, `default_model`, and `params_override`. |
| `project_scope` | object | No | Project-wide configuration. |
| `suites` | object[] | No | Multi-package namespace scope. |
| `reconciliation_task` | object | No | Reconciliation task configuration, including `cron_expression`. |

`[]` after a type denotes an array. `[]` in a field path denotes each item in an array.

## Successful response

Returns `200` and the updated configuration on success.

```json
{"code":0,"data":{"agent_id":"agent_01"}}
```

The response fields are as follows.

| Field | Type | Description |
| --- | --- | --- |
| `data.agent_id` | string | The system agent ID of the updated configuration. |

## Error response

```json
{"code":2,"message":"invalid setup"}
```
