Agent Control

Update AI Config

PATCH
/api/v2/projects/{projectKey}/ai-configs/{configKey}

Edit an existing AI Config.

The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.

Here's an example:

  {    "description": "Example updated description",    "tags": ["new-tag"]  }

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
configKey*string

Request Body

application/json

AI Config object to update

defaultVariationKey?string

Key of the variation this config serves by default

description?string
maintainerId?string
maintainerTeamKey?string
name?string
tags?array<string>
evaluationMetricKey?string

Evaluation metric key for this config

isInverted?boolean

Whether the evaluation metric is inverted, meaning a lower value is better if set as true

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v2/projects/string/ai-configs/string" \  -H "Content-Type: application/json" \  -d '{    "maintainerId": "507f1f77bcf86cd799439011",    "maintainerTeamKey": "example-team-key",    "name": "name",    "description": "description",    "evaluationMetricKey": "evaluationMetricKey",    "defaultVariationKey": "defaultVariationKey",    "isInverted": true,    "tags": [      "tags",      "tags"    ]  }'
{  "_maintainer": {    "kind": "kind"  },  "_links": {    "parent": {      "href": "href",      "type": "type"    },    "self": {      "href": "href",      "type": "type"    }  },  "description": "description",  "evaluationMetricKey": "evaluationMetricKey",  "version": 0,  "tags": [    "tags",    "tags"  ],  "dependencies": [    {      "type": "agent-graph",      "key": "key"    },    {      "type": "agent-graph",      "key": "key"    }  ],  "mode": "completion",  "createdAt": 2,  "evaluationMetricKeys": [    "evaluationMetricKeys",    "evaluationMetricKeys"  ],  "_access": {    "allowed": [      {        "reason": {          "role_name": "role_name",          "notActions": [            null,            null          ],          "notResources": [            "notResources",            "notResources"          ],          "effect": "allow",          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "actions": [            "*"          ]        },        "action": "action"      },      {        "reason": {          "role_name": "role_name",          "notActions": [            null,            null          ],          "notResources": [            "notResources",            "notResources"          ],          "effect": "allow",          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "actions": [            "*"          ]        },        "action": "action"      }    ],    "denied": [      {        "reason": {          "role_name": "role_name",          "notActions": [            null,            null          ],          "notResources": [            "notResources",            "notResources"          ],          "effect": "allow",          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "actions": [            "*"          ]        },        "action": "action"      },      {        "reason": {          "role_name": "role_name",          "notActions": [            null,            null          ],          "notResources": [            "notResources",            "notResources"          ],          "effect": "allow",          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "actions": [            "*"          ]        },        "action": "action"      }    ]  },  "_site": {    "href": "href",    "type": "type"  },  "variations": [    {      "judgeConfiguration": {        "judges": [          {            "samplingRate": 0.36160767,            "judgeConfigKey": "judgeConfigKey"          },          {            "samplingRate": 0.36160767,            "judgeConfigKey": "judgeConfigKey"          }        ]      },      "instructions": "instructions",      "color": "color",      "_links": {        "parent": {          "href": "href",          "type": "type"        }      },      "description": "description",      "modelConfigKey": "modelConfigKey",      "judgingConfigKeys": [        "judgingConfigKeys",        "judgingConfigKeys"      ],      "version": 5,      "tools": [        {          "customParameters": {            "key": ""          },          "version": 7,          "key": "key"        },        {          "customParameters": {            "key": ""          },          "version": 7,          "key": "key"        }      ],      "skills": [        {          "version": 9,          "key": "key"        },        {          "version": 9,          "key": "key"        }      ],      "createdAt": 1,      "_publishedAt": 2,      "_archivedAt": 5,      "name": "name",      "messages": [        {          "role": "role",          "content": "content"        },        {          "role": "role",          "content": "content"        }      ],      "comment": "comment",      "model": "{}",      "_id": "_id",      "state": "state",      "outputFormat": {        "key": ""      },      "key": "key",      "modelConfigVersion": 6    },    {      "judgeConfiguration": {        "judges": [          {            "samplingRate": 0.36160767,            "judgeConfigKey": "judgeConfigKey"          },          {            "samplingRate": 0.36160767,            "judgeConfigKey": "judgeConfigKey"          }        ]      },      "instructions": "instructions",      "color": "color",      "_links": {        "parent": {          "href": "href",          "type": "type"        }      },      "description": "description",      "modelConfigKey": "modelConfigKey",      "judgingConfigKeys": [        "judgingConfigKeys",        "judgingConfigKeys"      ],      "version": 5,      "tools": [        {          "customParameters": {            "key": ""          },          "version": 7,          "key": "key"        },        {          "customParameters": {            "key": ""          },          "version": 7,          "key": "key"        }      ],      "skills": [        {          "version": 9,          "key": "key"        },        {          "version": 9,          "key": "key"        }      ],      "createdAt": 1,      "_publishedAt": 2,      "_archivedAt": 5,      "name": "name",      "messages": [        {          "role": "role",          "content": "content"        },        {          "role": "role",          "content": "content"        }      ],      "comment": "comment",      "model": "{}",      "_id": "_id",      "state": "state",      "outputFormat": {        "key": ""      },      "key": "key",      "modelConfigVersion": 6    }  ],  "name": "name",  "key": "key",  "isInverted": true,  "updatedAt": 4}