{
  "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 `is_global` query parameter to filter by global or tenant-specific agents.\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"
            }
          }
        ],
        "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\n**Status Codes:**\n- `201`: Agent created successfully\n- `400`: Validation error (invalid input)\n- `409`: Conflict (agent already exists)\n- `500`: Internal server error",
        "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": {
                  "$ref": "#/components/schemas/AgentModel"
                }
              }
            }
          },
          "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\n**Status Codes:**\n- `200`: Agent version created successfully\n- `400`: Validation error (invalid input)\n- `404`: Agent not found\n- `500`: Internal server error",
        "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": {
                  "$ref": "#/components/schemas/AgentVersionModel"
                }
              }
            }
          },
          "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\n**Status Codes:**\n- `200`: Agent updated successfully\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": {
                  "$ref": "#/components/schemas/AgentModel"
                }
              }
            }
          },
          "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/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 a RAG or Tool 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",
        "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"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequestBaseSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "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 tool or rag agent with streaming response",
        "description": "Invoke a RAG or Tool 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"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequestBaseSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "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",
        "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"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRequestBaseSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "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"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRequestBaseSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp-servers": {
      "post": {
        "tags": [
          "mcp_servers",
          "beta"
        ],
        "summary": "Create MCP Server",
        "description": "Create a new MCP server with enhanced authentication and validation.\n\n\u26a0\ufe0f **BETA FEATURES**: The following fields are in beta and may change in future releases:\n- `configuration.healthCheck` - Health check configuration structure\n- `validationMode: async` - Async validation behavior and scheduling\n\n**Stable Features** (backward compatible):\n- Core server properties: `name`, `url`, `description`\n- Authentication: `auth` (OIDC, API Key)\n- `visibility`, `validationMode: skip|immediate`\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",
          "beta"
        ],
        "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\u26a0\ufe0f **BETA FEATURES**: The following fields are in beta and may change in future releases:\n- `configuration.healthCheck` - Health check configuration structure\n- `validationMode: async` - Async validation behavior and scheduling\n\n**Stable Features** (backward compatible):\n- Core server properties: `name`, `url`, `description`\n- Authentication: `auth` (OIDC, API Key)\n- `visibility`, `validationMode: skip|immediate`\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",
          "beta"
        ],
        "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)\n\n\u26a0\ufe0f **BETA**: Endpoint behavior and response schema may change in future releases.",
        "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"
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "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"
          },
          "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 RAG agents"
          },
          "enableCitations": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Citations",
            "description": "Enable citations in the response. Uses config default if not specified."
          },
          "guardrails": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrails",
            "description": "List of guardrail names for the agent"
          },
          "knowledgeGraphDomainId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Graph Domain ID",
            "description": "Knowledge Graph domain ID for graphRag agents"
          },
          "maxIterations": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Iterations",
            "description": "Max ReAct loop iterations for tool agents, 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)"
          },
          "maxQueryRefinementHops": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Query Refinement Hops",
            "description": "Max multi-hop query refinement iterations for RAG 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"
          },
          "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 RAG agents"
          },
          "enableCitations": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Citations",
            "description": "Enable citations in the response. Uses config default if not specified."
          },
          "guardrails": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrails",
            "description": "List of guardrail names for the agent"
          },
          "knowledgeGraphDomainId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Graph Domain ID",
            "description": "Knowledge Graph domain ID for graphRag agents"
          },
          "maxIterations": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Iterations",
            "description": "Max ReAct loop iterations for tool agents, 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)"
          },
          "maxQueryRefinementHops": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Query Refinement Hops",
            "description": "Max multi-hop query refinement iterations for RAG 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"
          }
        },
        "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-3-haiku-20240307-v1:0",
              "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-3-haiku-20240307-v1:0",
              "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"
          }
        ]
      },
      "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"
          },
          "currentVersionId": {
            "type": "string",
            "format": "uuid",
            "title": "Currentversionid"
          },
          "createdAt": {
            "type": "string",
            "title": "Createdat"
          },
          "createdBy": {
            "type": "string",
            "title": "Createdby"
          },
          "modifiedAt": {
            "type": "string",
            "title": "Modifiedat"
          },
          "modifiedBy": {
            "type": "string",
            "title": "Modifiedby"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "name",
          "displayName",
          "description",
          "isGlobalAgent",
          "currentVersionId",
          "createdAt",
          "createdBy",
          "modifiedAt",
          "modifiedBy"
        ],
        "title": "AgentModel"
      },
      "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"
          }
        },
        "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"
          },
          "output": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TextOutput"
                },
                {
                  "$ref": "#/components/schemas/ToolCallOutput"
                }
              ]
            },
            "type": "array",
            "title": "Output"
          },
          "customOutputs": {
            "anyOf": [
              {
                "$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
          }
        },
        "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"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "AgentSettingsUpdateModel"
      },
      "AgentType": {
        "type": "string",
        "enum": [
          "tool",
          "rag",
          "task",
          "graphRag"
        ],
        "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"
              }
            ]
          }
        },
        "type": "object",
        "title": "AgentUpdateModel",
        "examples": [
          {
            "config": {
              "guardrails": [
                "HAIP-Hate-High",
                "HAIP-Insults-Low"
              ],
              "inferenceConfig": {
                "maxTokens": 4000
              },
              "llmModelId": "anthropic.claude-3-haiku-20240307-v1:0",
              "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"
      },
      "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"
      },
      "ArtifactEventData": {
        "properties": {
          "type": {
            "type": "string",
            "const": "document",
            "title": "Type",
            "default": "document"
          },
          "createdAt": {
            "type": "integer",
            "title": "Createdat"
          },
          "data": {
            "$ref": "#/components/schemas/DocumentArtifactData"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ArtifactEventData",
        "description": "Artifact event data structure."
      },
      "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, image/tiff"
          },
          "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"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "BusinessObjectNodeOutput",
        "description": "A BusinessObject from the Knowledge Graph."
      },
      "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."
          },
          "enableDeepSearch": {
            "type": "boolean",
            "title": "Enabledeepsearch",
            "description": "Experimental Feature. Enable deep search mode for enhanced research",
            "default": false
          },
          "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. 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": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrails"
          }
        },
        "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"
              }
            ]
          }
        ]
      },
      "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."
      },
      "DocumentArtifactData": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "type": {
            "type": "string",
            "title": "Type",
            "default": "markdown"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/DocumentArtifactSource"
            },
            "type": "array",
            "title": "Sources"
          }
        },
        "type": "object",
        "required": [
          "title",
          "content"
        ],
        "title": "DocumentArtifactData",
        "description": "Document artifact data structure."
      },
      "DocumentArtifactSource": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "DocumentArtifactSource",
        "description": "Source reference for document artifacts."
      },
      "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"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "DocumentNodeOutput",
        "description": "A Document entity from the Knowledge Graph."
      },
      "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"
      },
      "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"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "GlobalEntityNodeOutput",
        "description": "A GlobalEntity from the Knowledge Graph."
      },
      "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"
          }
        },
        "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."
      },
      "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": ""
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "GuardrailModel",
        "examples": [
          {
            "description": "Filters content related to insults with high strength.",
            "name": "HAIP-Insults-High"
          }
        ]
      },
      "HTTPValidationError": {
        "type": "object",
        "title": "HTTPValidationError",
        "properties": {
          "status": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "message": {
            "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."
      },
      "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": {
              "function_calling": true,
              "max_context_length": 32000,
              "streaming": true,
              "tool_choice": 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"
          }
        },
        "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": {
        "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"
              },
              {
                "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": {
        "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": [
              {
                "type": "string"
              },
              {
                "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"
              }
            ],
            "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"
          }
        },
        "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"
      },
      "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, image/tiff. 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"
          },
          "eventType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eventtype"
          },
          "eventData": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UIEventData"
              },
              {
                "$ref": "#/components/schemas/ArtifactEventData"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eventdata"
          }
        },
        "type": "object",
        "title": "RAGCustomOutputs",
        "description": "Custom outputs specific to RAG responses."
      },
      "RAGMode": {
        "type": "string",
        "enum": [
          "normal",
          "deepResearch"
        ],
        "title": "RAGMode",
        "description": "Available modes for RAG operations."
      },
      "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. 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."
      },
      "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": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrails"
          }
        },
        "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"
          }
        },
        "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"
            },
            "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": "Version of the task agent to invoke (UUID or 'latest')"
          },
          "taskAgentConfig": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Configuration",
            "description": "Configuration of the task agent obtained from the DB"
          }
        },
        "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": "us.anthropic.claude-3-5-sonnet-20241022-v2:0",
            "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"
            },
            "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": "Version of the task agent to invoke (UUID or 'latest')"
          },
          "taskAgentConfig": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Configuration",
            "description": "Configuration of the task agent obtained from the DB"
          }
        },
        "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": "us.anthropic.claude-3-5-sonnet-20241022-v2:0",
            "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"
          }
        ]
      },
      "UIEventData": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "The id of the event"
          },
          "event": {
            "type": "string",
            "enum": [
              "retrieve",
              "analyze",
              "answer"
            ],
            "title": "Event",
            "description": "The event type",
            "default": "retrieve"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "inprogress",
              "done",
              "error"
            ],
            "title": "State",
            "description": "The state of the event",
            "default": "pending"
          },
          "question": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Question",
            "description": "Used by answer event to display the question"
          },
          "answer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answer",
            "description": "Used by answer event to display the answer of the question"
          }
        },
        "type": "object",
        "title": "UIEventData",
        "description": "Events for DeepResearch workflow which has 3 main stages:\n- Retrieve: Retrieve information from the knowledge base.\n- Analyze: Analyze the retrieved information and provide list of questions for answering.\n- Answer: Answering the provided questions. There are multiple answer events, each with its own id that is used to display the answer for a particular question."
      },
      "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. If 'image/tiff', URL extension is checked."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "HTTPS URL to the image"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "UrlImageSource",
        "description": "Source for an image URL."
      },
      "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"
          },
          "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"
          }
        },
        "type": "object",
        "required": [
          "id",
          "number",
          "notes",
          "createdAt",
          "createdBy"
        ],
        "title": "VersionModel"
      }
    },
    "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"
        }
      }
    }
  }
}