Agent Control

Create agent optimization result

POST
/api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/results

Create a new result for an agent optimization run.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
optimizationKey*string

Request Body

application/json

Agent optimization result to create

runId*string
Formatuuid
agentOptimizationVersion*integer
iteration*integer
instructions*string
userInput*string
parameters?

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/projects/string/agent-optimizations/string/results" \  -H "Content-Type: application/json" \  -d '{    "instructions": "instructions",    "agentOptimizationVersion": 0,    "iteration": 6,    "runId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",    "userInput": "userInput",    "parameters": {      "key": ""    }  }'
{  "instructions": "instructions",  "generationTokens": {    "key": ""  },  "completedAt": 5,  "activity": "PENDING",  "_links": {    "parent": {      "href": "href",      "type": "type"    },    "self": {      "href": "href",      "type": "type"    }  },  "scores": {    "key": ""  },  "variation": {    "key": ""  },  "evaluationLatencies": {    "key": ""  },  "createdVariationKey": "createdVariationKey",  "evaluationTokens": {    "key": ""  },  "createdAt": 5,  "agentOptimizationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",  "generationLatency": 1,  "_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"      }    ]  },  "agentOptimizationVersion": 0,  "completionResponse": "completionResponse",  "iteration": 6,  "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",  "runId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",  "userInput": "userInput",  "parameters": {    "key": ""  },  "status": "RUNNING",  "updatedAt": 2}