Agent Control

Create AI Config variation

POST
/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations

Create a new variation for a given AI Config.

The model in the request body requires a modelName and parameters, for example:

  "model": {    "modelName": "claude-3-opus-20240229",    "parameters": {      "max_tokens": 1024    }  }

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
configKey*string

Request Body

application/json

AI Config variation object to create

comment?string

Human-readable description of this variation

description?string

Returns the description for the agent. This is only returned for agent variations.

instructions?string

Returns the instructions for the agent. This is only returned for agent variations.

key*string
messages?array<>
model?
name*string
modelConfigKey?string
modelConfigVersion?integer

The exact model config version to set this variation to. Requires modelConfigKey to be set, and the version must exist for that model config. When omitted, the variation records the model config's current (latest) version.

Range1 <= value
outputFormat?

JSON Schema defining the structured output format for the variation.

tools?array<>

List of tools to use for this variation. The latest version of the tool will be used.

toolKeys?array<string>

List of tool keys to use for this variation. The latest version of the tool will be used.

skills?array<>

List of agent skills to attach to this variation.

judgeConfiguration?

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/projects/string/ai-configs/string/variations" \  -H "Content-Type: application/json" \  -d '{    "judgeConfiguration": {      "judges": [        {          "samplingRate": 0.36160767,          "judgeConfigKey": "judgeConfigKey"        },        {          "samplingRate": 0.36160767,          "judgeConfigKey": "judgeConfigKey"        }      ]    },    "instructions": "instructions",    "description": "description",    "modelConfigKey": "modelConfigKey",    "tools": [      {        "version": 6,        "key": "key"      },      {        "version": 6,        "key": "key"      }    ],    "skills": [      {        "version": 1,        "key": "key"      },      {        "version": 1,        "key": "key"      }    ],    "toolKeys": [      "toolKeys",      "toolKeys"    ],    "name": "name",    "messages": [      {        "role": "role",        "content": "content"      },      {        "role": "role",        "content": "content"      }    ],    "comment": "comment",    "model": "{}",    "outputFormat": {      "key": ""    },    "key": "key",    "modelConfigVersion": 1  }'
{  "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}