Blue Guardrails

Create Optimization Run

POST
/v1/optimization-runs

Validate immutable inputs and create a pending optimization run.

Header Parameters

x-workspace-id?|

Workspace UUID for session-authenticated calls.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Create a run with an explicit agent capability configuration.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/optimization-runs" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "agent_configuration": {},    "goal": "string",    "inputs": {},    "config": {      "agent_model": "standard"    }  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "goal": "string",  "status": "preparing",  "can_retry": false,  "config": {    "agent_model": "standard",    "evaluator_id": "92c2c259-25b9-47e2-bc3b-bd161a87f750",    "models_in_scope": [      "string"    ],    "max_experiments": 0  },  "usage": {    "agent_turns": 0,    "agent_input_tokens": 0,    "agent_cached_input_tokens": 0,    "agent_output_tokens": 0,    "agent_reasoning_tokens": 0,    "experiments_created": 0  },  "created_by_user_id": "209f54c4-4c33-43bc-9c6a-ef4c65ad7473",  "created_by_user_name": "string",  "created_by_service_account_id": "5434fcf1-291e-49ce-ac43-2f469070b2f5",  "created_by_service_account_name": "string",  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "retry_idle_ms": 0,  "agent_config_tree": {    "root": {      "kind": "agent",      "children": [        {          "kind": "skill",          "snapshot_position": 0,          "placeholder_name": "string",          "children": [            null          ]        }      ]    }  },  "subagents": [    {      "position": 0,      "source_subagent_id": "0790dfa5-c520-474f-aa0c-b361599f686a",      "recommended_agent_tier": "standard",      "name": "string",      "description": "string",      "system_prompt": "string",      "builtin_tool_keys": [        "string"      ]    }  ],  "inputs": {    "conversation_ids": [      "b68e40f1-a2f7-46b1-9573-c91137e3f6fd"    ],    "experiment_ids": [      "9e3f5157-4d53-4d9c-b5ac-6ac40503c530"    ],    "context": "string",    "files": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "filename": "string",        "media_type": "string",        "size_bytes": 0,        "sha256": "string"      }    ]  },  "skills": [    {      "position": 0,      "source_skill_id": "a6c19203-f435-41a5-b152-83f1b43fab0f",      "name": "string",      "description": "string",      "builtin_tool_keys": [        "string"      ],      "package_sha256": "string",      "size_bytes": 0    }  ],  "connected_tools": [    {      "source_tool_id": "74a38abf-7e64-4140-b1fa-1fd7cbdfc853",      "selected_tool_ref": "dff2cd6c-1c33-4dc1-84a3-718a008a8abf",      "display_name": "string",      "model_facing_name": "string",      "description": "string",      "tool_provider_name": "string",      "tool_provider_kind": "string"    }  ],  "created_experiments": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "model": "string",      "completed_at": "2019-08-24T14:15:22Z"    }  ],  "report": {    "format": "markdown",    "content": "string",    "created_at": "2019-08-24T14:15:22Z",    "assets": [      {        "type": "vega-lite",        "file_name": "string",        "content": "string",        "sha256": "string",        "size_bytes": 0      }    ]  },  "deliverables": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "file_name": "string",      "size_bytes": 0,      "sha256": "string"    }  ],  "suggested_prompts": [    {      "file_name": "string",      "content": "string"    }  ],  "error": {    "code": "string",    "message": "string"  }}