{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Orchestrator API",
    "description": "API for managing AI agents and tools",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/agents/types": {
      "get": {
        "tags": [
          "agent_management"
        ],
        "summary": "Get Agent Types",
        "description": "Retrieve the list of supported agent types (e.g., rag, tool, task) along with their descriptions and capabilities.\n\n**Status Codes:**\n- `200`: Agent types retrieved successfully\n- `400`: Validation error (invalid query parameters)\n- `500`: Internal server error",
        "operationId": "get_agent_types_v1_agents_types_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTypeInfoList"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents": {
      "get": {
        "tags": [
          "agent_management"
        ],
        "summary": "Get All Agents",
        "description": "Retrieve metadata for all agents available to the current tenant, including global agents. Use the optional `is_global` query parameter to filter by global or tenant-specific agents, and `solutionKey` to filter by the agent's current solution assignment (case-sensitive exact match).\n\n**Status Codes:**\n- `200`: Agents retrieved successfully\n- `400`: Validation error (invalid query parameters)\n- `500`: Internal server error",
        "operationId": "get_all_agents_v1_agents_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "is_global",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Global"
            }
          },
          {
            "name": "solutionKey",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Solutionkey"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentListModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "agent_management"
        ],
        "summary": "Create Agent",
        "description": "Create a new agent with an initial version. Requires a name, description, agent type, and configuration. The agent type determines which invocation endpoints to use (invoke for RAG/Tool agents, invoke-task for Task agents).\n\nWhen `validateOnly=true`, all validations run but no agent is persisted.\n\n**Status Codes:**\n- `200`: Validation passed (validateOnly=true)\n- `201`: Agent created successfully\n- `400`: Validation error (invalid input)\n- `409`: Conflict (agent already exists)\n- `500`: Internal server error\n- `503`: Passport Service credentials are not configured for this environment",
        "operationId": "create_agent_v1_agents_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCreateModel"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentModel"
                    },
                    {
                      "$ref": "#/components/schemas/ValidateOnlyResponseModel"
                    }
                  ],
                  "title": "Response Create Agent V1 Agents Post"
                }
              }
            }
          },
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidateOnlyResponseModel"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/versions": {
      "get": {
        "tags": [
          "agent_management"
        ],
        "summary": "Get Agent Versions",
        "description": "Retrieve all versions of a specific agent, including their metadata.\n\n**Status Codes:**\n- `200`: Agent versions retrieved successfully\n- `400`: Validation error (invalid query parameters)\n- `404`: Agent not found\n- `500`: Internal server error",
        "operationId": "get_agent_versions_v1_agents__agent_id__versions_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionListModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "agent_management"
        ],
        "summary": "Add Agent Version",
        "description": "Add a new version to an existing agent with updated configuration. The new version becomes the current version of the agent.\n\nWhen `validateOnly=true`, all validations run but no version is persisted.\n\n**Status Codes:**\n- `200`: Agent version created successfully (or validation passed when validateOnly=true)\n- `400`: Validation error (invalid input)\n- `404`: Agent not found\n- `500`: Internal server error\n- `503`: Passport Service credentials are not configured for this environment",
        "operationId": "add_agent_version_v1_agents__agent_id__versions_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentUpdateModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentVersionModel"
                    },
                    {
                      "$ref": "#/components/schemas/ValidateOnlyResponseModel"
                    }
                  ],
                  "title": "Response Add Agent Version V1 Agents  Agent Id  Versions Post",
                  "$ref": "#/components/schemas/ValidateOnlyResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/versions/{version_id}": {
      "get": {
        "tags": [
          "agent_management"
        ],
        "summary": "Get Agent Version",
        "description": "Retrieve the full configuration and metadata for a specific version of an agent. Use `latest` as the version_id to get the most recent version.\n\n**Status Codes:**\n- `200`: Agent version retrieved successfully\n- `400`: Validation error (invalid parameters)\n- `404`: Agent or version not found\n- `500`: Internal server error",
        "operationId": "get_agent_version_v1_agents__agent_id__versions__version_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "string"
                }
              ],
              "title": "Version Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/versions/batch-get": {
      "post": {
        "tags": [
          "agent_management"
        ],
        "summary": "Get Agent Versions Batch",
        "description": "Get agents and their latest versions for a batch of agent IDs.\n    \n**Batch Limits:** Maximum 100 agent IDs allowed per request.\n\n    **Status Codes:**\n    - `200`: Agent versions retrieved successfully\n    - `400`: Validation error (invalid input or exceeds batch limit)\n    - `500`: Internal server error",
        "operationId": "get_agent_versions_batch_v1_agents_versions_batch_get_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVersionsBatchRequestModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionsBatchResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/agents/lookup": {
      "post": {
        "tags": [
          "agent_management"
        ],
        "summary": "Lookup Agent",
        "description": "Look up an agent by name and optional version label. Returns the agent and its matching version if found.\n\n**Status Codes:**\n- `200`: Agent found successfully\n- `400`: Validation error (invalid input)\n- `404`: Agent not found\n- `500`: Internal server error",
        "operationId": "lookup_agent_v1_agents_lookup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentLookupRequestModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/agents/{agent_id}": {
      "delete": {
        "tags": [
          "agent_management"
        ],
        "summary": "Delete Agent",
        "description": "Permanently delete an agent along with all its versions.\n\n**Status Codes:**\n- `200`: Agent deleted successfully\n- `400`: Validation error (invalid parameters)\n- `404`: Agent not found\n- `500`: Internal server error",
        "operationId": "delete_agent_v1_agents__agent_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDeleteModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "agent_management"
        ],
        "summary": "Patch Agent",
        "description": "Update an agent's name, display name, and/or description. Does not modify agent versions or configuration.\n\nWhen `validateOnly=true`, all validations run (including name conflict checks) but no changes are persisted.\n\n**Status Codes:**\n- `200`: Agent updated successfully (or validation passed when validateOnly=true)\n- `400`: Validation error (invalid input)\n- `403`: Forbidden (cannot update global agents)\n- `404`: Agent not found\n- `409`: Conflict (name conflict)\n- `500`: Internal server error",
        "operationId": "patch_agent_v1_agents__agent_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPatchModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AgentModel"
                    },
                    {
                      "$ref": "#/components/schemas/ValidateOnlyResponseModel"
                    }
                  ],
                  "title": "Response Patch Agent V1 Agents  Agent Id  Patch",
                  "$ref": "#/components/schemas/ValidateOnlyResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/settings": {
      "patch": {
        "tags": [
          "agent_management"
        ],
        "summary": "Patch Agent Settings",
        "description": "Update settings for specified agent of the current tenant.\nUnspecified fields are not modified",
        "operationId": "patch_agent_settings_v1_agents__agent_id__settings_patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentSettingsUpdateModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSettingsResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "agent_management"
        ],
        "summary": "Get Agent Settings",
        "description": "Retrieve settings for specified agent of the current tenant",
        "operationId": "get_agent_settings_v1_agents__agent_id__settings_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSettingsResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/solutions": {
      "get": {
        "tags": [
          "solutions"
        ],
        "summary": "List solutions with agent counts",
        "description": "List distinct solution keys carried by the current tenant's agents and global agents.\n\nEach entry includes agentCount, the latest agent modifiedAt, and invokedAt\n(the latest agent lastInvokedAt). invokedAt is omitted if no visible agent has\nbeen invoked. Ordering remains based on modifiedAt. Counts match\nGET /v1/agents?solutionKey=<key> for the same caller. Keys are case-sensitive;\nagents with missing or null keys are excluded. Results are ordered by modifiedAt\ndescending, then solutionKey ascending. Pagination totalItems counts solutions.\nSolutions disappear when no visible agents carry their key.",
        "operationId": "list_solutions_v1_solutions_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolutionListResponse"
                }
              }
            }
          },
          "403": {
            "description": "READ permission is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionDeniedModel"
                }
              }
            }
          },
          "503": {
            "description": "The database is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "agent_management"
        ],
        "summary": "Get Supported Models",
        "description": "Retrieve the list of supported LLM models with their capabilities, supported agent types, and deprecation status. Use `filter[agentType]` to filter models compatible with a specific agent type (e.g., rag, tool, task).\n\n**Status Codes:**\n- `200`: Models retrieved successfully\n- `400`: Validation error (invalid query parameters)\n- `500`: Internal server error",
        "operationId": "get_supported_models_v1_models_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "filter[agentType]",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AgentType"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMModelList"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/guardrails": {
      "get": {
        "tags": [
          "agent_management"
        ],
        "summary": "Get Supported Guardrails",
        "description": "Retrieve the list of available guardrails that can be applied to agent invocations. Guardrails are policy-based content filters (e.g., profanity, insults, hate speech) that can be configured at agent creation or passed per invocation.\n\n**Status Codes:**\n- `200`: Guardrails retrieved successfully\n- `400`: Validation error (invalid query parameters)\n- `500`: Internal server error",
        "operationId": "get_supported_guardrails_v1_guardrails_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailList"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/versions/{version_id}/invoke": {
      "post": {
        "tags": [
          "agent_invocation"
        ],
        "summary": "Invoke Agent",
        "description": "Invoke an agent with the provided messages and return the complete response. Use `latest` as the version_id to invoke the most recent version. The request body accepts messages, optional guardrails, and agent-type-specific parameters such as hxqlQuery for RAG agents.\n\n**Status Codes:**\n- `200`: Agent invoked successfully\n- `400`: Validation error (invalid input, extra/unknown fields, or incompatible agent type)\n- `404`: Agent or version not found\n- `500`: Internal server error\n- `502`: The model's response was cut off because it reached the configured max_tokens limit. Increase `inferenceConfig.maxTokens` and retry.\n- `504`: The agent did not respond within the synchronous invocation deadline. It is **not** cancelled \u2014 it keeps executing and shows up in observability once it finishes, identified there by the `X-Correlation-ID` header returned on this response. Use the async run API (`POST /v1/agents/{agent_id}/runs`) to avoid waiting at all.",
        "operationId": "invoke_agent_v1_agents__agent_id__versions__version_id__invoke_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "string"
                }
              ],
              "title": "Version Id"
            }
          },
          {
            "$ref": "#/components/parameters/UserAgentHeader"
          },
          {
            "$ref": "#/components/parameters/SessionIdHeader"
          },
          {
            "$ref": "#/components/parameters/CorrelationIdHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequestBaseSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Either the resolved agent version (or an agent it references) is not admitted by the environment's Agent Passport policy, with a machine-readable `errorCode` (PassportRefusalErrorModel), or the caller lacks a required permission (PermissionDeniedModel, `detail` only). Treat every 403 as a refusal, including unrecognized errorCode values.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PassportRefusalErrorModel"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedModel"
                    }
                  ],
                  "title": "Response 403 Invoke Agent V1 Agents  Agent Id  Versions  Version Id  Invoke Post"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - The model's response was cut off because it reached the configured max_tokens limit"
          },
          "504": {
            "description": "Gateway Timeout - The agent did not respond within the synchronous invocation deadline. The agent keeps executing; the response's X-Correlation-ID header identifies it in the platform's traces."
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/versions/{version_id}/invoke-stream": {
      "post": {
        "tags": [
          "agent_invocation"
        ],
        "summary": "[EXPERIMENTAL] Invoke an agent with streaming response",
        "description": "Invoke an agent and receive the response as a stream of chunks. Each chunk is a valid JSON object containing a portion of the response. Use `latest` as the version_id to invoke the most recent version.\n\n**Status Codes:**\n- `200`: Streaming response started successfully\n- `400`: Validation error (invalid input, extra/unknown fields, or incompatible agent type)\n- `404`: Agent or version not found\n- `500`: Internal server error",
        "operationId": "invoke_agent_stream_v1_agents__agent_id__versions__version_id__invoke_stream_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "string"
                }
              ],
              "title": "Version Id"
            }
          },
          {
            "$ref": "#/components/parameters/UserAgentHeader"
          },
          {
            "$ref": "#/components/parameters/SessionIdHeader"
          },
          {
            "$ref": "#/components/parameters/CorrelationIdHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequestBaseSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stream of newline-delimited JSON chunks (text/event-stream). Each line is a JSON object whose shape is determined by the `type` discriminator field.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "discriminator": {
                    "mapping": {
                      "response.completed": "#/components/schemas/CompletedChunk",
                      "response.created": "#/components/schemas/CreatedChunk",
                      "response.function_call_arguments.done": "#/components/schemas/ToolCallChunk",
                      "response.incomplete": "#/components/schemas/IncompleteChunk",
                      "response.output_text.delta": "#/components/schemas/TextDelta"
                    },
                    "propertyName": "type"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CreatedChunk"
                    },
                    {
                      "$ref": "#/components/schemas/TextDelta"
                    },
                    {
                      "$ref": "#/components/schemas/ToolCallChunk"
                    },
                    {
                      "$ref": "#/components/schemas/CompletedChunk"
                    },
                    {
                      "$ref": "#/components/schemas/IncompleteChunk"
                    }
                  ]
                },
                "example": "{\"type\":\"response.output_text.delta\",\"delta\":\"Hello\",\"id\":\"msg_01\",\"role\":\"assistant\"}\n{\"type\":\"response.completed\",\"response\":{\"id\":\"resp_01\",\"model\":\"amazon.nova-micro-v1:0\",\"object\":\"response\",\"createdAt\":1741705447,\"output\":[{\"type\":\"message\",\"status\":\"completed\",\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"Hello world\"}]}]}}"
              }
            }
          },
          "403": {
            "description": "Forbidden. Either the resolved agent version (or an agent it references) is not admitted by the environment's Agent Passport policy, with a machine-readable `errorCode` (PassportRefusalErrorModel), or the caller lacks a required permission (PermissionDeniedModel, `detail` only). Treat every 403 as a refusal, including unrecognized errorCode values.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PassportRefusalErrorModel"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedModel"
                    }
                  ],
                  "title": "Response 403 Invoke Agent Stream V1 Agents  Agent Id  Versions  Version Id  Invoke Stream Post"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files": {
      "post": {
        "tags": [
          "agent_invocation",
          "experimental"
        ],
        "summary": "[EXPERIMENTAL] Create file upload session",
        "description": "Creates a new file upload session by generating a presigned PUT URL for\ndirect S3 upload with server-side size enforcement.\n\nClients must PUT the raw file bytes to the returned ``uploadUrl`` with\nthe correct ``Content-Type`` and ``Content-Length`` headers.\n\nBoth headers are signed into the URL via SigV4, so S3 rejects any PUT\nwhere either header is missing or differs from the declared values.",
        "operationId": "create_file_upload_v1_files_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/agents/{agent_id}/versions/{version_id}/invoke-task": {
      "post": {
        "tags": [
          "agent_invocation"
        ],
        "summary": "Invoke Task",
        "description": "Invoke a Task agent with structured inputs validated against the agent's input schema. Unlike RAG/Tool agents that accept messages, Task agents accept key-value inputs that are rendered into the system prompt template. Use `latest` as the version_id to invoke the most recent version.\n\n**Status Codes:**\n- `200`: Task agent invoked successfully\n- `400`: Validation error (invalid input, extra/unknown fields, or incompatible agent type)\n- `404`: Agent or version not found\n- `500`: Internal server error\n- `502`: The model's response was cut off because it reached the configured max_tokens limit. Increase `inferenceConfig.maxTokens` and retry.\n- `504`: The agent did not respond within the synchronous invocation deadline. It is **not** cancelled \u2014 it keeps executing and shows up in observability once it finishes, identified there by the `X-Correlation-ID` header returned on this response. Use the async run API (`POST /v1/agents/{agent_id}/runs`) to avoid waiting at all.",
        "operationId": "invoke_task_v1_agents__agent_id__versions__version_id__invoke_task_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "string"
                }
              ],
              "title": "Version Id"
            }
          },
          {
            "$ref": "#/components/parameters/UserAgentHeader"
          },
          {
            "$ref": "#/components/parameters/SessionIdHeader"
          },
          {
            "$ref": "#/components/parameters/CorrelationIdHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRequestBaseSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Either the resolved agent version (or an agent it references) is not admitted by the environment's Agent Passport policy, with a machine-readable `errorCode` (PassportRefusalErrorModel), or the caller lacks a required permission (PermissionDeniedModel, `detail` only). Treat every 403 as a refusal, including unrecognized errorCode values.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PassportRefusalErrorModel"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedModel"
                    }
                  ],
                  "title": "Response 403 Invoke Task V1 Agents  Agent Id  Versions  Version Id  Invoke Task Post"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - The model's response was cut off because it reached the configured max_tokens limit"
          },
          "504": {
            "description": "Gateway Timeout - The agent did not respond within the synchronous invocation deadline. The agent keeps executing; the response's X-Correlation-ID header identifies it in the platform's traces."
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/versions/{version_id}/invoke-task-stream": {
      "post": {
        "tags": [
          "agent_invocation"
        ],
        "summary": "[EXPERIMENTAL] Invoke task agent with streaming response",
        "description": "Invoke a Task agent with structured inputs and receive the response as a stream of chunks. Each chunk is a valid JSON object containing a portion of the response. Use `latest` as the version_id to invoke the most recent version.\n\n**Status Codes:**\n- `200`: Streaming response started successfully\n- `400`: Validation error (invalid input, extra/unknown fields, or incompatible agent type)\n- `404`: Agent or version not found\n- `500`: Internal server error",
        "operationId": "invoke_task_stream_v1_agents__agent_id__versions__version_id__invoke_task_stream_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "string"
                }
              ],
              "title": "Version Id"
            }
          },
          {
            "$ref": "#/components/parameters/UserAgentHeader"
          },
          {
            "$ref": "#/components/parameters/SessionIdHeader"
          },
          {
            "$ref": "#/components/parameters/CorrelationIdHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRequestBaseSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stream of newline-delimited JSON chunks (text/plain). Each line is a JSON object whose shape is determined by the `type` discriminator field.",
            "content": {
              "text/plain": {
                "schema": {
                  "discriminator": {
                    "mapping": {
                      "response.completed": "#/components/schemas/CompletedChunk",
                      "response.created": "#/components/schemas/CreatedChunk",
                      "response.function_call_arguments.done": "#/components/schemas/ToolCallChunk",
                      "response.incomplete": "#/components/schemas/IncompleteChunk",
                      "response.output_text.delta": "#/components/schemas/TextDelta"
                    },
                    "propertyName": "type"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CreatedChunk"
                    },
                    {
                      "$ref": "#/components/schemas/TextDelta"
                    },
                    {
                      "$ref": "#/components/schemas/ToolCallChunk"
                    },
                    {
                      "$ref": "#/components/schemas/CompletedChunk"
                    },
                    {
                      "$ref": "#/components/schemas/IncompleteChunk"
                    }
                  ]
                },
                "example": "{\"type\":\"response.output_text.delta\",\"delta\":\"Hello\",\"id\":\"msg_01\",\"role\":\"assistant\"}\n{\"type\":\"response.completed\",\"response\":{\"id\":\"resp_01\",\"model\":\"amazon.nova-micro-v1:0\",\"object\":\"response\",\"createdAt\":1741705447,\"output\":[{\"type\":\"message\",\"status\":\"completed\",\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"Hello world\"}]}]}}"
              }
            }
          },
          "403": {
            "description": "Forbidden. Either the resolved agent version (or an agent it references) is not admitted by the environment's Agent Passport policy, with a machine-readable `errorCode` (PassportRefusalErrorModel), or the caller lacks a required permission (PermissionDeniedModel, `detail` only). Treat every 403 as a refusal, including unrecognized errorCode values.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PassportRefusalErrorModel"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedModel"
                    }
                  ],
                  "title": "Response 403 Invoke Task Stream V1 Agents  Agent Id  Versions  Version Id  Invoke Task Stream Post"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers": {
      "post": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Create MCP Server",
        "description": "Create a new MCP server with enhanced authentication and validation.\n\n**Status Codes:**\n- `201`: Server created successfully\n- `400`: Invalid input (validation errors, bad auth config)\n- `403`: Forbidden (attempting to create public server)\n- `409`: Conflict (duplicate name or URL in environment)\n- `500`: Internal server error",
        "operationId": "create_mcp_server_v1_mcp_servers_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerCreateModel"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "MCP server created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Not authorized to create public servers"
          },
          "409": {
            "description": "Conflict - Server with this ID, name or URL already exists in your environment"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server failure"
          }
        }
      },
      "get": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "List MCP Servers",
        "description": "Get all MCP servers for the current tenant and global servers.\n\nReturns both private servers from your environment and public servers.\n\n**Status Codes:**\n- `200`: Servers retrieved successfully\n- `400`: Validation error (invalid query parameters)\n- `500`: Internal server error",
        "operationId": "get_mcp_servers_v1_mcp_servers_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of MCP servers retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerListModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - Failed to retrieve servers"
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers/{server_id}": {
      "get": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Get MCP Server",
        "description": "Get a specific MCP server by ID.\n\nReturns server details if accessible (private server in your environment or public server).\n\n**Status Codes:**\n- `200`: Server retrieved successfully\n- `400`: Validation error (invalid parameters)\n- `404`: Server not found or not accessible\n- `500`: Internal server error",
        "operationId": "get_mcp_server_v1_mcp_servers__server_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Server Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "MCP server retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerModel"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Server does not exist or is not accessible"
          },
          "500": {
            "description": "Internal Server Error - Failed to retrieve server"
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Update MCP Server",
        "description": "Update an existing MCP server.\n\nOnly private servers in your environment can be updated. Public servers cannot be updated.\n\n**Status Codes:**\n- `200`: Server updated successfully\n- `400`: Invalid input (validation errors, bad auth config)\n- `403`: Forbidden (attempting to update public server or server from another environment)\n- `404`: Server not found\n- `409`: Conflict (duplicate name or URL after update)\n- `500`: Internal server error",
        "operationId": "update_mcp_server_v1_mcp_servers__server_id__put",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Server Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MCPServerUpdateModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MCP server updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Not authorized to update this server (public servers cannot be updated)"
          },
          "404": {
            "description": "Not Found - Server does not exist"
          },
          "409": {
            "description": "Conflict - Server with updated name or URL already exists in your environment"
          },
          "500": {
            "description": "Internal Server Error - Failed to update server"
          }
        }
      },
      "delete": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Delete MCP Server",
        "description": "Delete an MCP server.\n\nOnly private servers in your environment can be deleted. Public servers cannot be deleted.\nDeleting a server also removes all associated authentication secrets.\n\n**Status Codes:**\n- `200`: Server deleted successfully\n- `400`: Validation error (invalid parameters)\n- `403`: Forbidden (attempting to delete public server or server from another environment)\n- `404`: Server not found\n- `500`: Internal server error",
        "operationId": "delete_mcp_server_v1_mcp_servers__server_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Server Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "MCP server deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerDeleteModel"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Not authorized to delete this server (public servers cannot be deleted)"
          },
          "404": {
            "description": "Not Found - Server does not exist"
          },
          "500": {
            "description": "Internal Server Error - Failed to delete server"
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers/{server_id}/validate": {
      "post": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Validate MCP Server On-Demand",
        "description": "Trigger on-demand validation of an existing MCP server.\n\nPerforms immediate synchronous validation by executing an MCP protocol\nhandshake with the server. Returns validation results including health\nstatus, validation state, and any failures encountered.\n\n**Use Cases:**\n- Re-validate server after configuration changes\n- Troubleshoot connectivity issues\n- Verify server health before operations\n- Refresh server information (version, protocol)\n\n**Behavior:**\n- Synchronous operation - returns results immediately\n- Updates server state: status, validationState, healthState, lastValidatedAt\n- MCP handshake timeout: Configured per-server (default 180s)\n\n**Status Codes:**\n- `200`: Validation completed (check validationState: validated or failed)\n- `400`: Validation error (invalid parameters)\n- `403`: Not authorized (requires CREATE or EDIT permission, must be in same environment)\n- `404`: Server not found\n- `500`: Internal server error\n\n**Important:**\n- Validation failure returns `200 OK` with `validationState: \"failed\"`\n- Check `failures` array for detailed error information\n- System errors return `500` (validation couldn't execute)",
        "operationId": "validate_mcp_server_v1_mcp_servers__server_id__validate_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Server Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Validation completed - check validationState field for success/failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerValidationResultModel"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Not authorized to validate this server"
          },
          "404": {
            "description": "Not Found - Server does not exist"
          },
          "500": {
            "description": "Internal Server Error - Unexpected failure"
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers/{server_id}/tools": {
      "get": {
        "tags": [
          "mcp_servers"
        ],
        "summary": "Get MCP Server Tools",
        "description": "Get tools from a specific MCP server using the MCP Protocol.\n\nConnects to the MCP server and retrieves available tools using the MCP protocol.\n\n**Status Codes:**\n- `200`: Tools retrieved successfully\n- `400`: Validation error (invalid parameters)\n- `403`: Forbidden - Access to server is forbidden\n- `404`: Server not found or not accessible\n- `500`: Internal server error\n- `502`: Bad Gateway - Failed to get valid response from MCP server",
        "operationId": "get_mcp_server_tools_v1_mcp_servers__server_id__tools_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Server Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "MCP server tools retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MCPServerToolsModel"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Not authorized to access this server"
          },
          "404": {
            "description": "Not Found - Server does not exist or is not accessible"
          },
          "500": {
            "description": "Internal Server Error - Failed to retrieve tools"
          },
          "502": {
            "description": "Bad Gateway - Failed to get valid response from MCP server (timeout, connection refused, or malformed response)"
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/environment-settings": {
      "get": {
        "tags": [
          "environment-settings"
        ],
        "summary": "List Sections",
        "description": "List every registered settings namespace for the caller's environment.\n\nNamespaces without a stored row are returned with their default (`revision: 0`,\n`source: DEFAULT`). No ETag: nothing writes the collection.\n\n**Status Codes:**\n- `200`: Sections returned\n- `403`: Caller lacks `environment-settings.read`\n- `503`: A stored section could not be read",
        "operationId": "list_sections_v1_environment_settings_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentSettingsCollectionModel"
                }
              }
            }
          },
          "403": {
            "description": "Caller lacks `environment-settings.read`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionDeniedModel"
                }
              }
            }
          },
          "503": {
            "description": "A stored section could not be read, or the database is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/environment-settings/{namespace}": {
      "get": {
        "tags": [
          "environment-settings"
        ],
        "summary": "Get Section",
        "description": "Get one settings section, with a strong `ETag` to send back as `If-Match`.\n\nFor `passport`, `REQUIRED_FOR_ALL` means all *tenant-authored* agents: global\n(platform-authored) agents are exempt in every mode.\n\n**Status Codes:**\n- `200`: Section returned (the default when none is stored)\n- `403`: Caller lacks `environment-settings.read`\n- `404`: Unknown namespace\n- `503`: The stored section could not be read",
        "operationId": "get_section_v1_environment_settings__namespace__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "namespace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Namespace"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentSettingsSectionModel"
                }
              }
            }
          },
          "403": {
            "description": "Caller lacks `environment-settings.read`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionDeniedModel"
                }
              }
            }
          },
          "404": {
            "description": "Unknown namespace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "503": {
            "description": "A stored section could not be read, or the database is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "environment-settings"
        ],
        "summary": "Put Section",
        "description": "Replace one settings section. `If-Match` is required.\n\nSend the section's `ETag` as `If-Match`, quotes included (e.g. `\"passport-v2-4\"`):\nthe surrounding `\"` characters are part of the entity-tag value itself. `*` replaces unconditionally and forfeits lost-update\nprotection; use it only for break-glass automation. The `200` carries no `ETag`;\nits body's `revision` builds the next tag (`\"<generation>-<revision>\"`).\n\n**Status Codes:**\n- `200`: Section replaced\n- `400`: Invalid body, or malformed `If-Match`\n- `403`: Caller lacks `environment-settings.edit`\n- `404`: Unknown namespace\n- `412`: `If-Match` did not match; the response's `ETag` is the current one\n- `428`: `If-Match` missing\n- `503`: Writes are not yet activated in this deployment, the policy lock is busy,\n  or the database is unavailable (retryable)",
        "operationId": "put_section_v1_environment_settings__namespace__put",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "namespace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Namespace"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentSettingsSectionModel"
                }
              }
            }
          },
          "403": {
            "description": "Caller lacks `environment-settings.edit`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionDeniedModel"
                }
              }
            }
          },
          "404": {
            "description": "Unknown namespace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "503": {
            "description": "Writes are not yet activated in this deployment, the policy lock is busy, or the database is unavailable. Retryable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "412": {
            "description": "`If-Match` did not match. The response's `ETag` is the current one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "The full section, replacing the stored one. Body model by namespace: `passport` \u2192 PassportEnvironmentSettingsWrite.",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PassportEnvironmentSettingsWrite"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/v1/environment-settings/{namespace}/impact": {
      "get": {
        "tags": [
          "environment-settings"
        ],
        "summary": "Get Impact",
        "description": "Live, advisory preview of what each mode would refuse. No ETag, never cached.\n\nAgent data can change between this preview and a later write; `settingsEtag` lets\nthe subsequent `PUT` pin the mode it was computed against.\n\n**Status Codes:**\n- `200`: Preview returned\n- `403`: Caller lacks `environment-settings.read`\n- `404`: Unknown namespace, or the namespace has no impact preview",
        "operationId": "get_impact_v1_environment_settings__namespace__impact_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "namespace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Namespace"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassportImpactModel"
                }
              }
            }
          },
          "403": {
            "description": "Caller lacks `environment-settings.read`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionDeniedModel"
                }
              }
            }
          },
          "404": {
            "description": "Unknown namespace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "503": {
            "description": "A stored section could not be read, or the database is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/runs": {
      "post": {
        "tags": [
          "runs"
        ],
        "summary": "Create Run",
        "description": "Create a new run for the specified agent.\n\nInserts a run row with status 'queued' and returns the full run resource.\nIf versionId is omitted, defaults to the agent's current version.\n\n**Status Codes:**\n- `201`: Run created and queued\n- `400`: Unsupported async agent type or invalid invocation payload, including\n  missing required task inputs or incorrect input types; no run is created\n- `403`: Refused by passport admission at enqueue; the run is recorded as failed\n  with the same `errorCode`\n- `404`: Agent or version not found",
        "operationId": "create_run_v1_agents__agent_id__runs_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRunRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunModel"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Either the resolved agent version (or an agent it references) is not admitted by the environment's Agent Passport policy, with a machine-readable `errorCode` (PassportRefusalErrorModel), or the caller lacks a required permission (PermissionDeniedModel, `detail` only). Treat every 403 as a refusal, including unrecognized errorCode values.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PassportRefusalErrorModel"
                    },
                    {
                      "$ref": "#/components/schemas/PermissionDeniedModel"
                    }
                  ],
                  "title": "Response 403 Create Run V1 Agents  Agent Id  Runs Post"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "List Runs",
        "description": "List runs for an agent, scoped to the current tenant.\n\n**Query Parameters:**\n- `status` \u2014 Filter by run status (queued, in_progress, completed, failed, cancelling, cancelled)\n- `offset` \u2014 Pagination offset (default: 0)\n- `limit` \u2014 Pagination limit (default: 50)\n\n**Status Codes:**\n- `200`: Runs listed\n- `404`: Agent not found",
        "operationId": "list_runs_v1_agents__agent_id__runs_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/RunStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunListModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/runs/{run_id}:stream": {
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "Stream Run",
        "description": "Stream run output as Server-Sent Events (SSE).\n\nClients reconnect with ``?starting_after={last_streamId}`` to resume\nfrom where they left off. Each SSE data event contains a ``streamId``\nfield that serves as the cursor for resumption.\n\n**Status Codes:**\n- `200`: Stream started (text/event-stream)\n- `404`: Agent or run not found",
        "operationId": "stream_run_v1_agents__agent_id__runs__run_id__stream_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Run Id"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Starting After"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each ``data:`` event is a JSON object. Keepalives are emitted as ``: keepalive`` SSE comments with no data.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "description": "A single SSE data event emitted by the /{run_id}:stream endpoint.\n\nEach event is a JSON object delivered as ``data: {json}\\n\\n``.\nTerminal events (``type`` in completed/failed/cancelled) close the stream.\nKeepalives are emitted as ``: keepalive\\n\\n`` SSE comments and have no data.",
                  "properties": {
                    "streamId": {
                      "description": "ValKey stream entry ID; use as cursor for ?starting_after",
                      "title": "Streamid",
                      "type": "string"
                    },
                    "seq": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Monotonically increasing sequence number for this run. Omitted on synthetic events emitted when no stream entry exists yet: the stream backend is unavailable, or an already-terminal run whose stream key has expired.",
                      "title": "Seq"
                    },
                    "type": {
                      "description": "Event type: 'response.output_text.delta' | 'response.function_call_arguments.done' | 'response.created' | 'response.completed' | 'response.incomplete' | 'completed' | 'failed' | 'cancelled' | 'error'",
                      "title": "Type",
                      "type": "string"
                    },
                    "payload": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "JSON-serialized StreamingChunk for chunk events; omitted on terminal events",
                      "title": "Payload"
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Human-readable error message; present only on 'error' events emitted when the stream backend is unavailable",
                      "title": "Error"
                    }
                  },
                  "required": [
                    "streamId",
                    "type"
                  ],
                  "title": "RunStreamEvent",
                  "type": "object"
                },
                "example": "data: {\"streamId\":\"1-0\",\"seq\":\"1\",\"type\":\"response.output_text.delta\",\"payload\":\"{\\\"type\\\":\\\"response.output_text.delta\\\",\\\"delta\\\":\\\"Hello\\\",\\\"id\\\":\\\"msg_01\\\",\\\"role\\\":\\\"assistant\\\"}\"}\n\ndata: {\"streamId\":\"2-0\",\"seq\":\"2\",\"type\":\"completed\"}\n\n"
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/runs/{run_id}": {
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "Get Run",
        "description": "Get the status of a run.\n\nReturns the full run resource from PostgreSQL.\n\n**Status Codes:**\n- `200`: Run found\n- `404`: Agent or run not found",
        "operationId": "get_run_v1_agents__agent_id__runs__run_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/runs/{run_id}/cancel": {
      "post": {
        "tags": [
          "runs"
        ],
        "summary": "Cancel Run",
        "description": "Cancel a run.\n\nRequests cancellation by updating the run status to `cancelling`.\nThis endpoint does not currently guarantee interruption of work already running\nin a worker.\nCancellation is idempotent: calling cancel on an already-cancelled or completed\nrun returns the current run state (not 409 Conflict).\n\n**Status Codes:**\n- `202`: Cancellation accepted\n- `404`: Agent or run not found",
        "operationId": "cancel_run_v1_agents__agent_id__runs__run_id__cancel_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills": {
      "post": {
        "tags": [
          "skills"
        ],
        "summary": "Create a new skill",
        "description": "Create skill metadata and return presigned S3 upload URLs for all specified files.\n\nThe ``files`` list must include ``skill.md`` and may include additional\nartifact files (e.g. ``resources/schema.json``). Upload each file to its\ncorresponding ``uploadUrl`` via HTTP PUT.\n\n**Status Codes:**\n- `201`: Skill created; presigned upload URLs included in response\n- `409`: A skill with this name already exists in your environment\n- `500`: Internal server error",
        "operationId": "create_skill_v1_skills_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "List skills (paginated)",
        "description": "List all skills for the authenticated tenant.\n\nResults are ordered by creation date descending.\n\n**Query Parameters:**\n- `limit`: Page size (default 50, max 100)\n- `offset`: Pagination offset (default 0)\n\n**Status Codes:**\n- `200`: Paginated list of skills",
        "operationId": "list_skills_v1_skills_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/{skill_id}": {
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "Get a skill by ID",
        "description": "Get a skill by ID.\n\nReturns the skill metadata and its current version ID.\n\n**Status Codes:**\n- `200`: Skill found\n- `404`: Skill not found or belongs to a different tenant",
        "operationId": "get_skill_v1_skills__skill_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "skills"
        ],
        "summary": "Update skill metadata",
        "description": "Update skill metadata (displayName and/or description).\n\n**Status Codes:**\n- `200`: Skill updated\n- `404`: Skill not found or belongs to a different tenant\n- `500`: Internal server error",
        "operationId": "update_skill_v1_skills__skill_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "skills"
        ],
        "summary": "Delete a skill",
        "description": "Delete a skill.\n\nS3 artifacts are deleted synchronously before the DB row is removed. If S3\ndeletion fails the DB row is left intact and an error is returned, so the\nclient can safely retry the delete.\n\n**Status Codes:**\n- `200`: Skill deleted\n- `404`: Skill not found or belongs to a different tenant\n- `503`: S3 artifact deletion or database row deletion failed (skill still exists; retry is safe)",
        "operationId": "delete_skill_v1_skills__skill_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillDeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/{skill_id}/versions": {
      "post": {
        "tags": [
          "skills"
        ],
        "summary": "Create a skill version",
        "description": "Create an immutable version and return presigned upload URLs.",
        "operationId": "create_skill_version_v1_skills__skill_id__versions_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillVersionCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersionCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "List skill versions",
        "description": "List versions in descending version-number order.",
        "operationId": "list_skill_versions_v1_skills__skill_id__versions_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersionListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skills/{skill_id}/versions/{version_id}": {
      "get": {
        "tags": [
          "skills"
        ],
        "summary": "Get a skill version",
        "description": "Get a specific immutable version by both skill and version ID.",
        "operationId": "get_skill_version_v1_skills__skill_id__versions__version_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "skill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Skill Id"
            }
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passports": {
      "get": {
        "tags": [
          "passports"
        ],
        "summary": "List Passports",
        "description": "List Agent Passports for the current tenant, longest-waiting-first by default.\n\nThe pending-approval list is `?status=pending_approval`. Revoked passports are audit\nrecords and are excluded unless requested explicitly with `?status=revoked`.\n\n**Status Codes:**\n- `200`: Passports retrieved successfully\n- `400`: Validation error (invalid query parameters)\n- `500`: Internal server error",
        "operationId": "list_passports_v1_passports_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PassportStatus"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agentid"
            }
          },
          {
            "name": "oldestFirst",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Oldestfirst"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassportListModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passports/{version_id}": {
      "get": {
        "tags": [
          "passports"
        ],
        "summary": "Get Passport",
        "description": "Get the passport for one agent version, whatever its status.\n\nTerminal (`revoked`) rows are returned while their parent version exists. A `404`\nmeans the version does not exist (agent was deleted), or never had a passport.\n\nStatus alone is not invocability: an agent with no passport on *any* version is\na legacy agent and stays invocable. Use this for display and diagnostics, and\ntreat any pre-flight check as advisory, since the status can change between the\ncheck and the invocation.\n\n**Status Codes:**\n- `200`: Passport retrieved successfully\n- `404`: The version does not exist or never had a passport\n- `500`: Internal server error",
        "operationId": "get_passport_v1_passports__version_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassportDetailsModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passports/{version_id}/approve": {
      "post": {
        "tags": [
          "passports"
        ],
        "summary": "Approve Passport",
        "description": "Approve a version's passport and issue its verifiable credential.\n\nThe credential is issued and then verified before the approval is recorded: a\ncredential that signs but does not verify is rejected and the passport is left\nretryable rather than recorded as issued.\n\nThe config is checked against the hash recorded when the passport was provisioned,\nso an officer cannot unknowingly approve a configuration that changed after they\nreviewed it. The approving user is embedded in the credential as `iamSubject`, so\nwho authorised the agent is covered by the signature rather than only by our\ndatabase.\n\n`expiresAt` is required and is the officer's decision, bounded by the platform's\nconfigured minimum and maximum credential lifetimes. It becomes the credential's\n`expirationDate`, is returned as `expiresAt`, and is enforced at invoke time, so a\nlapsed passport blocks invocation until the version is approved again.\n\nOptional `governanceRecord` is validated and embedded as defined credential terms a\nverifier can read. Optional `extensions` carries metadata that has no term of its\nown and is neither validated nor interpreted. Optional `reason` records why the\ndecision was made; it is stored locally and returned as `decisionReason`, never\nembedded in the credential.\n\n**Status Codes:**\n- `200`: Passport approved and credential issued\n- `403`: Caller lacks passport approval authority\n- `404`: The version does not exist or never had a passport\n- `409`: The passport cannot be decided from its current status (including a\n  revoked passport, which is terminal), or its status changed while the decision\n  was in flight\n- `409`: Also returned when the version's config changed after the passport was\n  provisioned, so the officer would be approving something other than what they\n  reviewed\n- `422`: No body, or `expiresAt` outside the configured bounds\n- `502`: Credential issuance failed; the passport is retryable\n- `503`: The environment has no usable Passport Service credentials",
        "operationId": "approve_passport_v1_passports__version_id__approve_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassportApproveRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassportDetailsModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passports/{version_id}/reject": {
      "post": {
        "tags": [
          "passports"
        ],
        "summary": "Reject Passport",
        "description": "Reject a version's passport. Final: no credential is issued and the decision\ncannot be reversed.\n\nThe remedy for a rejected version is a new agent version, which gets its own\npassport and enters the pending-approval list.\n\n`reason` is required: a rejection issues no credential, so the passport row is the\nonly record the decision produces. It is returned as `decisionReason`.\n\n**Status Codes:**\n- `200`: Passport rejected\n- `422`: No body, or a blank `reason`\n- `403`: Caller lacks passport approval authority\n- `404`: The version does not exist or never had a passport\n- `409`: The passport cannot be decided from its current status (including a\n  revoked passport, which is terminal), or its status changed while the decision\n  was in flight",
        "operationId": "reject_passport_v1_passports__version_id__reject_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassportRejectRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassportDetailsModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passports/{version_id}/revoke": {
      "post": {
        "tags": [
          "passports"
        ],
        "summary": "Revoke Passport",
        "description": "Revoke a passport's credential, invalidating it upstream.\n\nAccepts `issued` and `suspended` passports: both hold a real credential, so both\nhave something to invalidate. Suspend then revoke is the expected escalation from a\ntemporary hold to permanent retirement. The other statuses have no credential in\ncirculation and answer `409`, these should be rejected instead or are already terminal.\n\nPassport Service is asked first and the local status changes only once it confirms,\nso a `502` leaves the passport as it was and the request can be retried.\n\nNote the upstream effect is not instant even though this call is. The status list a\nthird-party verifier reads is published asynchronously, so `/validate` can still\nreport the credential valid for a short window afterwards (measured at roughly 12\nseconds on 2026-09-20). Invocation through this platform is blocked as soon as this\nreturns, because the admission gate reads `agent_passports.status` rather than\ncalling `/validate`; it is an external verifier that may briefly disagree.\n\nRevoking blocks the version from being invoked, and is the prerequisite for\ndeleting an agent that holds a credential.\n\n`reason` is required and is forwarded upstream as well as stored on the passport,\nwhich returns it as `revocationReason` alongside `revokedBy` and `revokedAt`.\nRevocation is irreversible and invalidates a credential third parties may have\nrelied on, so it is not available without a stated cause.\n\n**Status Codes:**\n- `200`: Passport revoked\n- `422`: No body, or a blank `reason`\n- `403`: Caller lacks passport revocation authority\n- `404`: The version does not exist or never had a passport\n- `409`: The passport holds no credential, so there is nothing to revoke\n- `502`: Passport Service did not confirm the revocation; passport unchanged",
        "operationId": "revoke_passport_v1_passports__version_id__revoke_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassportRevokeRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassportDetailsModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passports/{version_id}/suspend": {
      "post": {
        "tags": [
          "passports"
        ],
        "summary": "Suspend Passport",
        "description": "Temporarily suspend an issued passport, blocking the version from invocation.\n\nOnly an `issued` passport can be suspended. Unlike revocation this is reversible:\nthe DID and credential survive, and `unsuspend` reinstates the same credential.\nSuspending does not clear the approval record, so who approved the version remains\nanswerable afterwards.\n\n`reason` is required: standing an agent down mid-service is a governance act, and\nit is returned as `suspensionReason` until the suspension is lifted.\n\nGuarded by `passports.revoke`, the same authority as revocation: suspension stands\nan agent down, and is a weaker form of the same act.\n\nPassport Service is asked first and the local status changes only once it confirms,\nso a `502` leaves the passport `issued` and the request can be retried.\n\nNote the credential's validity is eventually consistent upstream: `/validate` has\nbeen observed reporting a suspended credential valid for a short window after\n`/suspend` answered `200`. Invocation through this platform is blocked immediately,\nbecause the gate reads our status rather than calling `/validate`.\n\n**Status Codes:**\n- `200`: Passport suspended\n- `422`: No body, or a blank `reason`\n- `403`: Caller lacks passport revocation authority\n- `404`: The version does not exist or never had a passport\n- `409`: The passport is not issued, so there is nothing to suspend\n- `502`: Passport Service did not confirm the suspension; passport unchanged",
        "operationId": "suspend_passport_v1_passports__version_id__suspend_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassportSuspendRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassportDetailsModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/passports/{version_id}/unsuspend": {
      "post": {
        "tags": [
          "passports"
        ],
        "summary": "Unsuspend Passport",
        "description": "Lift a suspension, returning the passport to `issued`.\n\nOnly a `suspended` passport can be unsuspended. The original credential is\nreinstated rather than reissued, so `credentialUrl` and `issuedAt` are unchanged\nand no new credential is minted. The suspension record is cleared, since a lifted\nsuspension that still named a suspender would read as though it were in force.\n\n**Status Codes:**\n- `200`: Passport reinstated\n- `422`: No body, or a blank `reason`\n- `403`: Caller lacks passport revocation authority\n- `404`: The version does not exist or never had a passport\n- `409`: The passport is not suspended, so there is nothing to lift\n- `502`: Passport Service did not confirm the change; passport unchanged",
        "operationId": "unsuspend_passport_v1_passports__version_id__unsuspend_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Version Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassportSuspendRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassportDetailsModel"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "summary": "Read Root",
        "description": "Root endpoint returning basic API information.\n\n**Status Codes:**\n- `307`: Redirects to /health",
        "operationId": "read_root__get",
        "responses": {
          "307": {
            "description": "Successful Response"
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Health Check",
        "description": "Health check endpoint. Returns the service status. Use this to verify API availability.\n\n**Status Codes:**\n- `200`: Service is healthy",
        "operationId": "health_check_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "APIKeyAuthConfig": {
        "properties": {
          "type": {
            "type": "string",
            "const": "apiKey",
            "title": "Type",
            "description": "Authentication type discriminator",
            "default": "apiKey"
          },
          "header": {
            "type": "string",
            "title": "Header",
            "description": "HTTP header name for the API key",
            "default": "X-API-Key"
          },
          "apiKeyValue": {
            "type": "string",
            "format": "password",
            "title": "Apikeyvalue",
            "description": "API key value (SecretStr for security)",
            "writeOnly": true
          }
        },
        "type": "object",
        "required": [
          "apiKeyValue"
        ],
        "title": "APIKeyAuthConfig",
        "description": "API Key authentication configuration.\n\nSecurity: api_key_value uses SecretStr to prevent accidental secret leakage.\nUse .get_secret_value() only when the actual value is needed for operations."
      },
      "AccessScope": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AccessScopeType",
            "description": "Scope type: 'user' for private files, 'tenant' for organization-wide sharing."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type"
        ],
        "title": "AccessScope",
        "description": "Access scope configuration for file uploads.\n\nControls whether files are private to the uploading user\nor shared across the entire tenant."
      },
      "AccessScopeType": {
        "type": "string",
        "enum": [
          "user",
          "tenant"
        ],
        "title": "AccessScopeType",
        "description": "Access scope for file storage.\n\nDetermines the S3 storage path and access control:\n- USER: scoped to the individual user (private)\n- TENANT: scoped to the tenant (shared across the organization)"
      },
      "AgentConfig-Input": {
        "properties": {
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolConfig-Input"
            },
            "type": "array",
            "title": "Tools",
            "description": "List of tools available to the agent",
            "default": []
          },
          "llmModelId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "LLM Model ID",
            "description": "ID of the language model to use"
          },
          "systemPrompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt",
            "description": "System prompt for the agent. For legacy RAG, this is the synthesis template and may use {context_str} and {query_str}. For agentic RAG, it supplies supplemental answer and formatting instructions; retrieval and grounding rules remain enforced."
          },
          "inferenceConfig": {
            "$ref": "#/components/schemas/InferenceConfig",
            "title": "Inference Config",
            "description": "Configuration for model inference"
          },
          "inputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema",
            "description": "JSON schema for task agent inputs (required for Task Agents)"
          },
          "hxqlQuery": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "HXQL Query",
            "description": "Default HXQL query for agent-level RAG retrieval"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit",
            "description": "Result limit for RAG agents"
          },
          "hybridSearch": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hybrid Search",
            "description": "Enable/disable hybrid search (embeddings + full-text) for RAG agents"
          },
          "adjacentChunkRange": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjacent Chunk Range",
            "description": "Number of adjacent chunks to fetch around each retrieved chunk (0 = disabled)"
          },
          "adjacentChunkMerge": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjacent Chunk Merge",
            "description": "When True, adjacent chunk text is merged into the parent chunk in document order"
          },
          "rerankerTopN": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Reranker Top N",
            "description": "Number of top results to keep after reranking"
          },
          "enableHallucinationCheck": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Hallucination Check",
            "description": "Enable hallucination detection for RAG agents"
          },
          "enableMultihopQueryRefinement": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Multihop Query Refinement",
            "description": "Enable multi-hop query refinement for legacy RAG. Ignored by agentic RAG."
          },
          "enableCitations": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Citations",
            "description": "Enable citations in the response. Uses config default if not specified."
          },
          "guardrails": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "#/components/schemas/GuardrailConfig"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrails",
            "description": "List of guardrails (names or objects with name and config)"
          },
          "enableFollowUpPrompts": {
            "type": "boolean",
            "title": "Enable Follow-up Prompts",
            "description": "Whether to generate suggested follow-up prompts after an invocation",
            "default": false
          },
          "followUpPromptsLimit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Follow-up Prompts Limit",
            "description": "Maximum number of follow-up prompts to generate",
            "default": 3
          },
          "knowledgeGraphId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Graph ID",
            "description": "Knowledge Graph ID for graphRag agents. 'knowledgeGraphDomainId' is deprecated; use 'knowledgeGraphId'."
          },
          "ontologyIds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Ontology IDs",
            "description": "Ontology IDs (UUIDs) to scope retrieval to (graphRag agents only). When set, search_documents returns only documents tagged with any of these ontologies, search_business_objects/search_global_entities scope their linked documents (belongs_to_doc/mentioned_in), and search_vector_db restricts Content Lake search results to these ontologies. If provided, must be a non-empty list of at most 50 valid UUIDs."
          },
          "maxIterations": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Iterations",
            "description": "Max model-call iterations per invocation for tool/task/Manager agents, with independent limits for each agent; or max retrieval routing iterations for graphRag agents"
          },
          "maxHallucinationRetries": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Hallucination Retries",
            "description": "Max hallucination detection retries for RAG and graphRag agents"
          },
          "graphQueryRecursionLimit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph Query Recursion Limit",
            "description": "LangGraph recursion limit for graph query agent (graphRag agents only)"
          },
          "maxRetrievalCalls": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10.0,
                "minimum": 4.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Retrieval Calls",
            "description": "Maximum combined Content Lake corpus-search, metadata-search, document-search, and document-context tool calls for agentic RAG. Accepts 4 through 10 and defaults to 5 if not set. Independent of legacy multi-hop query refinement and ignored by legacy RAG.",
            "default": 5
          },
          "experts": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ExpertRef"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Experts",
            "description": "Optional expert agents orchestrated by manager agents; must be omitted/null for all other agent types."
          },
          "enableGeneralPurposeSubagent": {
            "type": "boolean",
            "title": "Enable General-Purpose Subagent",
            "description": "Whether a manager includes Deep Agents' built-in general-purpose subagent. Defaults to true and is ignored by other agent types.",
            "default": true
          },
          "skills": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SkillReference"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skills",
            "description": "Skill and version IDs to inject at runtime (Tool, LangChain Task, and Manager agents)"
          }
        },
        "type": "object",
        "title": "AgentConfig",
        "description": "Main configuration model for the agent"
      },
      "AgentConfig-Output": {
        "properties": {
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolConfig-Output"
            },
            "type": "array",
            "title": "Tools",
            "description": "List of tools available to the agent",
            "default": []
          },
          "llmModelId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "LLM Model ID",
            "description": "ID of the language model to use"
          },
          "systemPrompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt",
            "description": "System prompt for the agent. For legacy RAG, this is the synthesis template and may use {context_str} and {query_str}. For agentic RAG, it supplies supplemental answer and formatting instructions; retrieval and grounding rules remain enforced."
          },
          "inferenceConfig": {
            "$ref": "#/components/schemas/InferenceConfig",
            "title": "Inference Config",
            "description": "Configuration for model inference"
          },
          "inputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Schema",
            "description": "JSON schema for task agent inputs (required for Task Agents)"
          },
          "hxqlQuery": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "HXQL Query",
            "description": "Default HXQL query for agent-level RAG retrieval"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit",
            "description": "Result limit for RAG agents"
          },
          "hybridSearch": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hybrid Search",
            "description": "Enable/disable hybrid search (embeddings + full-text) for RAG agents"
          },
          "adjacentChunkRange": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjacent Chunk Range",
            "description": "Number of adjacent chunks to fetch around each retrieved chunk (0 = disabled)"
          },
          "adjacentChunkMerge": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjacent Chunk Merge",
            "description": "When True, adjacent chunk text is merged into the parent chunk in document order"
          },
          "rerankerTopN": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Reranker Top N",
            "description": "Number of top results to keep after reranking"
          },
          "enableHallucinationCheck": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Hallucination Check",
            "description": "Enable hallucination detection for RAG agents"
          },
          "enableMultihopQueryRefinement": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Multihop Query Refinement",
            "description": "Enable multi-hop query refinement for legacy RAG. Ignored by agentic RAG."
          },
          "enableCitations": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Citations",
            "description": "Enable citations in the response. Uses config default if not specified."
          },
          "guardrails": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "#/components/schemas/GuardrailConfig"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrails",
            "description": "List of guardrails (names or objects with name and config)"
          },
          "enableFollowUpPrompts": {
            "type": "boolean",
            "title": "Enable Follow-up Prompts",
            "description": "Whether to generate suggested follow-up prompts after an invocation",
            "default": false
          },
          "followUpPromptsLimit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Follow-up Prompts Limit",
            "description": "Maximum number of follow-up prompts to generate",
            "default": 3
          },
          "knowledgeGraphId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Graph ID",
            "description": "Knowledge Graph ID for graphRag agents. 'knowledgeGraphDomainId' is deprecated; use 'knowledgeGraphId'."
          },
          "ontologyIds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Ontology IDs",
            "description": "Ontology IDs (UUIDs) to scope retrieval to (graphRag agents only). When set, search_documents returns only documents tagged with any of these ontologies, search_business_objects/search_global_entities scope their linked documents (belongs_to_doc/mentioned_in), and search_vector_db restricts Content Lake search results to these ontologies. If provided, must be a non-empty list of at most 50 valid UUIDs."
          },
          "maxIterations": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Iterations",
            "description": "Max model-call iterations per invocation for tool/task/Manager agents, with independent limits for each agent; or max retrieval routing iterations for graphRag agents"
          },
          "maxHallucinationRetries": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Hallucination Retries",
            "description": "Max hallucination detection retries for RAG and graphRag agents"
          },
          "graphQueryRecursionLimit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph Query Recursion Limit",
            "description": "LangGraph recursion limit for graph query agent (graphRag agents only)"
          },
          "maxRetrievalCalls": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10.0,
                "minimum": 4.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Retrieval Calls",
            "description": "Maximum combined Content Lake corpus-search, metadata-search, document-search, and document-context tool calls for agentic RAG. Accepts 4 through 10 and defaults to 5 if not set. Independent of legacy multi-hop query refinement and ignored by legacy RAG.",
            "default": 5
          },
          "experts": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ExpertRef"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Experts",
            "description": "Optional expert agents orchestrated by manager agents; must be omitted/null for all other agent types."
          },
          "enableGeneralPurposeSubagent": {
            "type": "boolean",
            "title": "Enable General-Purpose Subagent",
            "description": "Whether a manager includes Deep Agents' built-in general-purpose subagent. Defaults to true and is ignored by other agent types.",
            "default": true
          },
          "skills": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SkillReference"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Skills",
            "description": "Skill and version IDs to inject at runtime (Tool, LangChain Task, and Manager agents)"
          }
        },
        "type": "object",
        "title": "AgentConfig",
        "description": "Main configuration model for the agent"
      },
      "AgentCreateModel": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "description": {
            "type": "string",
            "maxLength": 200,
            "title": "Description"
          },
          "versionLabel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ],
            "title": "Versionlabel"
          },
          "agentType": {
            "type": "string",
            "title": "Agenttype"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "config": {
            "$ref": "#/components/schemas/AgentConfig-Input"
          },
          "validateOnly": {
            "type": "boolean",
            "title": "Validateonly",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "agentType",
          "config"
        ],
        "title": "AgentCreateModel",
        "examples": [
          {
            "agentType": "tool",
            "config": {
              "guardrails": [
                "HAIP-Hate-High",
                "HAIP-Insults-Low"
              ],
              "inferenceConfig": {
                "maxTokens": 4000
              },
              "llmModelId": "anthropic.claude-haiku-5-5",
              "systemPrompt": "You are a helpful assistant with access to various tools.",
              "tools": [
                {
                  "description": "Multiplies two numbers",
                  "funcName": "multiply",
                  "name": "multiply",
                  "toolType": "function"
                }
              ]
            },
            "description": "An agent that multiplies two numbers",
            "displayName": "Multiplier",
            "name": "multiplier",
            "notes": "This agent is used for multiplication tasks.",
            "versionLabel": "v1.0"
          },
          {
            "agentType": "task",
            "config": {
              "guardrails": [
                "HAIP-Hate-High",
                "HAIP-Insults-Low"
              ],
              "inferenceConfig": {
                "maxTokens": 2000
              },
              "inputSchema": {
                "properties": {
                  "policy_rules": {
                    "default": "Company Standard Policy v2.1",
                    "description": "Rules for evaluating the claim",
                    "type": "string"
                  },
                  "denial_letter": {
                    "description": "Text of the denial letter",
                    "type": "string"
                  }
                },
                "required": [
                  "denial_letter"
                ],
                "type": "object"
              },
              "llmModelId": "anthropic.claude-haiku-5-5",
              "systemPrompt": "You are a claims evaluator.\n\nPolicy rules: {{policy_rules}}\n\nLetter: {{denial_letter}}\n\nRespond with a clear evaluation."
            },
            "description": "Evaluates denial letters using structured inputs",
            "name": "ClaimEvaluator"
          }
        ]
      },
      "AgentCustomOutputs": {
        "properties": {
          "type": {
            "type": "string",
            "minLength": 1,
            "title": "Type",
            "description": "Stable discriminator for the producing agent's output contract"
          },
          "data": {
            "$ref": "#/components/schemas/JsonValue",
            "description": "JSON-safe payload validated by the producing agent"
          }
        },
        "type": "object",
        "required": [
          "type",
          "data"
        ],
        "title": "AgentCustomOutputs",
        "description": "Extensible custom-output envelope owned by a concrete agent contract."
      },
      "AgentDeleteModel": {
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid",
            "title": "Agentid"
          }
        },
        "type": "object",
        "required": [
          "agentId"
        ],
        "title": "AgentDeleteModel"
      },
      "AgentListModel": {
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/AgentModel"
            },
            "type": "array",
            "title": "Agents"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "agents",
          "pagination"
        ],
        "title": "AgentListModel"
      },
      "AgentLookupRequestModel": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the agent to lookup"
          },
          "versionLabel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ],
            "title": "Versionlabel",
            "description": "Version label to lookup. Remove from payload to get the 'latest' for the current version or specify a version label like 'v1.0'"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "AgentLookupRequestModel",
        "examples": [
          {
            "name": "claim-evaluator",
            "versionLabel": "v1.0"
          },
          {
            "name": "calculator"
          }
        ]
      },
      "AgentModel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "displayName": {
            "type": "string",
            "title": "Displayname"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "CREATED"
          },
          "isGlobalAgent": {
            "type": "boolean",
            "title": "Isglobalagent"
          },
          "solutionKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Solutionkey",
            "description": "The agent's current solution assignment. Omitted when unset. Not versioned."
          },
          "currentVersionId": {
            "type": "string",
            "format": "uuid",
            "title": "Currentversionid"
          },
          "currentVersionLlmModelId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currentversionllmmodelid",
            "description": "The `llmModelId` stored in the current version's config, as returned by the version endpoints. Omitted when that version sets none: the runtime then uses its default model for `rag` agents, and rejects invocation of other agent types."
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby"
          },
          "modifiedAt": {
            "type": "string",
            "title": "Modifiedat"
          },
          "modifiedBy": {
            "type": "string",
            "title": "Modifiedby"
          },
          "lastInvokedAt": {
            "type": "string",
            "title": "Lastinvokedat",
            "default": ""
          },
          "currentVersionPassport": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PassportModel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "name",
          "displayName",
          "description",
          "isGlobalAgent",
          "currentVersionId",
          "createdAt",
          "createdBy",
          "modifiedAt",
          "modifiedBy"
        ],
        "title": "AgentModel",
        "examples": [
          {
            "createdAt": "2025-01-15T10:30:00+00:00",
            "createdBy": "Jane Smith",
            "currentVersionId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
            "currentVersionLlmModelId": "anthropic.claude-haiku-5-5",
            "description": "Handles insurance claim submissions and status lookups.",
            "displayName": "Claims Processing Agent",
            "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
            "isGlobalAgent": false,
            "lastInvokedAt": "2025-07-17T08:12:33+00:00",
            "modifiedAt": "2025-06-20T14:45:00+00:00",
            "modifiedBy": "John Doe",
            "name": "claims-processing-agent",
            "solutionKey": "claims-processing",
            "status": "CREATED",
            "type": "tool"
          }
        ]
      },
      "AgentPatchModel": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "validateOnly": {
            "type": "boolean",
            "title": "Validateonly",
            "default": false
          }
        },
        "type": "object",
        "title": "AgentPatchModel",
        "description": "Model for patching agent name, displayName, and description.",
        "examples": [
          {
            "description": "Updated agent description",
            "displayName": "My Updated Agent",
            "name": "updated-agent-name"
          }
        ]
      },
      "AgentResponse": {
        "properties": {
          "createdAt": {
            "type": "integer",
            "title": "Createdat"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "object": {
            "type": "string",
            "const": "response",
            "title": "Object",
            "default": "response"
          },
          "status": {
            "$ref": "#/components/schemas/ResponseStatus",
            "default": "completed"
          },
          "output": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TextOutput"
                },
                {
                  "$ref": "#/components/schemas/ToolCallOutput"
                }
              ]
            },
            "type": "array",
            "title": "Output"
          },
          "customOutputs": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentCustomOutputs"
              },
              {
                "$ref": "#/components/schemas/RAGCustomOutputs"
              },
              {
                "$ref": "#/components/schemas/GraphRAGCustomOutputs"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customoutputs"
          }
        },
        "type": "object",
        "required": [
          "createdAt",
          "model",
          "output"
        ],
        "title": "AgentResponse",
        "examples": [
          {
            "createdAt": 1741705447,
            "customOutputs": {
              "ragMode": "normal",
              "sourceNodes": [
                {
                  "chunkId": "b9f622c9-7a62-46fc-8cf1-0d1f4d3c35d7",
                  "docId": "6e4a7f58-13f1-4d3f-83b9-ec86c5b7df60",
                  "score": 0.95,
                  "text": "AVAILABILITY OF HANDBOOK AND POLICY UPDATES A copy of this handbook, Company policies and any updates made to them is available for viewing on the HR Portal located at classified_url It is your responsibility to be aware of the handbook and policies and any changes made to them. Hyland reserves the right to make changes to the handbook and policies at any time with no advance notice given."
                }
              ]
            },
            "model": "amazon.nova-micro-v1:0",
            "object": "response",
            "output": [
              {
                "content": [
                  {
                    "text": "Detailed information about the company's sick leave policy and other HR policies can be found on the HR Portal located at classified_url. This portal contains a copy of the Employee Handbook, company policies, and any updates made to them. It is important to regularly check this portal to stay informed about any changes to the policies. If you have any questions regarding these policies, you are encouraged to contact the Human Resources department.",
                    "type": "output_text"
                  }
                ],
                "role": "assistant",
                "status": "completed",
                "type": "message"
              }
            ]
          },
          {
            "createdAt": 1741705500,
            "customOutputs": {
              "ragMode": "normal",
              "sourceNodes": []
            },
            "model": "amazon.nova-micro-v1:0",
            "object": "response",
            "output": [
              {
                "arguments": "{\"a\": 5, \"b\": 20}",
                "callId": "tooluse_U0S5D2uSRBi3rbPBUi-KXw",
                "name": "multiply",
                "status": "completed",
                "type": "function_call"
              }
            ]
          }
        ]
      },
      "AgentSettings": {
        "properties": {
          "arizeTracingEnabled": {
            "type": "boolean",
            "title": "Arizetracingenabled",
            "default": true
          },
          "evaluationEnabled": {
            "type": "boolean",
            "title": "Evaluationenabled",
            "default": false
          },
          "solutionKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Solutionkey"
          }
        },
        "type": "object",
        "title": "AgentSettings"
      },
      "AgentSettingsResponseModel": {
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid",
            "title": "Agentid"
          },
          "settings": {
            "$ref": "#/components/schemas/AgentSettings"
          }
        },
        "type": "object",
        "required": [
          "agentId",
          "settings"
        ],
        "title": "AgentSettingsResponseModel"
      },
      "AgentSettingsUpdateModel": {
        "properties": {
          "arizeTracingEnabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arizetracingenabled"
          },
          "evaluationEnabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evaluationenabled"
          },
          "solutionKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Solutionkey"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "AgentSettingsUpdateModel"
      },
      "AgentType": {
        "type": "string",
        "enum": [
          "tool",
          "rag",
          "task",
          "graphRag",
          "manager"
        ],
        "title": "AgentType",
        "description": "Enum defining valid agent types"
      },
      "AgentTypeInfo": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type"
          },
          "description": {
            "type": "string",
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "type",
          "description"
        ],
        "title": "AgentTypeInfo"
      },
      "AgentTypeInfoList": {
        "properties": {
          "agentTypes": {
            "items": {
              "$ref": "#/components/schemas/AgentTypeInfo"
            },
            "type": "array",
            "title": "Agenttypes"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "agentTypes",
          "pagination"
        ],
        "title": "AgentTypeInfoList"
      },
      "AgentUpdateModel": {
        "properties": {
          "versionLabel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ],
            "title": "Versionlabel"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfig-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "validateOnly": {
            "type": "boolean",
            "title": "Validateonly",
            "default": false
          }
        },
        "type": "object",
        "title": "AgentUpdateModel",
        "examples": [
          {
            "config": {
              "guardrails": [
                "HAIP-Hate-High",
                "HAIP-Insults-Low"
              ],
              "inferenceConfig": {
                "maxTokens": 4000
              },
              "llmModelId": "anthropic.claude-haiku-5-5",
              "systemPrompt": "You are a helpful assistant with access to various tools.",
              "tools": [
                {
                  "description": "Multiplies two numbers",
                  "funcName": "multiply",
                  "name": "multiply",
                  "toolType": "function"
                }
              ]
            },
            "notes": "Updated notes for the agent",
            "versionLabel": "v1.0"
          }
        ]
      },
      "AgentVersionListModel": {
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentModel"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/VersionModel"
            },
            "type": "array",
            "title": "Versions"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "agent",
          "versions",
          "pagination"
        ],
        "title": "AgentVersionListModel"
      },
      "AgentVersionModel": {
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentModel"
          },
          "version": {
            "$ref": "#/components/schemas/VersionConfigModel"
          }
        },
        "type": "object",
        "required": [
          "agent",
          "version"
        ],
        "title": "AgentVersionModel",
        "description": "Two resources in one response with distinct passport scopes.\n\n``agent.currentVersionPassport`` is the current version's passport, while\n``version.passport`` is this version's. They coincide when the version requested is\ncurrent and diverge otherwise (an issued v1 alongside a pending v2)."
      },
      "AgentVersionsBatchRequestModel": {
        "properties": {
          "agentIds": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Agentids"
          }
        },
        "type": "object",
        "required": [
          "agentIds"
        ],
        "title": "AgentVersionsBatchRequestModel"
      },
      "AgentVersionsBatchResponseModel": {
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/AgentVersionModel"
            },
            "type": "array",
            "title": "Agents"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ErrorModel"
            },
            "type": "array",
            "title": "Errors"
          }
        },
        "type": "object",
        "required": [
          "agents",
          "errors"
        ],
        "title": "AgentVersionsBatchResponseModel"
      },
      "AuthConfig": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/MCPAuthType",
            "description": "Authentication type"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OIDCAuthConfig"
              },
              {
                "$ref": "#/components/schemas/APIKeyAuthConfig"
              },
              {
                "$ref": "#/components/schemas/PassthroughAuthConfig"
              }
            ],
            "title": "Config",
            "description": "Authentication configuration"
          }
        },
        "type": "object",
        "required": [
          "type",
          "config"
        ],
        "title": "AuthConfig",
        "description": "Authentication configuration with discriminated union."
      },
      "Base64DocumentSource": {
        "properties": {
          "type": {
            "type": "string",
            "const": "base64",
            "title": "Type",
            "default": "base64"
          },
          "mediaType": {
            "type": "string",
            "title": "Mediatype",
            "description": "The media type of the document, e.g., application/pdf, text/csv"
          },
          "data": {
            "type": "string",
            "title": "Data",
            "description": "Base64-encoded document data"
          }
        },
        "type": "object",
        "required": [
          "mediaType",
          "data"
        ],
        "title": "Base64DocumentSource",
        "description": "Source for base64-encoded document data."
      },
      "Base64ImageSource": {
        "properties": {
          "type": {
            "type": "string",
            "const": "base64",
            "title": "Type",
            "default": "base64"
          },
          "mediaType": {
            "type": "string",
            "title": "Mediatype",
            "description": "The media type of the image, e.g., image/jpeg, image/png"
          },
          "data": {
            "type": "string",
            "title": "Data",
            "description": "Base64-encoded image data"
          }
        },
        "type": "object",
        "required": [
          "mediaType",
          "data"
        ],
        "title": "Base64ImageSource",
        "description": "Source for base64-encoded image data."
      },
      "BusinessObjectNodeOutput": {
        "properties": {
          "nodeType": {
            "type": "string",
            "const": "BusinessObject",
            "title": "Nodetype",
            "default": "BusinessObject"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "objectType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objecttype"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "documentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "BusinessObjectNodeOutput",
        "description": "A BusinessObject from the Knowledge Graph."
      },
      "CamelModel": {
        "properties": {},
        "type": "object",
        "title": "CamelModel",
        "description": "Base model with camelCase/snake_case conversion support.\n\nDesign Notes:\n- API Layer: Uses camelCase (REST/JavaScript convention)\n- Database Layer: Uses snake_case (Python/SQL convention)\n- Flexible Access: Supports reading from either format\n\nUsage:\n    # API Response (camelCase)\n    response_data = model.model_dump()  # {\"firstName\": \"John\"}\n\n    # Database Storage (snake_case)\n    db_data = model.model_dump_db()  # {\"first_name\": \"John\"}\n\n    # Flexible Dict Access (supports both formats)\n    value = CamelModel.get_field_value(data_dict, \"first_name\", default=\"Unknown\")"
      },
      "ChatRequestBaseSchema": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageModel"
            },
            "type": "array",
            "title": "Messages"
          },
          "hxqlQuery": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hxqlquery",
            "description": "Pre-composed HXQL query for Content Lake."
          },
          "hybridSearch": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hybridsearch",
            "description": "Enable/disable hybrid search (embeddings + full-text). Uses config default if not specified."
          },
          "adjacentChunkRange": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjacentchunkrange",
            "description": "Number of adjacent chunks to fetch around each retrieved chunk (0 = disabled). For range=N, fetches N chunks before and N chunks after each result. Uses config default if not specified."
          },
          "adjacentChunkMerge": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjacentchunkmerge",
            "description": "When True, adjacent chunk text is merged into the parent chunk in document order. When False, adjacent chunks are returned as separate nodes. Uses config default if not specified."
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit",
            "description": "Maximum number of chunks to retrieve from Content Lake. Overrides agent-level limit."
          },
          "rerankerTopN": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Rerankertopn",
            "description": "Number of top results to keep after reranking. Uses config default if not specified."
          },
          "enableHallucinationCheck": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enablehallucinationcheck",
            "description": "Enable hallucination detection. Uses config default if not specified."
          },
          "enableMultihopQueryRefinement": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enablemultihopqueryrefinement",
            "description": "Enable multi-hop query refinement for legacy RAG workflows. Ignored by agentic RAG. Uses config default if not specified."
          },
          "enableCitations": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enablecitations",
            "description": "Enable citations in the response. Uses config default if not specified."
          },
          "guardrails": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "#/components/schemas/GuardrailConfig"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrails",
            "description": "List of guardrails (names or objects with name and config)"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "messages"
        ],
        "title": "ChatRequestBaseSchema",
        "description": "Schema for invocation requests. Fields here override agent-level config for the duration of the call.",
        "examples": [
          {
            "guardrails": [
              "HAIP-Hate-High",
              "HAIP-Insults-Low"
            ],
            "hxqlQuery": "SELECT * FROM SysContent WHERE sys_docType = 'Invoice'",
            "hybridSearch": true,
            "messages": [
              {
                "content": "What's the weather like today?",
                "role": "user"
              }
            ]
          }
        ]
      },
      "CreateRunRequest": {
        "properties": {
          "versionId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Versionid"
          },
          "invokeRequest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChatRequestBaseSchema"
              },
              {
                "$ref": "#/components/schemas/TaskRequestBaseSchema"
              }
            ],
            "title": "Invokerequest"
          }
        },
        "type": "object",
        "required": [
          "invokeRequest"
        ],
        "title": "CreateRunRequest",
        "description": "Request body for POST /v1/agents/{agent_id}/runs."
      },
      "DeprecationStatus": {
        "properties": {
          "deprecated": {
            "type": "boolean",
            "title": "Deprecated",
            "default": false
          },
          "deprecationDate": {
            "type": "string",
            "title": "Deprecationdate",
            "default": ""
          },
          "replacementModelName": {
            "type": "string",
            "title": "Replacementmodelname",
            "default": ""
          }
        },
        "type": "object",
        "title": "DeprecationStatus",
        "description": "Deprecation status information for a model."
      },
      "DocumentNodeOutput": {
        "properties": {
          "nodeType": {
            "type": "string",
            "const": "Document",
            "title": "Nodetype",
            "default": "Document"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "docType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doctype"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "clDocId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cldocid"
          },
          "documentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "DocumentNodeOutput",
        "description": "A Document entity from the Knowledge Graph."
      },
      "EnvironmentSettingsCollectionModel": {
        "properties": {
          "sections": {
            "items": {
              "$ref": "#/components/schemas/EnvironmentSettingsSectionModel"
            },
            "type": "array",
            "title": "Sections"
          }
        },
        "type": "object",
        "required": [
          "sections"
        ],
        "title": "EnvironmentSettingsCollectionModel",
        "description": "Every registered namespace, defaults synthesized."
      },
      "EnvironmentSettingsSectionModel": {
        "properties": {
          "namespace": {
            "type": "string",
            "title": "Namespace"
          },
          "properties": {
            "description": "The section's settings; the shape is the namespace's registered model.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PassportEnvironmentSettings"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "title": "Revision",
            "description": "0 when no row exists (the registry default is served)."
          },
          "source": {
            "$ref": "#/components/schemas/SettingsSource"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedat"
          },
          "updatedBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updatedby"
          }
        },
        "type": "object",
        "required": [
          "namespace",
          "properties",
          "revision",
          "source"
        ],
        "title": "EnvironmentSettingsSectionModel",
        "description": "One section's stable representation. Its strong ETag is ``\"<generation>-<revision>\"``."
      },
      "ErrorModel": {
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid",
            "title": "Agentid"
          },
          "status": {
            "type": "integer",
            "title": "Status"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "agentId",
          "status",
          "message"
        ],
        "title": "ErrorModel"
      },
      "ErrorResponseModel": {
        "properties": {
          "status": {
            "type": "integer",
            "title": "Status"
          },
          "error": {
            "type": "string",
            "title": "Error"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "errorCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Errorcode"
          }
        },
        "type": "object",
        "required": [
          "status",
          "error",
          "message"
        ],
        "title": "ErrorResponseModel",
        "description": "The platform's unified error body (``common.logging.logging_config.error_response``)."
      },
      "ExpertRef": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "agentId": {
            "type": "string",
            "format": "uuid",
            "title": "Agentid"
          },
          "versionId": {
            "type": "string",
            "title": "Versionid",
            "default": "latest"
          }
        },
        "type": "object",
        "required": [
          "name",
          "agentId"
        ],
        "title": "ExpertRef",
        "description": "Reference to a stored expert agent and version."
      },
      "FileUploadRequest": {
        "properties": {
          "fileName": {
            "type": "string",
            "minLength": 1,
            "title": "Filename",
            "description": "Name of the file to upload, including the file extension (e.g. 'report.csv', 'data.xlsx'). Must not contain path separators, path traversal sequences, NUL/newline characters, or ';', and must be 255 characters or fewer."
          },
          "mediaType": {
            "type": "string",
            "title": "Mediatype",
            "description": "IANA media type (MIME type) of the file. Must be one of the supported types: text/plain, text/csv, text/tab-separated-values, text/html, text/markdown, text/xml, application/json, application/xml, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet."
          },
          "sizeBytes": {
            "type": "integer",
            "maximum": 104857600.0,
            "exclusiveMinimum": 0.0,
            "title": "Sizebytes",
            "description": "Exact size of the file in bytes. Must be between 1 and 104,857,600 (100 MB)."
          },
          "accessScope": {
            "$ref": "#/components/schemas/AccessScope",
            "description": "Access scope for the uploaded file. Use type 'user' for private files (default), 'tenant' for organization-wide sharing."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "fileName",
          "mediaType",
          "sizeBytes"
        ],
        "title": "FileUploadRequest",
        "description": "Request to create a file upload session.\n\nThe client declares the file metadata up front; the server returns a presigned\nPUT URL that enforces the declared ``sizeBytes`` via SigV4 signing.",
        "examples": [
          {
            "accessScope": {
              "type": "user"
            },
            "fileName": "data.csv",
            "mediaType": "text/csv",
            "sizeBytes": 1048576
          }
        ]
      },
      "FileUploadResponse": {
        "properties": {
          "fileId": {
            "type": "string",
            "format": "uuid",
            "title": "Fileid",
            "description": "Unique file identifier (UUID) for subsequent API calls."
          },
          "sizeBytes": {
            "type": "integer",
            "title": "Sizebytes",
            "description": "Size of the file in bytes."
          },
          "fileName": {
            "type": "string",
            "title": "Filename",
            "description": "Name of the file."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat",
            "description": "Timestamp when the upload session was created."
          },
          "uploadUrl": {
            "type": "string",
            "title": "Uploadurl",
            "description": "Presigned PUT URL for direct client upload to S3. Send a PUT request with the raw file bytes and matching Content-Type and Content-Length headers."
          },
          "uploadExpiresAt": {
            "type": "string",
            "format": "date-time",
            "title": "Uploadexpiresat",
            "description": "Timestamp when the upload URL expires."
          }
        },
        "type": "object",
        "required": [
          "fileId",
          "sizeBytes",
          "fileName",
          "createdAt",
          "uploadUrl",
          "uploadExpiresAt"
        ],
        "title": "FileUploadResponse",
        "description": "Response containing file upload session details.\n\nClients must PUT the raw file bytes to ``uploadUrl`` with the correct\n``Content-Type`` and ``Content-Length`` headers.  Both are signed into\nthe presigned URL via SigV4, so S3 rejects any request where either\nheader is missing or differs from the declared values."
      },
      "GlobalEntityNodeOutput": {
        "properties": {
          "nodeType": {
            "type": "string",
            "const": "GlobalEntity",
            "title": "Nodetype",
            "default": "GlobalEntity"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "canonicalName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonicalname"
          },
          "entityType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entitytype"
          },
          "documentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "GlobalEntityNodeOutput",
        "description": "A GlobalEntity from the Knowledge Graph."
      },
      "GovernanceRecordModel": {
        "properties": {
          "autonomyLevel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Autonomylevel",
            "description": "How much the agent may do without a human in the loop, e.g. 'L1'. Free-form because the scale is the customer's, not ours."
          },
          "enforcementMode": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Enforcementmode",
            "description": "Whether the agent's guardrails block or only report, e.g. 'blocking'."
          },
          "sponsor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Sponsor",
            "description": "The business owner accountable for this agent operating."
          },
          "issuingAuthorityUnit": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Issuingauthorityunit",
            "description": "The body that approved it, e.g. 'AI Governance Committee'."
          },
          "guardrailProfileId": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrailprofileid",
            "description": "Identifier of the guardrail profile the approval was granted under."
          },
          "scopeTags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopetags",
            "description": "Boundaries the approval is limited to, e.g. ['draft-only', 'epr:read']. A set in the credential, so order is not significant."
          },
          "complianceClaims": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complianceclaims",
            "description": "Frameworks this approval asserts compliance with, e.g. ['dpia']."
          },
          "conditions": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conditions",
            "description": "Conditions attached to the approval. Structured, but its shape is the customer's: the vocabulary declares this term an opaque JSON literal."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "GovernanceRecordModel",
        "description": "The governance decision, as validated fields rather than a free-form blob.\n\nEvery field here maps to a term the ``hyagt`` vocabulary defines, so these become\nfirst-class, machine-readable credential content that a verifier can reason about.\nThat is the point of typing them: as opaque keys inside ``extensions`` they were\nunreadable to anything but a human, and unvalidated, so a typo or an invented key\nwas signed into a permanent public document without complaint.\n\nDeliberately absent: a reviewer's name. It was previously accepted here as free\ntext, which made the credential assert a reviewer nobody had authenticated, and it\ncould contradict the token-derived decider recorded on the passport. The server now\nsupplies ``issuingAuthorityUnit``-adjacent attribution from the verified principal\ninstead, so the credential cannot name someone who did not approve it."
      },
      "GraphRAGCustomOutputs": {
        "properties": {
          "sourceNodes": {
            "items": {
              "$ref": "#/components/schemas/SourceNode"
            },
            "type": "array",
            "title": "Sourcenodes"
          },
          "knowledgeGraphNodes": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/DocumentNodeOutput"
                },
                {
                  "$ref": "#/components/schemas/TextChunkNodeOutput"
                },
                {
                  "$ref": "#/components/schemas/GlobalEntityNodeOutput"
                },
                {
                  "$ref": "#/components/schemas/LocalEntityNodeOutput"
                },
                {
                  "$ref": "#/components/schemas/BusinessObjectNodeOutput"
                },
                {
                  "$ref": "#/components/schemas/MetadataKVNodeOutput"
                }
              ],
              "discriminator": {
                "propertyName": "nodeType",
                "mapping": {
                  "BusinessObject": "#/components/schemas/BusinessObjectNodeOutput",
                  "Document": "#/components/schemas/DocumentNodeOutput",
                  "GlobalEntity": "#/components/schemas/GlobalEntityNodeOutput",
                  "LocalEntity": "#/components/schemas/LocalEntityNodeOutput",
                  "MetadataKV": "#/components/schemas/MetadataKVNodeOutput",
                  "TextChunk": "#/components/schemas/TextChunkNodeOutput"
                }
              }
            },
            "type": "array",
            "title": "Knowledgegraphnodes"
          },
          "followUpPrompts": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Followupprompts"
          }
        },
        "type": "object",
        "title": "GraphRAGCustomOutputs",
        "description": "Structured graph context returned to the API consumer.\n\nContains both flat source_nodes (for citations) and typed graph nodes\n(for entity-level rendering). source_nodes include results from both\nsemantic search (Content Lake) and graph entity conversion."
      },
      "GuardrailConfig": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the guardrail"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config",
            "description": "Configuration parameters for the guardrail, validated against the guardrail's input schema"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "GuardrailConfig",
        "description": "Guardrail configuration model."
      },
      "GuardrailList": {
        "properties": {
          "guardrails": {
            "items": {
              "$ref": "#/components/schemas/GuardrailModel"
            },
            "type": "array",
            "title": "Guardrails"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "guardrails",
          "pagination"
        ],
        "title": "GuardrailList",
        "description": "Model for paginated list of Guardrails."
      },
      "GuardrailModel": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GuardrailParameters"
              },
              {
                "type": "null"
              }
            ]
          },
          "isRecommended": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Isrecommended"
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "GuardrailModel",
        "description": "Model representing a guardrail with its parameter schema.\n\nNull parameter fields are omitted from JSON responses per REST conventions.",
        "examples": [
          {
            "description": "Filters content related to insults with high strength.",
            "isRecommended": true,
            "mode": "during_call",
            "name": "HAIP-Insults-High"
          },
          {
            "description": "Limits discussion of predefined restricted topics to support organizational, legal, or policy boundaries. The outcome is targeted risk control without affecting unrelated or permitted conversations.",
            "isRecommended": false,
            "mode": "pre_call",
            "name": "HAIP-Topic-Guardrail",
            "parameters": {
              "input": {
                "properties": {
                  "forbidden_topics": {
                    "description": "List of topic strings that the guardrail should block (e.g. ['Finance', 'Legal']).",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "forbidden_topics"
                ],
                "type": "object"
              }
            }
          },
          {
            "description": "Requires responses to rely on the provided source context and discourages external or fabricated information. The outcome is high factual integrity, transparency, and trust in AI-generated outputs.",
            "isRecommended": false,
            "mode": "post_call",
            "name": "HAIP-Grounding-Custom",
            "parameters": {
              "output": {
                "properties": {
                  "haip_guardrail_check": {
                    "description": "Grounding check result returned in the response body. Each object contains 'guardrail_name' (str) and 'is_grounded' (bool).",
                    "items": {
                      "properties": {
                        "guardrail_name": {
                          "type": "string"
                        },
                        "is_grounded": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "guardrail_name",
                        "is_grounded"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          }
        ]
      },
      "GuardrailParameters": {
        "properties": {
          "input": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input"
          },
          "output": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          }
        },
        "type": "object",
        "title": "GuardrailParameters",
        "description": "Parameter schema for guardrails.\n\nContains optional input and output parameter definitions as JSON Schema objects."
      },
      "HTTPValidationError": {
        "type": "object",
        "title": "HTTPValidationError",
        "properties": {
          "status": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "errorCode": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "error",
          "message"
        ]
      },
      "HealthCheckConfig": {
        "properties": {
          "initialDelaySeconds": {
            "type": "integer",
            "maximum": 600.0,
            "minimum": 0.0,
            "title": "Initialdelayseconds",
            "description": "Initial delay before first health check in seconds. Critical for async validation: allows server initialization time before health check. Only relevant for async mode - omitted from response for immediate mode."
          },
          "timeoutSeconds": {
            "type": "integer",
            "maximum": 30.0,
            "minimum": 1.0,
            "title": "Timeoutseconds",
            "description": "Timeout for health check ping operation in seconds. IMPORTANT: Keep this short (5-10s recommended) because immediate validation runs inside database transactions. Long timeouts can cause database locks and connection pool issues. This is the timeout for the health check itself, not the overall validation process."
          }
        },
        "type": "object",
        "title": "HealthCheckConfig",
        "description": "Health check configuration for MCP server."
      },
      "InferenceConfig": {
        "properties": {
          "temperature": {
            "type": "number",
            "title": "Temperature",
            "description": "Temperature for inference (0.0 to 1.0)",
            "default": 0.0
          },
          "maxRetries": {
            "type": "integer",
            "title": "Max Retries",
            "description": "Maximum number of retries for inference",
            "default": 10
          },
          "timeout": {
            "type": "integer",
            "title": "Timeout",
            "description": "Timeout for inference in seconds",
            "default": 3600
          },
          "maxTokens": {
            "type": "integer",
            "title": "Max Tokens",
            "description": "Maximum number of tokens to generate",
            "default": 4000
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "InferenceConfig"
      },
      "InputDocumentContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "document",
            "title": "Type",
            "default": "document"
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "description": "A name for the document. Min 1, Max 200 chars. Allowed: alphanumeric, single spaces, hyphens, parentheses, square brackets. Note: This field is vulnerable to prompt injections; use a neutral name."
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Base64DocumentSource"
              },
              {
                "$ref": "#/components/schemas/UrlDocumentSource"
              },
              {
                "$ref": "#/components/schemas/PathDocumentSource"
              }
            ],
            "title": "Source",
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "base64": "#/components/schemas/Base64DocumentSource",
                "s3_path": "#/components/schemas/PathDocumentSource",
                "url": "#/components/schemas/UrlDocumentSource"
              }
            }
          }
        },
        "type": "object",
        "required": [
          "name",
          "source"
        ],
        "title": "InputDocumentContent",
        "description": "Document input content type."
      },
      "InputFileAnalysisContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "file_analysis",
            "title": "Type",
            "default": "file_analysis"
          },
          "fileId": {
            "type": "string",
            "minLength": 1,
            "title": "Fileid",
            "description": "Unique file identifier (UUID) from the File Management API."
          },
          "fileName": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Filename",
            "description": "Original filename for the file in the sandbox"
          },
          "mediaType": {
            "type": "string",
            "title": "Mediatype",
            "description": "MIME type of the file (e.g., text/csv, application/json)"
          }
        },
        "type": "object",
        "required": [
          "fileId",
          "fileName",
          "mediaType"
        ],
        "title": "InputFileAnalysisContent",
        "description": "File analysis content for code execution sandbox files.\n\nUsed to pass file references from File Management API to code execution tools.\nFiles are uploaded to the code interpreter sandbox with a shared session ID."
      },
      "InputImageContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "image",
            "title": "Type",
            "default": "image"
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Base64ImageSource"
              },
              {
                "$ref": "#/components/schemas/UrlImageSource"
              },
              {
                "$ref": "#/components/schemas/PathImageSource"
              }
            ],
            "title": "Source",
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "base64": "#/components/schemas/Base64ImageSource",
                "s3_path": "#/components/schemas/PathImageSource",
                "url": "#/components/schemas/UrlImageSource"
              }
            }
          }
        },
        "type": "object",
        "required": [
          "source"
        ],
        "title": "InputImageContent",
        "description": "Image input content type, compatible with Claude's image structure."
      },
      "InputTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type",
            "default": "text"
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "The text content"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "InputTextContent",
        "description": "Text input content type."
      },
      "JsonValue": {},
      "LLMModel": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "badge": {
            "type": "string",
            "title": "Badge"
          },
          "metadata": {
            "type": "string",
            "title": "Metadata"
          },
          "agentTypes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Agenttypes"
          },
          "capabilities": {
            "additionalProperties": true,
            "type": "object",
            "title": "Capabilities"
          },
          "regions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Regions"
          },
          "deprecationStatus": {
            "$ref": "#/components/schemas/DeprecationStatus",
            "default": {
              "deprecated": false,
              "deprecationDate": "",
              "replacementModelName": ""
            }
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "badge",
          "metadata",
          "agentTypes",
          "capabilities",
          "regions"
        ],
        "title": "LLMModel",
        "description": "Model representing an LLM (Large Language Model) with its metadata.",
        "examples": [
          {
            "agentTypes": [
              "rag",
              "tool",
              "task"
            ],
            "badge": "Fast",
            "capabilities": {
              "functionCalling": true,
              "maxContextLength": 128000,
              "maxOutputTokens": 10000,
              "streaming": true,
              "toolChoice": false
            },
            "deprecationStatus": {
              "deprecated": false,
              "deprecationDate": "",
              "replacementModelName": ""
            },
            "description": "A small and efficient model from Amazon for RAG tasks.",
            "id": "amazon.nova-micro-v1:0",
            "metadata": "recommended",
            "name": "Amazon Nova Micro",
            "regions": [
              "us-east-1",
              "us-west-1"
            ]
          }
        ]
      },
      "LLMModelList": {
        "properties": {
          "models": {
            "items": {
              "$ref": "#/components/schemas/LLMModel"
            },
            "type": "array",
            "title": "Models"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "models",
          "pagination"
        ],
        "title": "LLMModelList",
        "description": "Model for paginated list of LLM models."
      },
      "LocalEntityNodeOutput": {
        "properties": {
          "nodeType": {
            "type": "string",
            "const": "LocalEntity",
            "title": "Nodetype",
            "default": "LocalEntity"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "mentionText": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mentiontext"
          },
          "entityType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entitytype"
          },
          "sentiment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sentiment"
          },
          "documentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "LocalEntityNodeOutput",
        "description": "A LocalEntity mention from the Knowledge Graph."
      },
      "MCPAuthType": {
        "type": "string",
        "enum": [
          "oidc",
          "apiKey",
          "passthrough"
        ],
        "title": "MCPAuthType",
        "description": "Enumeration of supported authentication types for MCP servers."
      },
      "MCPClientConfig": {
        "properties": {
          "timeoutSeconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 900.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout Seconds",
            "description": "Tool call timeout in seconds. Controls how long the agent waits for an MCP tool to respond before timing out. Default: 300s (5 min). Max: 900s (15 min)."
          },
          "sseReadTimeoutSeconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 900.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "SSE Read Timeout Seconds",
            "description": "SSE stream read timeout in seconds. Controls how long the client waits for data on an open SSE connection before timing out. Default: 300s (5 min). Max: 900s (15 min)."
          }
        },
        "type": "object",
        "title": "MCPClientConfig",
        "description": "Client-configurable MCP connection parameters.\n\nAll fields are optional \u2014 omitted fields fall back to platform defaults\nfrom mcp.execution settings (app_configs.yaml).\n\nUpper bound of 900s (15 min) aligns with AWS best practices for MCP context messaging.\nBeyond 15 min, the MCP server should implement async task management.\nSee: https://aws.amazon.com/blogs/machine-learning/build-long-running-mcp-servers-on-amazon-bedrock-agentcore-with-strands-agents-integration/"
      },
      "MCPConfiguration": {
        "properties": {
          "timeoutSeconds": {
            "type": "integer",
            "maximum": 300.0,
            "minimum": 1.0,
            "title": "Timeoutseconds",
            "description": "Tool execution timeout in seconds. This controls how long the agent is willing to wait for tool operations. Independent of server-side limits. Used by agent runtime (not validation)."
          },
          "retries": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 0.0,
            "title": "Retries",
            "description": "Retry count for failed tool calls"
          },
          "healthCheck": {
            "$ref": "#/components/schemas/HealthCheckConfig",
            "description": "Health check configuration with context-aware fields based on validation mode."
          }
        },
        "type": "object",
        "title": "MCPConfiguration",
        "description": "Configuration settings for MCP server."
      },
      "MCPHealthInfo": {
        "properties": {
          "state": {
            "$ref": "#/components/schemas/MCPHealthState",
            "description": "Current health check state"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completedat",
            "description": "ISO timestamp when health check completed"
          },
          "failures": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Failures",
            "description": "List of health check failures"
          }
        },
        "type": "object",
        "required": [
          "state"
        ],
        "title": "MCPHealthInfo",
        "description": "Health check information for MCP server (ADR 0003 - MCP Server Registration API Redesign specification)."
      },
      "MCPHealthState": {
        "type": "string",
        "enum": [
          "unknown",
          "healthy",
          "unhealthy"
        ],
        "title": "MCPHealthState",
        "description": "MCP server health check status.\n\nUsed for:\n- Database schema (agent_orchestration)\n- Health check monitoring\n- API responses\n\nFollowing ADR-0003 (MCP Server Registration API Redesign) specification.\n\nStates:\n- UNKNOWN: Health checks enabled but not performed yet\n- HEALTHY: Health check passed successfully\n- UNHEALTHY: Health check failed"
      },
      "MCPOrigin": {
        "type": "string",
        "enum": [
          "system",
          "internal",
          "external",
          "partner"
        ],
        "title": "MCPOrigin",
        "description": "Origin type for MCP servers and agents.\n\nUsed for:\n- Database schema (agent_orchestration)\n- API responses\n- Access control and filtering\n\nTypes:\n- SYSTEM: Platform-managed servers (bootstrapped automatically, e.g., tool_runtime)\n- INTERNAL: User-registered servers within their organization\n- EXTERNAL: Third-party or public servers registered by users\n- PARTNER: Certified partner-provided servers"
      },
      "MCPServerCreateModel": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Server description"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPConfiguration"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server configuration settings"
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "Optional client-provided UUID. If not provided, server will generate one automatically."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Server name"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "MCP server URL"
          },
          "validationMode": {
            "$ref": "#/components/schemas/MCPValidationMode",
            "description": "Validation mode for the server",
            "default": "immediate"
          },
          "visibility": {
            "$ref": "#/components/schemas/MCPVisibility",
            "description": "Server visibility level",
            "default": "private"
          },
          "auth": {
            "$ref": "#/components/schemas/AuthConfig",
            "description": "Authentication configuration"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "url",
          "auth"
        ],
        "title": "MCPServerCreateModel",
        "description": "Model for creating MCP servers with (ADR 0003 - MCP Server Registration API Redesign specification) fields.\n\nSupports optional client-provided UUID for enterprise integration scenarios."
      },
      "MCPServerDeleteModel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique server identifier"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "MCPServerDeleteModel"
      },
      "MCPServerInfo": {
        "properties": {
          "version": {
            "type": "string",
            "title": "Version",
            "description": "Server version as reported by the MCP server during initialize handshake. Value 'unknown' indicates not yet discovered.",
            "default": "unknown"
          },
          "protocolVersion": {
            "type": "string",
            "title": "Protocolversion",
            "description": "MCP protocol version supported by the server. Value 'unknown' indicates not yet discovered.",
            "default": "unknown"
          }
        },
        "type": "object",
        "title": "MCPServerInfo",
        "description": "MCP server information discovered during initialize handshake.\n\nContains intrinsic server properties obtained from the MCP protocol\ninitialize handshake. This data is populated after successful validation\nand provides insight into the server's capabilities and version."
      },
      "MCPServerListModel": {
        "properties": {
          "mcpServers": {
            "items": {
              "$ref": "#/components/schemas/MCPServerModel"
            },
            "type": "array",
            "title": "Mcpservers"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "mcpServers",
          "pagination"
        ],
        "title": "MCPServerListModel"
      },
      "MCPServerModel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique server identifier"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Server name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Server description"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "MCP server URL"
          },
          "validationMode": {
            "$ref": "#/components/schemas/MCPValidationMode",
            "description": "Validation mode for the server"
          },
          "status": {
            "$ref": "#/components/schemas/MCPServerStatus",
            "description": "Current server status"
          },
          "validation": {
            "$ref": "#/components/schemas/MCPValidationInfo",
            "description": "Validation information"
          },
          "health": {
            "$ref": "#/components/schemas/MCPHealthInfo",
            "description": "Health check information"
          },
          "serverInfo": {
            "$ref": "#/components/schemas/MCPServerInfo",
            "description": "MCP server info from the initialization handshake (version and protocol)"
          },
          "visibility": {
            "$ref": "#/components/schemas/MCPVisibility",
            "description": "Server visibility level"
          },
          "auth": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth",
            "description": "Sanitized authentication configuration"
          },
          "origin": {
            "$ref": "#/components/schemas/OriginInfo",
            "description": "Server origin information with extensible context"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPConfiguration"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server configuration settings"
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "title": "Accountid",
            "description": "Account identifier"
          },
          "environmentId": {
            "type": "string",
            "format": "uuid",
            "title": "Environmentid",
            "description": "Environment identifier"
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat",
            "description": "Creation timestamp"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby",
            "description": "Created by"
          },
          "modifiedAt": {
            "type": "string",
            "title": "Modifiedat",
            "description": "Modification timestamp"
          },
          "modifiedBy": {
            "type": "string",
            "title": "Modifiedby",
            "description": "Modified by"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "url",
          "validationMode",
          "status",
          "validation",
          "health",
          "visibility",
          "origin",
          "accountId",
          "environmentId",
          "createdAt",
          "createdBy",
          "modifiedAt",
          "modifiedBy"
        ],
        "title": "MCPServerModel",
        "description": "Model for MCP server responses with (ADR 0003 - MCP Server Registration API Redesign specification) fields."
      },
      "MCPServerReference-Input": {
        "properties": {
          "validationMode": {
            "$ref": "#/components/schemas/ValidationMode",
            "title": "Validation Mode",
            "description": "The validation mode for the MCP tool",
            "default": "strict"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "ID",
            "description": "Immutable, precise references for production"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "URL",
            "description": "Location-based for deployment workflows"
          },
          "toolConfiguration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPToolConfiguration-Input"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Configuration",
            "description": "MCP tool configuration"
          },
          "clientConfig": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPClientConfig"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Config",
            "description": "Optional MCP client behavior overrides (timeout, SSE read timeout). Falls back to platform defaults when omitted."
          }
        },
        "type": "object",
        "title": "MCPServerReference",
        "description": "MCP server reference configuration"
      },
      "MCPServerReference-Output": {
        "properties": {
          "validationMode": {
            "$ref": "#/components/schemas/ValidationMode",
            "title": "Validation Mode",
            "description": "The validation mode for the MCP tool",
            "default": "strict"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "ID",
            "description": "Immutable, precise references for production"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "URL",
            "description": "Location-based for deployment workflows"
          },
          "toolConfiguration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPToolConfiguration-Output"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Configuration",
            "description": "MCP tool configuration"
          },
          "clientConfig": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPClientConfig"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Config",
            "description": "Optional MCP client behavior overrides (timeout, SSE read timeout). Falls back to platform defaults when omitted."
          }
        },
        "type": "object",
        "title": "MCPServerReference",
        "description": "MCP server reference configuration"
      },
      "MCPServerStatus": {
        "type": "string",
        "enum": [
          "active",
          "inactive",
          "error"
        ],
        "title": "MCPServerStatus",
        "description": "MCP server operational status.\n\nUsed for:\n- Database schema (agent_orchestration)\n- Internal Query API DTOs (agent_runtime)\n- API responses"
      },
      "MCPServerToolsModel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "serverName": {
            "type": "string",
            "title": "Servername"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/MCPToolModel"
            },
            "type": "array",
            "title": "Tools"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "id",
          "serverName",
          "url",
          "tools",
          "count"
        ],
        "title": "MCPServerToolsModel"
      },
      "MCPServerUpdateModel": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Server description"
          },
          "configuration": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPConfiguration"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server configuration settings"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Server name"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url",
            "description": "MCP server URL"
          },
          "validationMode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPValidationMode"
              },
              {
                "type": "null"
              }
            ],
            "description": "Validation mode for the server"
          },
          "visibility": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPVisibility"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server visibility level"
          },
          "auth": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuthConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authentication configuration"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "MCPServerUpdateModel",
        "description": "Model for updating MCP servers with (ADR 0003 - MCP Server Registration API Redesign specification) fields."
      },
      "MCPServerValidationResultModel": {
        "properties": {
          "serverId": {
            "type": "string",
            "format": "uuid",
            "title": "Serverid",
            "description": "UUID of validated server"
          },
          "validationState": {
            "$ref": "#/components/schemas/MCPValidationState",
            "description": "Overall validation result"
          },
          "healthState": {
            "$ref": "#/components/schemas/MCPHealthState",
            "description": "Server health status"
          },
          "status": {
            "$ref": "#/components/schemas/MCPServerStatus",
            "description": "Server operational status"
          },
          "lastValidatedAt": {
            "type": "string",
            "title": "Lastvalidatedat",
            "description": "Timestamp when validation completed"
          },
          "failures": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Failures",
            "description": "List of validation failures (empty if successful)"
          },
          "serverInfo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPServerInfo"
              },
              {
                "type": "null"
              }
            ],
            "description": "Server information from MCP handshake (if successful)"
          },
          "trigger": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPValidationTrigger"
              },
              {
                "type": "null"
              }
            ],
            "description": "Trigger source (auto/manual)"
          }
        },
        "type": "object",
        "required": [
          "serverId",
          "validationState",
          "healthState",
          "status",
          "lastValidatedAt"
        ],
        "title": "MCPServerValidationResultModel",
        "description": "Response model for on-demand MCP server validation.\n\nReturned by POST /v1/mcp-servers/{server_id}/validate endpoint.\nContains validation results, health status, and any failures encountered."
      },
      "MCPToolConfiguration-Input": {
        "properties": {
          "allowedTools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Tools",
            "description": "Specifies exactly which tools/functions this MCP server can execute for this agent, implementing the principle of least privilege"
          }
        },
        "type": "object",
        "title": "MCPToolConfiguration"
      },
      "MCPToolConfiguration-Output": {
        "properties": {
          "allowedTools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Tools",
            "description": "Specifies exactly which tools/functions this MCP server can execute for this agent, implementing the principle of least privilege"
          }
        },
        "type": "object",
        "title": "MCPToolConfiguration"
      },
      "MCPToolModel": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "inputSchema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Inputschema"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "inputSchema"
        ],
        "title": "MCPToolModel"
      },
      "MCPValidationInfo": {
        "properties": {
          "state": {
            "$ref": "#/components/schemas/MCPValidationState",
            "description": "Current validation state"
          },
          "trigger": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MCPValidationTrigger"
              },
              {
                "type": "null"
              }
            ],
            "description": "Trigger source (auto/manual)"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completedat",
            "description": "ISO timestamp when validation completed"
          },
          "failures": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Failures",
            "description": "List of validation failures"
          }
        },
        "type": "object",
        "required": [
          "state"
        ],
        "title": "MCPValidationInfo",
        "description": "Validation information for MCP server."
      },
      "MCPValidationMode": {
        "type": "string",
        "enum": [
          "immediate",
          "async",
          "skip"
        ],
        "title": "MCPValidationMode",
        "description": "MCP server validation execution mode.\n\nUsed for:\n- Database schema (agent_orchestration)\n- Validation service logic\n- API request parameters\n\nModes:\n- IMMEDIATE: Validate server synchronously during registration (blocks API response)\n- ASYNC: Queue validation as background task (returns immediately)\n- SKIP: No validation performed (for trusted/pre-validated servers)"
      },
      "MCPValidationState": {
        "type": "string",
        "enum": [
          "pending",
          "completed",
          "failed",
          "skipped"
        ],
        "title": "MCPValidationState",
        "description": "MCP server validation workflow state.\n\nUsed for:\n- Database schema (agent_orchestration)\n- Async validation tracking\n- API responses\n\nStates:\n- PENDING: Validation queued but not started\n- COMPLETED: Validation finished successfully\n- FAILED: Validation encountered errors\n- SKIPPED: Validation not required (validation_mode=skip)"
      },
      "MCPValidationTrigger": {
        "type": "string",
        "enum": [
          "auto",
          "manual"
        ],
        "title": "MCPValidationTrigger",
        "description": "Validation trigger source.\n\nUsed for:\n- Database schema (agent_orchestration)\n- API responses\n- Identifying auto vs manual validation\n\nTriggers:\n- AUTO: Validation triggered automatically by system (create, update, background)\n- MANUAL: Validation triggered manually by user request"
      },
      "MCPVisibility": {
        "type": "string",
        "enum": [
          "private",
          "public",
          "organization"
        ],
        "title": "MCPVisibility",
        "description": "MCP server visibility scope for multi-tenant access control.\n\nUsed for:\n- Database schema (agent_orchestration)\n- Internal Query API DTOs (agent_runtime)\n- API responses and filtering\n\nScopes:\n- PRIVATE: Only accessible to owning account/environment\n- PUBLIC: Accessible to all accounts (platform-wide)\n- ORGANIZATION: Accessible to all environments within same account"
      },
      "Message": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "Message"
      },
      "MessageModel": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "assistant",
              "user"
            ],
            "title": "Role"
          },
          "content": {
            "anyOf": [
              {
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InputTextContent"
                    },
                    {
                      "$ref": "#/components/schemas/InputImageContent"
                    },
                    {
                      "$ref": "#/components/schemas/InputDocumentContent"
                    },
                    {
                      "$ref": "#/components/schemas/InputFileAnalysisContent"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "type",
                    "mapping": {
                      "document": "#/components/schemas/InputDocumentContent",
                      "file_analysis": "#/components/schemas/InputFileAnalysisContent",
                      "image": "#/components/schemas/InputImageContent",
                      "text": "#/components/schemas/InputTextContent"
                    }
                  }
                },
                "type": "array"
              },
              {
                "type": "string"
              }
            ],
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "MessageModel",
        "description": "Enhanced message model with comprehensive content validation.",
        "examples": [
          {
            "content": [
              {
                "text": "What is the company's sick leave policy?",
                "type": "text"
              }
            ],
            "role": "user"
          },
          {
            "content": "What is the company's sick leave policy?",
            "role": "user"
          },
          {
            "content": [
              {
                "text": "How much are wings?",
                "type": "text"
              },
              {
                "source": {
                  "mediaType": "image/jpeg",
                  "type": "url",
                  "url": "https://example.com/menu.jpg"
                },
                "type": "image"
              }
            ],
            "role": "user"
          },
          {
            "content": [
              {
                "text": "Analyze this document",
                "type": "text"
              },
              {
                "name": "Report",
                "source": {
                  "mediaType": "application/pdf",
                  "path": "s3://bucket/file.pdf",
                  "type": "s3_path"
                },
                "type": "document"
              }
            ],
            "role": "user"
          },
          {
            "content": [
              {
                "text": "Describe this base64 image.",
                "type": "text"
              },
              {
                "source": {
                  "data": "iVBORw0KGgoAAAANSUhEUgAAAAUA...",
                  "mediaType": "image/png",
                  "type": "base64"
                },
                "type": "image"
              }
            ],
            "role": "user"
          },
          {
            "content": [
              {
                "text": "What about this image from S3?",
                "type": "text"
              },
              {
                "source": {
                  "mediaType": "image/jpeg",
                  "path": "s3://my-bucket/my-image.jpg",
                  "type": "s3_path"
                },
                "type": "image"
              }
            ],
            "role": "user"
          },
          {
            "content": [
              {
                "text": "Analyze this CSV file and create visualizations",
                "type": "text"
              },
              {
                "fileId": "uuid",
                "fileName": "data.csv",
                "mediaType": "text/csv",
                "type": "file_analysis"
              }
            ],
            "role": "user"
          }
        ]
      },
      "MetadataKVNodeOutput": {
        "properties": {
          "nodeType": {
            "type": "string",
            "const": "MetadataKV",
            "title": "Nodetype",
            "default": "MetadataKV"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "valueType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valuetype"
          },
          "documentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "MetadataKVNodeOutput",
        "description": "A MetadataKV pair from the Knowledge Graph."
      },
      "OIDCAuthConfig": {
        "properties": {
          "type": {
            "type": "string",
            "const": "oidc",
            "title": "Type",
            "description": "Authentication type discriminator",
            "default": "oidc"
          },
          "issuer": {
            "type": "string",
            "title": "Issuer",
            "description": "OIDC issuer URL"
          },
          "clientId": {
            "type": "string",
            "title": "Clientid",
            "description": "OAuth2 client ID"
          },
          "clientSecret": {
            "type": "string",
            "format": "password",
            "title": "Clientsecret",
            "description": "OAuth2 client secret (SecretStr for security)",
            "writeOnly": true
          },
          "grantType": {
            "type": "string",
            "const": "client_credentials",
            "title": "Granttype",
            "description": "OAuth2 grant type",
            "default": "client_credentials"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes",
            "description": "OAuth2 scopes to request"
          },
          "audience": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audience",
            "description": "OAuth2 audience parameter"
          }
        },
        "type": "object",
        "required": [
          "issuer",
          "clientId",
          "clientSecret",
          "scopes"
        ],
        "title": "OIDCAuthConfig",
        "description": "OIDC authentication configuration.\n\nSecurity: client_secret uses SecretStr to prevent accidental secret leakage.\nUse .get_secret_value() only when the actual value is needed for operations."
      },
      "OriginInfo": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/MCPOrigin",
            "description": "Origin type indicating the source of the server"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "OriginInfo",
        "description": "Origin information for MCP servers providing extensible context."
      },
      "Pagination": {
        "properties": {
          "totalItems": {
            "type": "integer",
            "title": "Totalitems"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "hasMore": {
            "type": "boolean",
            "title": "Hasmore"
          }
        },
        "type": "object",
        "required": [
          "totalItems",
          "offset",
          "limit",
          "hasMore"
        ],
        "title": "Pagination"
      },
      "PassportApproveRequestModel": {
        "properties": {
          "expiresAt": {
            "type": "string",
            "format": "date",
            "title": "Expiresat",
            "description": "The date this passport expires, after which the version cannot be invoked until it is recertified. Required, and bounded by the platform's configured minimum and maximum credential lifetimes."
          },
          "governanceRecord": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GovernanceRecordModel"
              },
              {
                "type": "null"
              }
            ],
            "description": "The governance decision, embedded in the credential as defined vocabulary terms rather than opaque data."
          },
          "extensions": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extensions",
            "description": "Metadata with no vocabulary term of its own, embedded under the credential's 'extensions' term. Any JSON structure is accepted; keys are yours to choose, and nothing here is validated, interpreted or enforced by this platform. It is a record of what the agent was approved to do, not a control on what it does: the behaviour it describes has to be configured on the agent itself (for example a tool's `humanInTheLoopPolicy`), and this credential does not cause it. Put anything a verifier should read machine-readably in `governanceRecord`, where it becomes a defined credential term."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "Optional justification, returned as `decisionReason` on subsequent reads. Stored locally for audit and never embedded in the credential."
          }
        },
        "type": "object",
        "required": [
          "expiresAt"
        ],
        "title": "PassportApproveRequestModel",
        "description": "Body for approve. The expiry is required; the governance record is not.\n\n``governanceRecord`` is validated and mapped onto defined vocabulary terms.\n``extensions`` remains for metadata that has no term: it maps to the ``extensions``\nterm, which the vocabulary declares ``\"@type\": \"@json\"``, so its inner keys are\nopaque literals exempt from JSON-LD term definitions. That makes it the only safe\nroute for arbitrary structure, where a caller-supplied *top-level* key would\nproduce a credential that permanently fails validation.\n\n``reason`` is optional here, alone among the decisions. An approval issues a\ncredential, and that credential is itself the durable record: who approved it,\nwhich configuration it covers, when it was issued and when it expires. A refusal\nproduces no such artefact, which is why the other endpoints require one.",
        "examples": [
          {
            "expiresAt": "2027-11-09",
            "extensions": {
              "operatingConstraints": "High-risk actions require human approval before execution."
            },
            "governanceRecord": {
              "autonomyLevel": "L1",
              "complianceClaims": [
                "dpia"
              ],
              "conditions": {
                "humanReviewRequiredFor": [
                  "patient-facing output"
                ]
              },
              "enforcementMode": "blocking",
              "issuingAuthorityUnit": "AI Governance Committee",
              "scopeTags": [
                "draft-only"
              ],
              "sponsor": "Outpatients Service Owner"
            },
            "reason": "Committee approved with conditions"
          }
        ]
      },
      "PassportDetailsModel": {
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid",
            "title": "Agentid"
          },
          "agentName": {
            "type": "string",
            "title": "Agentname"
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "title": "Versionid"
          },
          "versionNumber": {
            "type": "integer",
            "title": "Versionnumber"
          },
          "versionLabel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Versionlabel"
          },
          "isCurrentVersion": {
            "type": "boolean",
            "title": "Iscurrentversion"
          },
          "status": {
            "$ref": "#/components/schemas/PassportStatus"
          },
          "did": {
            "type": "string",
            "title": "Did"
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat"
          },
          "credentialUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Credentialurl"
          },
          "issuedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issuedat"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiresat"
          },
          "reconciliationRequired": {
            "type": "boolean",
            "title": "Reconciliationrequired",
            "default": false
          },
          "decidedBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decidedby"
          },
          "decidedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decidedat"
          },
          "decisionReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decisionreason"
          },
          "revokedBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revokedby"
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revokedat"
          },
          "revocationReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revocationreason"
          },
          "suspendedBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspendedby"
          },
          "suspendedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspendedat"
          },
          "suspensionReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suspensionreason"
          },
          "config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentConfig-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "configHash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confighash"
          },
          "modelId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modelid"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "submittedBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Submittedby"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "type": "object",
        "required": [
          "agentId",
          "agentName",
          "versionId",
          "versionNumber",
          "isCurrentVersion",
          "status",
          "did",
          "createdAt"
        ],
        "title": "PassportDetailsModel",
        "description": "One passport, with the agent and version context the dashboard renders.\n\n``agent_name`` and ``version_number`` are denormalised at read time via a join,\nnot duplicated in storage.\n\nOptional fields are absent rather than null in responses (the platform's JSON\nhandler strips ``None``), so ``credential_url`` and ``issued_at`` appear only on\nan issued passport.",
        "examples": [
          {
            "agentId": "e992554c-9284-4fe1-8b9c-3e98a717c30e",
            "agentName": "multiplier",
            "createdAt": "2026-09-08T20:26:09.573000+00:00",
            "did": "did:webvh:QmbeYVaER...:86c13ec1-0f38-442c-9038-73da71532062",
            "isCurrentVersion": true,
            "status": "pending_approval",
            "versionId": "17385687-48d3-4cc7-ac43-d59195d8d35a",
            "versionLabel": "v2.0",
            "versionNumber": 2
          }
        ]
      },
      "PassportErrorCode": {
        "type": "string",
        "enum": [
          "PASSPORT_NOT_PROVISIONED",
          "PASSPORT_PENDING_APPROVAL",
          "PASSPORT_ISSUANCE_FAILED",
          "PASSPORT_REJECTED",
          "PASSPORT_REVOKED",
          "PASSPORT_SUSPENDED",
          "PASSPORT_EXPIRED",
          "PASSPORT_REQUIRED",
          "PASSPORT_REFERENCE_UNPINNED"
        ],
        "title": "PassportErrorCode",
        "description": "Machine-readable reasons the passport gate refused an invocation.\n\nEmitted as ``errorCode`` on the invocation ``403``. This is a public contract:\nworkflow engines branch on these values (BPMN error events), so treat them like\nan interface, not log text. The human-facing ``message`` may be reworded freely;\nthese values may not.\n\nDeliberately not derived from ``PassportStatus``. The two happen to overlap today\nbut answer different questions (\"where is this version in governance\" versus \"why\nwas this call refused\"), and ``NOT_PROVISIONED`` has no status to derive from.\n\nOnly refusals get a code. An agent with no passport on *any* version is a legacy\nagent and is invoked successfully unless the environment's passport mode is\n``REQUIRED_FOR_ALL``, in which case it is refused with ``PASSPORT_REQUIRED``.\n\nConsumers must treat any ``403`` from an invocation endpoint as a refusal, whatever\nits ``errorCode``, and treat unrecognised values as refusals too: never as success\nand never as retryable. New codes are added over time."
      },
      "PassportImpactModel": {
        "properties": {
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Observedat"
          },
          "settingsRevision": {
            "type": "integer",
            "title": "Settingsrevision"
          },
          "settingsEtag": {
            "type": "string",
            "title": "Settingsetag"
          },
          "configuredMode": {
            "$ref": "#/components/schemas/PassportMode"
          },
          "effective": {
            "type": "boolean",
            "title": "Effective",
            "description": "False when the deployment's Passport Service is off."
          },
          "effectiveMode": {
            "$ref": "#/components/schemas/PassportMode"
          },
          "tenantAgentCount": {
            "type": "integer",
            "title": "Tenantagentcount"
          },
          "breakdown": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Breakdown"
          },
          "refusedUnder": {
            "additionalProperties": {
              "type": "integer"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/PassportMode"
            },
            "type": "object",
            "title": "Refusedunder"
          },
          "currentlyRefusedCount": {
            "type": "integer",
            "title": "Currentlyrefusedcount"
          },
          "transitions": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PassportTransitionModel"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/PassportMode"
            },
            "type": "object",
            "title": "Transitions"
          }
        },
        "type": "object",
        "required": [
          "observedAt",
          "settingsRevision",
          "settingsEtag",
          "configuredMode",
          "effective",
          "effectiveMode",
          "tenantAgentCount",
          "breakdown",
          "refusedUnder",
          "currentlyRefusedCount",
          "transitions"
        ],
        "title": "PassportImpactModel",
        "description": "Live, advisory preview of what each passport mode would refuse (no validator)."
      },
      "PassportListModel": {
        "properties": {
          "passports": {
            "items": {
              "$ref": "#/components/schemas/PassportDetailsModel"
            },
            "type": "array",
            "title": "Passports"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "passports",
          "pagination"
        ],
        "title": "PassportListModel",
        "description": "A page of passports."
      },
      "PassportMode": {
        "type": "string",
        "enum": [
          "DISABLED",
          "REQUIRED_FOR_NEW",
          "REQUIRED_FOR_ALL"
        ],
        "title": "PassportMode",
        "description": "Per-environment Agent Passport policy (environment settings, ``passport`` section).\n\nOne enum rather than two booleans, so \"disabled but enforcing\" is unrepresentable.\nThe values answer the admin's real question: who is a passport required for.\nGlobal (platform-authored) agents are exempt in every mode; ``REQUIRED_FOR_ALL``\nmeans all *tenant-authored* agents."
      },
      "PassportModel": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/PassportStatus"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiresat",
            "description": "When the credential stops being valid, as on `/v1/passports`. Omitted until the passport is issued."
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "PassportModel",
        "description": "Agent Passport state for an agent version.\n\nDeliberately just ``status`` and ``expires_at``. This is an enrichment on the agent\nresource, and the only question it needs to answer is whether the version may be\ninvoked and, if not, why. ``status`` alone cannot answer it, because expiry is not\na status: a lapsed passport stays ``issued`` with ``expires_at`` in the past, and\ninvocation refuses it as expired. Anything more belongs on ``/v1/passports``, which\nreturns ``PassportDetailsModel`` with the DID, credential URL, issuance time and\nreconciliation flag.\n\nTwo fields were removed on purpose after review:\n\n- ``version_id`` was redundant. Under ``VersionModel`` it repeated the parent\n  version's ``id``; under ``AgentModel`` it repeated ``current_version_id``, since\n  this is always the current version's passport.\n- ``did`` had no use for a client of this API. Every Passport Service operation is\n  proxied through us and keyed on ``version_id``, so a client never needs the DID.\n  Worse, its trailing path segment is the internal ``entity_key``, a disposable\n  surrogate that is burned and replaced on a provisioning retry, so publishing the\n  DID here leaked the one identifier this API is careful never to expose and\n  invited clients to key on a value that can change.\n\nAbsent from a response (rather than null) when the version has no passport. Clients\nmust treat absent as \"no passport\", which is the legacy pre-passport case and is\ninvocable.",
        "examples": [
          {
            "status": "pending_approval"
          }
        ]
      },
      "PassportRefusalErrorModel": {
        "properties": {
          "status": {
            "type": "integer",
            "title": "Status",
            "description": "Always 403.",
            "default": 403
          },
          "error": {
            "type": "string",
            "title": "Error",
            "description": "Human-facing title, e.g. 'Forbidden'."
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Human-facing explanation; may be reworded freely."
          },
          "errorCode": {
            "$ref": "#/components/schemas/PassportErrorCode",
            "description": "Machine-readable refusal reason. A public contract: branch on this."
          }
        },
        "type": "object",
        "required": [
          "error",
          "message",
          "errorCode"
        ],
        "title": "PassportRefusalErrorModel",
        "description": "The unified error body of an invocation refused by passport admission (403).\n\nConsumers must treat **any** 403 from an invocation endpoint as a refusal, whatever\nits ``errorCode``, and must treat unrecognized ``errorCode`` values as refusals too:\nnever as success, never as retryable. New codes are added over time."
      },
      "PassportRejectRequestModel": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "title": "Reason",
            "description": "Why the passport was rejected. Required: this is the only record the decision produces, since no credential is issued."
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "PassportRejectRequestModel",
        "description": "Body for reject. Mandatory, because ``reason`` is.\n\nA rejection issues no credential, so the passport row is the only record the\ndecision ever produces. An unexplained one leaves both an auditor and the team\nbuilding the next version with no idea what was wrong.\n\nDeliberately no ``extensions``: that field exists solely to become credential\ncontent, and a rejection has no credential to embed it in. It was previously\naccepted here and silently discarded.",
        "examples": [
          {
            "reason": "Tool grant exceeds the scope approved for this team"
          }
        ]
      },
      "PassportRevokeRequestModel": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "title": "Reason",
            "description": "Why the credential is being revoked. Forwarded to Passport Service and returned as `revocationReason` on subsequent reads."
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "PassportRevokeRequestModel",
        "description": "Body for revoke. Mandatory, because ``reason`` is.\n\nRevocation is irreversible and invalidates a credential third parties may already\nhave relied on, so it is the last action that should be possible without a stated\ncause. The reason is forwarded to Passport Service and stored on the row.",
        "examples": [
          {
            "reason": "Superseded by v3 after the Q3 model refresh"
          }
        ]
      },
      "PassportStatus": {
        "type": "string",
        "enum": [
          "pending_approval",
          "issued",
          "rejected",
          "issuance_failed",
          "revoked",
          "suspended"
        ],
        "title": "PassportStatus",
        "description": "Agent Passport lifecycle status, per agent version.\n\nUsed for:\n- Database schema (agent_orchestration, agent_passports.status)\n- API responses (the governance dashboard renders this directly)\n\nNamed for the governance lifecycle rather than our call sequence: these values\nreach a governance officer's screen, so they describe where a version sits in\nthe approval process, not which Passport Service endpoint we last called.\n\nLifecycle:\n- PENDING_APPROVAL: a DID exists but no credential. The version is NOT invocable\n  (Passport Service answers \"The identity does not have a passport\" for such a\n  DID) and is waiting for a governance decision.\n- ISSUED: approved, credential issued. The only state in which a version may be\n  invoked.\n- REJECTED: governance declined. No credential was issued.\n- ISSUANCE_FAILED: governance approved, but issuing the credential failed. The\n  DID is still valid, so this is retryable.\n- REVOKED: the credential was revoked, normally because the agent was deleted.\n  Retained as an audit record of a passport that once existed.\n- SUSPENDED: the credential is temporarily invalid. Reversible, unlike REVOKED:\n  unsuspending restores the very same credential and returns the passport to\n  ISSUED, rather than issuing a new one, so the DID, credential URL and approval\n  record all survive untouched. Invocation is refused here immediately, not only\n  by an external verifier. Revocable directly, so escalating a temporary hold to\n  permanent retirement does not require reinstating the credential first.\n\nNote ``REVOKED`` is the only terminal state. A rejected or failed version keeps\nits DID, so its row remains the live passport record for that version and can\nmove back to ``PENDING_APPROVAL`` on resubmission.\n\nWhether an upstream revocation still needs reconciling is tracked separately, on\n``agent_passports.reconciliation_required``: it is orthogonal to where the\npassport sits in the lifecycle, and folding it in here would force every client\nto know that one status displays like another."
      },
      "PassportSuspendRequestModel": {
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "title": "Reason",
            "description": "Why the passport is being suspended, or why it is being reinstated. Forwarded to Passport Service for both operations. Agent Builder returns the suspension reason as `suspensionReason` while the suspension is active; successful reinstatement clears that local record and does not retain the reinstatement reason."
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "PassportSuspendRequestModel",
        "description": "Body for suspend and unsuspend. Mandatory, because ``reason`` is.\n\nShared by both operations because Passport Service accepts the same lifecycle\nrequest. Agent Builder stores the suspension reason only while the suspension is\nactive. On successful unsuspend it clears the local suspension attribution and\nforwards the reinstatement reason upstream without retaining it locally.\n\nKept separate from ``PassportRevokeRequestModel`` despite the identical shape:\nrevocation is permanent and suspension is not, so a future field on one has no\nbusiness appearing on the other.",
        "examples": [
          {
            "reason": "Suspended pending review of incident INC-0000"
          }
        ]
      },
      "PassportTransitionModel": {
        "properties": {
          "newlyRefused": {
            "type": "integer",
            "title": "Newlyrefused"
          },
          "readmitted": {
            "type": "integer",
            "title": "Readmitted"
          }
        },
        "type": "object",
        "required": [
          "newlyRefused",
          "readmitted"
        ],
        "title": "PassportTransitionModel"
      },
      "PassthroughAuthConfig": {
        "properties": {
          "type": {
            "type": "string",
            "const": "passthrough",
            "title": "Type",
            "description": "Authentication type discriminator",
            "default": "passthrough"
          }
        },
        "type": "object",
        "title": "PassthroughAuthConfig",
        "description": "Passthrough authentication configuration for public servers.\n\nUsed for internal platform servers (like tool_runtime) where JWT tokens\nare passed through from the original request rather than stored credentials.\nNo credentials are stored in the database for passthrough auth."
      },
      "PathDocumentSource": {
        "properties": {
          "type": {
            "type": "string",
            "const": "s3_path",
            "title": "Type",
            "default": "s3_path"
          },
          "mediaType": {
            "type": "string",
            "title": "Mediatype",
            "description": "The media type of the document, e.g., application/pdf, text/csv"
          },
          "path": {
            "type": "string",
            "title": "Path",
            "description": "Path to document (e.g., S3 path)"
          }
        },
        "type": "object",
        "required": [
          "mediaType",
          "path"
        ],
        "title": "PathDocumentSource",
        "description": "Source for a document path (e.g., S3 path)."
      },
      "PathImageSource": {
        "properties": {
          "type": {
            "type": "string",
            "const": "s3_path",
            "title": "Type",
            "default": "s3_path"
          },
          "mediaType": {
            "type": "string",
            "title": "Mediatype",
            "description": "The media type of the image, e.g., image/jpeg, image/png. Required for path-based images."
          },
          "path": {
            "type": "string",
            "title": "Path",
            "description": "Path to image (e.g., S3 path)"
          }
        },
        "type": "object",
        "required": [
          "mediaType",
          "path"
        ],
        "title": "PathImageSource",
        "description": "Source for an image path (e.g., S3 path)."
      },
      "RAGCustomOutputs": {
        "properties": {
          "sourceNodes": {
            "items": {
              "$ref": "#/components/schemas/SourceNode"
            },
            "type": "array",
            "title": "Sourcenodes"
          },
          "ragMode": {
            "$ref": "#/components/schemas/RAGMode",
            "default": "normal"
          },
          "followUpPrompts": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Followupprompts"
          }
        },
        "type": "object",
        "title": "RAGCustomOutputs",
        "description": "Custom outputs specific to RAG responses."
      },
      "RAGMode": {
        "type": "string",
        "enum": [
          "normal"
        ],
        "title": "RAGMode",
        "description": "Available modes for RAG operations."
      },
      "ResponseStatus": {
        "type": "string",
        "enum": [
          "completed",
          "requires_action",
          "failed"
        ],
        "title": "ResponseStatus",
        "description": "Status of the agent response."
      },
      "RunListModel": {
        "properties": {
          "runs": {
            "items": {
              "$ref": "#/components/schemas/RunModel"
            },
            "type": "array",
            "title": "Runs"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "runs",
          "pagination"
        ],
        "title": "RunListModel",
        "description": "Response model for GET /v1/agents/{agent_id}/runs (list)."
      },
      "RunModel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "agentId": {
            "type": "string",
            "format": "uuid",
            "title": "Agentid"
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "title": "Versionid"
          },
          "status": {
            "$ref": "#/components/schemas/RunStatus"
          },
          "inputPayload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inputpayload"
          },
          "outputPayload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outputpayload"
          },
          "error": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "attempt": {
            "type": "integer",
            "title": "Attempt"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Startedat"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "agentId",
          "versionId",
          "status",
          "attempt",
          "createdAt"
        ],
        "title": "RunModel",
        "description": "Unified response model for all run endpoints.\n\nAll nullable fields are always present (serialized as null, not omitted)."
      },
      "RunStatus": {
        "type": "string",
        "enum": [
          "queued",
          "in_progress",
          "completed",
          "failed",
          "cancelling",
          "cancelled"
        ],
        "title": "RunStatus",
        "description": "Lifecycle states for an async run."
      },
      "SemanticSearchToolConfig": {
        "properties": {
          "hxqlQuery": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hxqlquery",
            "description": "Pre-composed HXQL query for Content Lake."
          },
          "hybridSearch": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hybridsearch",
            "description": "Enable/disable hybrid search (embeddings + full-text). Uses config default if not specified."
          },
          "rerankerTopN": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Rerankertopn",
            "description": "Number of top results to keep after reranking. Uses config default if not specified."
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit",
            "description": "Maximum number of chunks to retrieve from Content Lake."
          },
          "enableHallucinationCheck": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enablehallucinationcheck",
            "description": "Enable hallucination detection. Uses config default if not specified."
          },
          "enableMultihopQueryRefinement": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enablemultihopqueryrefinement",
            "description": "Enable multi-hop query refinement for legacy RAG workflows. Ignored by agentic RAG. Uses config default if not specified."
          },
          "adjacentChunkRange": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjacentchunkrange",
            "description": "Number of adjacent chunks to fetch around each retrieved chunk (0 = disabled). For range=N, fetches N chunks before and N chunks after each result. Uses config default if not specified."
          },
          "adjacentChunkMerge": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Adjacentchunkmerge",
            "description": "When True, adjacent chunk text is merged into the parent chunk in document order. When False, adjacent chunks are returned as separate nodes. Uses config default if not specified."
          },
          "domainId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domainid",
            "description": "Knowledge Graph domain ID for GraphRAG tools."
          }
        },
        "type": "object",
        "title": "SemanticSearchToolConfig",
        "description": "RAG retrieval settings for semantic search tools.\n\nWhen attached to a ToolConfig with tool_type='rag', these settings control\nContent Lake retrieval behavior. All fields are optional \u2014 omitted fields\nfall back to agent-level config or YAML defaults."
      },
      "SettingsSource": {
        "type": "string",
        "enum": [
          "DEFAULT",
          "OVERRIDE"
        ],
        "title": "SettingsSource",
        "description": "Where a section's values came from."
      },
      "SkillCreateRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Unique skill slug name (per tenant)",
            "examples": [
              "my-skill"
            ]
          },
          "displayName": {
            "type": "string",
            "title": "Displayname",
            "description": "Human-readable title",
            "examples": [
              "My Skill"
            ]
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "What the skill does",
            "examples": [
              "Provides reusable instructions and context for a specific task or domain."
            ]
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/ArtifactUploadUrlRequest"
            },
            "type": "array",
            "maxItems": 20,
            "minItems": 1,
            "title": "Files",
            "description": "List of artifact files to upload. Must include \"skill.md\". Example: [{\"filename\": \"skill.md\", \"mediaType\": \"text/markdown\"}]"
          }
        },
        "type": "object",
        "required": [
          "name",
          "displayName",
          "description",
          "files"
        ],
        "title": "SkillCreateRequest",
        "description": "Request body for POST /v1/skills."
      },
      "SkillDeleteResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "deleted": {
            "type": "boolean",
            "title": "Deleted"
          }
        },
        "type": "object",
        "required": [
          "id",
          "deleted"
        ],
        "title": "SkillDeleteResponse",
        "description": "Response for DELETE /v1/skills/{skill_id}."
      },
      "SkillListItem": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "currentVersionId": {
            "type": "string",
            "format": "uuid",
            "title": "Currentversionid"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "displayName": {
            "type": "string",
            "title": "Displayname"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "currentVersionId",
          "name",
          "displayName",
          "description",
          "createdBy",
          "createdAt",
          "updatedAt"
        ],
        "title": "SkillListItem",
        "description": "Lightweight skill representation used in list responses."
      },
      "SkillListPagination": {
        "properties": {
          "totalItems": {
            "type": "integer",
            "title": "Totalitems"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "hasMore": {
            "type": "boolean",
            "title": "Hasmore"
          }
        },
        "type": "object",
        "required": [
          "totalItems",
          "offset",
          "limit",
          "hasMore"
        ],
        "title": "SkillListPagination"
      },
      "SkillListResponse": {
        "properties": {
          "skills": {
            "items": {
              "$ref": "#/components/schemas/SkillListItem"
            },
            "type": "array",
            "title": "Skills"
          },
          "pagination": {
            "$ref": "#/components/schemas/SkillListPagination"
          }
        },
        "type": "object",
        "required": [
          "skills",
          "pagination"
        ],
        "title": "SkillListResponse",
        "description": "Paginated list of skills."
      },
      "SkillReference": {
        "properties": {
          "skillId": {
            "type": "string",
            "format": "uuid",
            "title": "Skillid",
            "description": "ID of the selected skill"
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "title": "Versionid",
            "description": "ID of the selected skill version"
          }
        },
        "type": "object",
        "required": [
          "skillId",
          "versionId"
        ],
        "title": "SkillReference",
        "description": "A skill version explicitly selected by a stored agent configuration."
      },
      "SkillResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "currentVersionId": {
            "type": "string",
            "format": "uuid",
            "title": "Currentversionid"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "displayName": {
            "type": "string",
            "title": "Displayname"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby"
          },
          "uploadUrls": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ArtifactUploadUrlResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uploadurls"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Updatedat"
          }
        },
        "type": "object",
        "required": [
          "id",
          "currentVersionId",
          "name",
          "displayName",
          "description",
          "createdBy",
          "createdAt",
          "updatedAt"
        ],
        "title": "SkillResponse",
        "description": "Full skill representation \u2014 returned by create, get, and update."
      },
      "SkillUpdateRequest": {
        "properties": {
          "displayName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Displayname",
            "description": "Updated human-readable title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Updated description"
          }
        },
        "type": "object",
        "title": "SkillUpdateRequest",
        "description": "Request body for PATCH /v1/skills/{skill_id}."
      },
      "SkillVersionCreateRequest": {
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/ArtifactUploadUrlRequest"
            },
            "type": "array",
            "maxItems": 20,
            "minItems": 1,
            "title": "Files",
            "description": "List of files to upload for this version. Must include \"skill.md\"."
          }
        },
        "type": "object",
        "required": [
          "files"
        ],
        "title": "SkillVersionCreateRequest",
        "description": "Request body for POST /v1/skills/{skill_id}/versions."
      },
      "SkillVersionCreateResponse": {
        "properties": {
          "skillId": {
            "type": "string",
            "format": "uuid",
            "title": "Skillid"
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "title": "Versionid"
          },
          "versionNumber": {
            "type": "integer",
            "title": "Versionnumber"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          },
          "uploadUrls": {
            "items": {
              "$ref": "#/components/schemas/ArtifactUploadUrlResponse"
            },
            "type": "array",
            "title": "Uploadurls"
          }
        },
        "type": "object",
        "required": [
          "skillId",
          "versionId",
          "versionNumber",
          "createdBy",
          "createdAt",
          "uploadUrls"
        ],
        "title": "SkillVersionCreateResponse",
        "description": "Response for creating a version, including its upload URLs."
      },
      "SkillVersionListResponse": {
        "properties": {
          "versions": {
            "items": {
              "$ref": "#/components/schemas/SkillVersionResponse"
            },
            "type": "array",
            "title": "Versions"
          },
          "pagination": {
            "$ref": "#/components/schemas/SkillListPagination"
          }
        },
        "type": "object",
        "required": [
          "versions",
          "pagination"
        ],
        "title": "SkillVersionListResponse",
        "description": "Paginated skill version list."
      },
      "SkillVersionResponse": {
        "properties": {
          "skillId": {
            "type": "string",
            "format": "uuid",
            "title": "Skillid"
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "title": "Versionid"
          },
          "versionNumber": {
            "type": "integer",
            "title": "Versionnumber"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "Createdat"
          }
        },
        "type": "object",
        "required": [
          "skillId",
          "versionId",
          "versionNumber",
          "createdBy",
          "createdAt"
        ],
        "title": "SkillVersionResponse",
        "description": "Skill version details."
      },
      "SolutionListItem": {
        "properties": {
          "solutionKey": {
            "type": "string",
            "title": "Solutionkey",
            "description": "Case-sensitive solution key carried by agents."
          },
          "agentCount": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Agentcount",
            "description": "Number of tenant and global agents carrying this key."
          },
          "modifiedAt": {
            "type": "string",
            "format": "date-time",
            "title": "Modifiedat",
            "description": "Latest modifiedAt among the agents carrying this key."
          },
          "invokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invokedat",
            "description": "Latest lastInvokedAt among the agents carrying this key. Omitted when none of the visible agents has been invoked."
          }
        },
        "type": "object",
        "required": [
          "solutionKey",
          "agentCount",
          "modifiedAt"
        ],
        "title": "SolutionListItem",
        "description": "A solution key and live statistics from its visible agents."
      },
      "SolutionListResponse": {
        "properties": {
          "solutions": {
            "items": {
              "$ref": "#/components/schemas/SolutionListItem"
            },
            "type": "array",
            "title": "Solutions"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "solutions",
          "pagination"
        ],
        "title": "SolutionListResponse",
        "description": "A page of solutions derived from existing agent assignments."
      },
      "SourceNode": {
        "properties": {
          "docId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docid"
          },
          "chunkId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunkid"
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "type": "object",
        "title": "SourceNode",
        "description": "Source node model for retrieval results."
      },
      "TaskRequestBaseSchema": {
        "properties": {
          "inputs": {
            "additionalProperties": true,
            "type": "object",
            "title": "Inputs"
          },
          "messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/MessageModel"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messages",
            "description": "Optional additional messages with rich content types (e.g. file_analysis)."
          },
          "guardrails": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "#/components/schemas/GuardrailConfig"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrails",
            "description": "List of guardrails (names or objects with name and config)"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "inputs"
        ],
        "title": "TaskRequestBaseSchema",
        "description": "Schema for invoking agents with structured inputs.\n\nAccepts structured inputs for template rendering and optionally additional messages\nwith rich content types (e.g. file_analysis for code interpreter).",
        "examples": [
          {
            "guardrails": [
              "HAIP-Hate-High",
              "HAIP-Insults-Low"
            ],
            "inputs": {
              "denial_letter": "The claim was denied due to late submission."
            }
          },
          {
            "inputs": {
              "claim_summary": "Policy #AUTO-7741, 2022 Honda Civic allegedly rear-ended at intersection on 2024-10-02. Police report was filed 14 days after the incident. Driver claims whiplash but declined on-scene medical attention. Estimated repair cost: $12,500 on a vehicle valued at $8,200."
            },
            "messages": [
              {
                "content": [
                  {
                    "fileId": "123e4567-e89b-12d3-a456-426614174000",
                    "fileName": "accident_report.csv",
                    "mediaType": "text/csv",
                    "type": "file_analysis"
                  },
                  {
                    "text": "The policyholder has filed 3 claims in the past 2 years. Please evaluate whether this auto claim should be accepted or denied based on the attached accident report and claim summary.",
                    "type": "text"
                  }
                ],
                "role": "user"
              }
            ]
          }
        ]
      },
      "TextChunkNodeOutput": {
        "properties": {
          "nodeType": {
            "type": "string",
            "const": "TextChunk",
            "title": "Nodetype",
            "default": "TextChunk"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "clEmbedId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clembedid"
          },
          "chunkIndex": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunkindex"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "docId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docid"
          },
          "documentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Documentid"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "TextChunkNodeOutput",
        "description": "A TextChunk entity from the Knowledge Graph."
      },
      "TextContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "output_text",
            "title": "Type",
            "default": "output_text"
          },
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TextContent"
      },
      "TextOutput": {
        "properties": {
          "type": {
            "type": "string",
            "const": "message",
            "title": "Type",
            "default": "message"
          },
          "status": {
            "type": "string",
            "const": "completed",
            "title": "Status",
            "default": "completed"
          },
          "content": {
            "items": {
              "$ref": "#/components/schemas/TextContent"
            },
            "type": "array",
            "title": "Content"
          },
          "role": {
            "type": "string",
            "title": "Role",
            "default": "assistant"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "TextOutput"
      },
      "ToolCallOutput": {
        "properties": {
          "type": {
            "type": "string",
            "const": "function_call",
            "title": "Type",
            "default": "function_call"
          },
          "status": {
            "type": "string",
            "const": "completed",
            "title": "Status",
            "default": "completed"
          },
          "arguments": {
            "type": "string",
            "title": "Arguments"
          },
          "callId": {
            "type": "string",
            "title": "Callid"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "arguments",
          "callId",
          "name"
        ],
        "title": "ToolCallOutput"
      },
      "ToolConfig-Input": {
        "properties": {
          "toolType": {
            "type": "string",
            "enum": [
              "rag",
              "function",
              "mcp",
              "structured_output",
              "task_agent",
              "analytics",
              "code_execution"
            ],
            "title": "Tool Type",
            "description": "Type of the tool (rag, function, mcp, structured_output, task_agent, analytics). 'code_execution' is deprecated \u2014 use 'analytics' instead."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Name",
            "description": "Name of the tool"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description of the tool"
          },
          "funcName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Function Name",
            "description": "Function name if applicable"
          },
          "semanticSearchConfig": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SemanticSearchToolConfig"
              },
              {
                "type": "null"
              }
            ],
            "title": "Semantic Search Config",
            "description": "RAG retrieval settings for semantic search tools (tool_type='rag')."
          },
          "mcpServerReferences": {
            "items": {
              "$ref": "#/components/schemas/MCPServerReference-Input"
            },
            "type": "array",
            "title": "MCP Server References",
            "description": "List of MCP server references for this tool",
            "default": []
          },
          "mcpAuthHeaders": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "MCP Auth Headers",
            "description": "Runtime-only map of MCP Server URLs to their authentication headers. Never persisted."
          },
          "outputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Schema",
            "description": "JSON schema for structured output tools"
          },
          "modelId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model ID",
            "description": "Optional model ID for LLM-assisted schema parsing"
          },
          "agentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent ID",
            "description": "ID of the task agent to invoke as a tool"
          },
          "agentVersion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Version",
            "description": "Deprecated: use `agentVersionId`. A version UUID, or 'latest' to pin whatever version is current when the agent is saved. Used only when `agentVersionId` is absent; a UUID here that differs from `agentVersionId` is rejected (CIN-19778).",
            "deprecated": true
          },
          "agentVersionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Version ID",
            "description": "The task agent version this tool runs. Send it to select a version; the server validates it on save. When omitted, the server resolves it from `agentVersion` (or the current version) and returns it."
          },
          "taskAgentConfig": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Configuration",
            "description": "Deprecated: a copy of the task agent's configuration taken when the agent was saved. Not used for execution; the version in `agentVersionId` is (CIN-19778).",
            "deprecated": true
          }
        },
        "type": "object",
        "required": [
          "toolType"
        ],
        "title": "ToolConfig",
        "description": "Configuration model for agent tools",
        "examples": [
          {
            "description": "Multiplies two numbers",
            "funcName": "multiply",
            "name": "multiply",
            "toolType": "function"
          },
          {
            "description": "Searches HR documents",
            "funcName": "semantic_search",
            "name": "hr_docs_search",
            "semanticSearchConfig": {
              "hxqlQuery": "SELECT * FROM SysContent WHERE sys_docType = 'HR'",
              "hybridSearch": true
            },
            "toolType": "rag"
          },
          {
            "description": "Tool for MCP server",
            "mcpServerReferences": [
              {
                "toolConfiguration": {
                  "allowedTools": [
                    "get_customer",
                    "update_customer"
                  ]
                },
                "url": "https://crm.company.com/mcp",
                "validationMode": "lenient"
              },
              {
                "id": "550e8400-e29b-41d4-a716-446655440001",
                "toolConfiguration": {
                  "allowedTools": [
                    "create_ticket",
                    "get_ticket_status"
                  ]
                },
                "validationMode": "strict"
              }
            ],
            "name": "mcp_tool",
            "toolType": "mcp"
          },
          {
            "description": "Extracts person info from text",
            "modelId": "anthropic.claude-haiku-5-5",
            "name": "structured_output",
            "outputSchema": {
              "properties": {
                "name": {
                  "description": "Full name of the person",
                  "type": "string"
                },
                "age": {
                  "description": "Age of the person",
                  "type": "integer"
                }
              },
              "title": "Person",
              "type": "object"
            },
            "toolType": "structured_output"
          },
          {
            "agentId": "agent_123",
            "agentVersion": "latest",
            "description": "An example agent tool",
            "name": "example_agent",
            "toolType": "task_agent"
          }
        ]
      },
      "ToolConfig-Output": {
        "properties": {
          "toolType": {
            "type": "string",
            "enum": [
              "rag",
              "function",
              "mcp",
              "structured_output",
              "task_agent",
              "analytics",
              "code_execution"
            ],
            "title": "Tool Type",
            "description": "Type of the tool (rag, function, mcp, structured_output, task_agent, analytics). 'code_execution' is deprecated \u2014 use 'analytics' instead."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Name",
            "description": "Name of the tool"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description of the tool"
          },
          "funcName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Function Name",
            "description": "Function name if applicable"
          },
          "semanticSearchConfig": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SemanticSearchToolConfig"
              },
              {
                "type": "null"
              }
            ],
            "title": "Semantic Search Config",
            "description": "RAG retrieval settings for semantic search tools (tool_type='rag')."
          },
          "mcpServerReferences": {
            "items": {
              "$ref": "#/components/schemas/MCPServerReference-Output"
            },
            "type": "array",
            "title": "MCP Server References",
            "description": "List of MCP server references for this tool",
            "default": []
          },
          "mcpAuthHeaders": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "MCP Auth Headers",
            "description": "Runtime-only map of MCP Server URLs to their authentication headers. Never persisted."
          },
          "outputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Schema",
            "description": "JSON schema for structured output tools"
          },
          "modelId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model ID",
            "description": "Optional model ID for LLM-assisted schema parsing"
          },
          "agentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent ID",
            "description": "ID of the task agent to invoke as a tool"
          },
          "agentVersion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Version",
            "description": "Deprecated: use `agentVersionId`. A version UUID, or 'latest' to pin whatever version is current when the agent is saved. Used only when `agentVersionId` is absent; a UUID here that differs from `agentVersionId` is rejected (CIN-19778).",
            "deprecated": true
          },
          "agentVersionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Version ID",
            "description": "The task agent version this tool runs. Send it to select a version; the server validates it on save. When omitted, the server resolves it from `agentVersion` (or the current version) and returns it."
          },
          "taskAgentConfig": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Configuration",
            "description": "Deprecated: a copy of the task agent's configuration taken when the agent was saved. Not used for execution; the version in `agentVersionId` is (CIN-19778).",
            "deprecated": true
          }
        },
        "type": "object",
        "required": [
          "toolType"
        ],
        "title": "ToolConfig",
        "description": "Configuration model for agent tools",
        "examples": [
          {
            "description": "Multiplies two numbers",
            "funcName": "multiply",
            "name": "multiply",
            "toolType": "function"
          },
          {
            "description": "Searches HR documents",
            "funcName": "semantic_search",
            "name": "hr_docs_search",
            "semanticSearchConfig": {
              "hxqlQuery": "SELECT * FROM SysContent WHERE sys_docType = 'HR'",
              "hybridSearch": true
            },
            "toolType": "rag"
          },
          {
            "description": "Tool for MCP server",
            "mcpServerReferences": [
              {
                "toolConfiguration": {
                  "allowedTools": [
                    "get_customer",
                    "update_customer"
                  ]
                },
                "url": "https://crm.company.com/mcp",
                "validationMode": "lenient"
              },
              {
                "id": "550e8400-e29b-41d4-a716-446655440001",
                "toolConfiguration": {
                  "allowedTools": [
                    "create_ticket",
                    "get_ticket_status"
                  ]
                },
                "validationMode": "strict"
              }
            ],
            "name": "mcp_tool",
            "toolType": "mcp"
          },
          {
            "description": "Extracts person info from text",
            "modelId": "anthropic.claude-haiku-5-5",
            "name": "structured_output",
            "outputSchema": {
              "properties": {
                "name": {
                  "description": "Full name of the person",
                  "type": "string"
                },
                "age": {
                  "description": "Age of the person",
                  "type": "integer"
                }
              },
              "title": "Person",
              "type": "object"
            },
            "toolType": "structured_output"
          },
          {
            "agentId": "agent_123",
            "agentVersion": "latest",
            "description": "An example agent tool",
            "name": "example_agent",
            "toolType": "task_agent"
          }
        ]
      },
      "UrlDocumentSource": {
        "properties": {
          "type": {
            "type": "string",
            "const": "url",
            "title": "Type",
            "default": "url"
          },
          "mediaType": {
            "type": "string",
            "title": "Mediatype",
            "description": "The media type of the document, e.g., application/pdf, text/csv"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "HTTPS URL to the document"
          }
        },
        "type": "object",
        "required": [
          "mediaType",
          "url"
        ],
        "title": "UrlDocumentSource",
        "description": "Source for a document URL."
      },
      "UrlImageSource": {
        "properties": {
          "type": {
            "type": "string",
            "const": "url",
            "title": "Type",
            "default": "url"
          },
          "mediaType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mediatype",
            "description": "Optional: The media type of the image, e.g., image/jpeg."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "HTTPS URL to the image"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "UrlImageSource",
        "description": "Source for an image URL."
      },
      "ValidateOnlyResponseModel": {
        "properties": {
          "validateOnly": {
            "type": "boolean",
            "title": "Validateonly",
            "default": true
          },
          "valid": {
            "type": "boolean",
            "title": "Valid",
            "default": true
          }
        },
        "type": "object",
        "title": "ValidateOnlyResponseModel"
      },
      "ValidationMode": {
        "type": "string",
        "enum": [
          "strict",
          "lenient"
        ],
        "title": "ValidationMode"
      },
      "VersionConfigModel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "versionLabel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Versionlabel"
          },
          "notes": {
            "type": "string",
            "title": "Notes"
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby"
          },
          "passport": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PassportModel"
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "$ref": "#/components/schemas/AgentConfig-Output"
          }
        },
        "type": "object",
        "required": [
          "id",
          "number",
          "notes",
          "createdAt",
          "createdBy",
          "config"
        ],
        "title": "VersionConfigModel"
      },
      "VersionModel": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "number": {
            "type": "integer",
            "title": "Number"
          },
          "versionLabel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Versionlabel"
          },
          "notes": {
            "type": "string",
            "title": "Notes"
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby"
          },
          "passport": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PassportModel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "number",
          "notes",
          "createdAt",
          "createdBy"
        ],
        "title": "VersionModel"
      },
      "CompletedChunk": {
        "properties": {
          "type": {
            "const": "response.completed",
            "default": "response.completed",
            "title": "Type",
            "type": "string"
          },
          "response": {
            "$ref": "#/components/schemas/ResponseModel"
          }
        },
        "required": [
          "response"
        ],
        "title": "CompletedChunk",
        "type": "object"
      },
      "CreatedChunk": {
        "properties": {
          "type": {
            "const": "response.created",
            "default": "response.created",
            "title": "Type",
            "type": "string"
          },
          "response": {
            "$ref": "#/components/schemas/ResponseModel"
          }
        },
        "required": [
          "response"
        ],
        "title": "CreatedChunk",
        "type": "object"
      },
      "IncompleteChunk": {
        "description": "Sent when a streaming response is terminated early (e.g., guardrail violation).\n\nFollows OpenAI Responses API pattern for incomplete responses.",
        "properties": {
          "type": {
            "const": "response.incomplete",
            "default": "response.incomplete",
            "title": "Type",
            "type": "string"
          },
          "responseId": {
            "title": "Responseid",
            "type": "string"
          },
          "incompleteDetails": {
            "$ref": "#/components/schemas/IncompleteDetails"
          }
        },
        "required": [
          "responseId",
          "incompleteDetails"
        ],
        "title": "IncompleteChunk",
        "type": "object"
      },
      "IncompleteDetails": {
        "description": "Details about why a response was incomplete.",
        "properties": {
          "reason": {
            "description": "Reason for incomplete response, including a resumable human approval interrupt",
            "enum": [
              "content_filter",
              "error"
            ],
            "title": "Reason",
            "type": "string"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional human-readable message explaining the incompletion",
            "title": "Message"
          }
        },
        "required": [
          "reason"
        ],
        "title": "IncompleteDetails",
        "type": "object"
      },
      "ResponseModel": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "model": {
            "title": "Model",
            "type": "string"
          },
          "object": {
            "const": "response",
            "default": "response",
            "title": "Object",
            "type": "string"
          },
          "createdAt": {
            "title": "Createdat",
            "type": "integer"
          },
          "output": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TextOutput"
                    },
                    {
                      "$ref": "#/components/schemas/ToolCallOutput"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output"
          },
          "customOutputs": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentCustomOutputs"
              },
              {
                "$ref": "#/components/schemas/RAGCustomOutputs"
              },
              {
                "$ref": "#/components/schemas/GraphRAGCustomOutputs"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customoutputs"
          }
        },
        "required": [
          "id",
          "model"
        ],
        "title": "ResponseModel",
        "type": "object"
      },
      "TextDelta": {
        "properties": {
          "type": {
            "const": "response.output_text.delta",
            "default": "response.output_text.delta",
            "title": "Type",
            "type": "string"
          },
          "role": {
            "const": "assistant",
            "default": "assistant",
            "title": "Role",
            "type": "string"
          },
          "customOutputs": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentCustomOutputs"
              },
              {
                "$ref": "#/components/schemas/RAGCustomOutputs"
              },
              {
                "$ref": "#/components/schemas/GraphRAGCustomOutputs"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customoutputs"
          },
          "delta": {
            "title": "Delta",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "delta",
          "id"
        ],
        "title": "TextDelta",
        "type": "object"
      },
      "ToolCallChunk": {
        "properties": {
          "type": {
            "const": "response.function_call_arguments.done",
            "default": "response.function_call_arguments.done",
            "title": "Type",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "arguments": {
            "title": "Arguments",
            "type": "string"
          },
          "itemId": {
            "title": "Itemid",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "arguments",
          "itemId",
          "name"
        ],
        "title": "ToolCallChunk",
        "type": "object"
      },
      "PassportEnvironmentSettings": {
        "description": "Read model for the ``passport`` section, also used to validate stored rows.\n\n``passport_mode`` is required, deliberately with no default: a stored row missing\nit (or with a misspelled key) is malformed and must be a 503, never read as the\npermissive ``DISABLED``. Only an *absent* row gets a default, the registry's\nexplicit one. A future optional field may carry a default for additive\ncompatibility; a security-controlling one must not.",
        "properties": {
          "passportMode": {
            "$ref": "#/components/schemas/PassportMode",
            "description": "Who an Agent Passport is required for in this environment. DISABLED: no provisioning and no admission check. REQUIRED_FOR_NEW: new agent versions get a passport and must be approved; agents that never had a passport keep working. REQUIRED_FOR_ALL: every tenant-authored agent needs an issued passport. Global (platform-authored) agents are exempt in every mode; a tenant's copy of a global agent is a tenant agent."
          }
        },
        "required": [
          "passportMode"
        ],
        "title": "PassportEnvironmentSettings",
        "type": "object"
      },
      "PassportEnvironmentSettingsWrite": {
        "additionalProperties": false,
        "description": "Strict write DTO: ``{}`` must not validate as \"set DISABLED\".",
        "properties": {
          "passportMode": {
            "$ref": "#/components/schemas/PassportMode"
          }
        },
        "required": [
          "passportMode"
        ],
        "title": "PassportEnvironmentSettingsWrite",
        "type": "object"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "parameters": {
      "UserAgentHeader": {
        "name": "User-Agent",
        "in": "header",
        "description": "User agent string identifying the client application. Most clients pass this by default. If not, it is required to pass this HTTP request header.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SessionIdHeader": {
        "name": "X-Session-ID",
        "in": "header",
        "description": "Consistent UUID identifying a conversation session, used to maintain context across multiple invocations. Must be a valid UUID if provided; omit to invoke without session context.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "CorrelationIdHeader": {
        "name": "X-Correlation-ID",
        "in": "header",
        "description": "Client-supplied identifier used to correlate this request across services and logs. If omitted, one is generated automatically.",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    }
  }
}