# Update AI Agent Configuration

`PUT /api/agents/{agent_id}`

### Overview
Updates system prompt instructions, temperature, model assignment, or tool configurations of an agent.

### Authentication & Headers
- **Auth**: Bearer Token (Agent Owner or L1 Superadmin)
- **Required Header**: `API-Version: 1`

### Parameters & Request Body Fields
- **`agent_id`** *(path, string, required)*: Unique UUID of the target agent.
- **`name`** *(string, optional)*: Updated name.
- **`description`** *(string, optional)*: Updated summary.
- **`system_instruction`** *(string, optional)*: Updated prompt instruction.
- **`temperature`** *(number, optional)*: Updated temperature setting.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agent_id` | path | string | yes | Unique UUID of the target AI Agent. |

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string \| null | no |  |
| `description` | string \| null | no |  |
| `avatar_url` | string \| null | no |  |
| `model_id` | string \| null | no |  |
| `identity` | string \| null | no |  |
| `mission` | string \| null | no |  |
| `methodology` | string \| null | no |  |
| `boundaries` | string \| null | no |  |
| `examples` | string \| null | no |  |
| `tools` | object[] \| null | no |  |
| `sub_agents` | object[] \| null | no |  |
| `output_key` | string \| null | no |  |
| `output_schema` | object \| null | no |  |
| `input_schema` | object \| null | no |  |
| `generate_content_config` | object \| null | no |  |
| `disallow_transfer_to_parent` | boolean \| null | no |  |
| `disallow_transfer_to_peers` | boolean \| null | no |  |
| `planner` | object \| null | no |  |
| `orchestration_type` | string \| null | no |  |
| `orchestration_config` | object \| null | no |  |
| `canvas_position` | object \| null | no |  |
| `canvas_connections` | object \| null | no |  |
| `allow_personalization` | boolean \| null | no |  |
| `is_sub_agent` | boolean \| null | no |  |

```json
{
  "name": "string",
  "description": "string",
  "avatar_url": "string",
  "model_id": "string",
  "identity": "string",
  "mission": "string",
  "methodology": "string",
  "boundaries": "string",
  "examples": "string",
  "tools": [
    null
  ],
  "sub_agents": [
    null
  ],
  "output_key": "string",
  "output_schema": {},
  "input_schema": {},
  "generate_content_config": {},
  "disallow_transfer_to_parent": true,
  "disallow_transfer_to_peers": true,
  "planner": {},
  "orchestration_type": "string",
  "orchestration_config": {},
  "canvas_position": {},
  "canvas_connections": {},
  "allow_personalization": true,
  "is_sub_agent": true
}
```

## Responses

### 200 — Agent updated successfully

### 400 — Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).

### 401 — Unauthorized - Missing, invalid, or expired JWT Bearer token.

### 403 — Forbidden - Insufficient role permissions or resource access denied by RBAC policy.

### 404 — Not Found - The requested resource ID was not found.

### 422 — Validation Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `detail` | object[] | no |  |
| `detail[].loc` | string | integer[] | yes |  |
| `detail[].msg` | string | yes |  |
| `detail[].type` | string | yes |  |
| `detail[].input` | object | no |  |
| `detail[].ctx` | object | no |  |

```json
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

## Example

```bash
curl -X PUT "$PINTER_URL/api/agents/agnt_risk_compliance_01" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","description":"string","avatar_url":"string","model_id":"string","identity":"string","mission":"string","methodology":"string","boundaries":"string","examples":"string","tools":[null],"sub_agents":[null],"output_key":"string","output_schema":{},"input_schema":{},"generate_content_config":{},"disallow_transfer_to_parent":true,"disallow_transfer_to_peers":true,"planner":{},"orchestration_type":"string","orchestration_config":{},"canvas_position":{},"canvas_connections":{},"allow_personalization":true,"is_sub_agent":true}'
```
