v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
AI Configs

Update AI Config

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"]
  }
patch/api/v2/projects/{projectKey}/ai-configs/{configKey}

Path parameters

projectKeystring required
configKeystring required

Request body

descriptionstring
maintainerIdstring
maintainerTeamKeystring
namestring
tagsstring[]
evaluationMetricKeystring

Evaluation metric key for this AI Config

isInvertedboolean

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

Example request

{
  "maintainerId": "507f1f77bcf86cd799439011",
  "maintainerTeamKey": "example-team-key",
  "name": "name",
  "description": "description",
  "evaluationMetricKey": "evaluationMetricKey",
  "isInverted": true,
  "tags": [
    "tags",
    "tags"
  ]
}

Response

AI Config updated

descriptionstring required
keystring required
mode'agent' | 'completion' | 'judge'
namestring required
tagsstring[] required
versioninteger required
createdAtinteger required
updatedAtinteger required
evaluationMetricKeystring

Evaluation metric key for this AI Config

evaluationMetricKeysstring[]

List of evaluation metric keys for this AI Config

isInvertedboolean

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

Example response

{
  "_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": 9,
  "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"
      }
    ]
  },
  "variations": [
    {
      "judgeConfiguration": {
        "judges": [
          {
            "samplingRate": 0.7061401,
            "judgeConfigKey": "judgeConfigKey"
          },
          {
            "samplingRate": 0.7061401,
            "judgeConfigKey": "judgeConfigKey"
          }
        ]
      },
      "instructions": "instructions",
      "color": "color",
      "_links": {
        "parent": {
          "href": "href",
          "type": "type"
        }
      },
      "description": "description",
      "modelConfigKey": "modelConfigKey",
      "judgingConfigKeys": [
        "judgingConfigKeys",
        "judgingConfigKeys"
      ],
      "version": 1,
      "tools": [
        {
          "customParameters": {
            "key": ""
          },
          "version": 2,
          "key": "key"
        },
        {
          "customParameters": {
            "key": ""
          },
          "version": 2,
          "key": "key"
        }
      ],
      "createdAt": 6,
      "_publishedAt": 5,
      "_archivedAt": 5,
      "name": "name",
      "messages": [
        {
          "role": "role",
          "content": "content"
        },
        {
          "role": "role",
          "content": "content"
        }
      ],
      "comment": "comment",
      "model": "{}",
      "_id": "_id",
      "state": "state",
      "key": "key"
    },
    {
      "judgeConfiguration": {
        "judges": [
          {
            "samplingRate": 0.7061401,
            "judgeConfigKey": "judgeConfigKey"
          },
          {
            "samplingRate": 0.7061401,
            "judgeConfigKey": "judgeConfigKey"
          }
        ]
      },
      "instructions": "instructions",
      "color": "color",
      "_links": {
        "parent": {
          "href": "href",
          "type": "type"
        }
      },
      "description": "description",
      "modelConfigKey": "modelConfigKey",
      "judgingConfigKeys": [
        "judgingConfigKeys",
        "judgingConfigKeys"
      ],
      "version": 1,
      "tools": [
        {
          "customParameters": {
            "key": ""
          },
          "version": 2,
          "key": "key"
        },
        {
          "customParameters": {
            "key": ""
          },
          "version": 2,
          "key": "key"
        }
      ],
      "createdAt": 6,
      "_publishedAt": 5,
      "_archivedAt": 5,
      "name": "name",
      "messages": [
        {
          "role": "role",
          "content": "content"
        },
        {
          "role": "role",
          "content": "content"
        }
      ],
      "comment": "comment",
      "model": "{}",
      "_id": "_id",
      "state": "state",
      "key": "key"
    }
  ],
  "name": "name",
  "key": "key",
  "isInverted": true,
  "updatedAt": 3
}