{ "openapi": "3.1.0", "info": { "title": "xagent", "description": "The Agent Operating System", "version": "0.1.0" }, "paths": { "/health": { "get": { "summary": "Health Check", "description": "Health check endpoint for container probes.", "operationId": "health_check_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Response Health Check Health Get" } } } } } } }, "/api/auth/setup-status": { "get": { "tags": [ "Authentication" ], "summary": "Setup Status", "operationId": "setup_status_api_auth_setup_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetupStatusResponse" } } } } } } }, "/api/auth/setup-admin": { "post": { "tags": [ "Authentication" ], "summary": "Setup Admin", "operationId": "setup_admin_api_auth_setup_admin_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/register-switch": { "get": { "tags": [ "Authentication" ], "summary": "Get Register Switch", "operationId": "get_register_switch_api_auth_register_switch_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterSwitchResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "patch": { "tags": [ "Authentication" ], "summary": "Update Register Switch", "operationId": "update_register_switch_api_auth_register_switch_patch", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterSwitchRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterSwitchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/auth/login": { "post": { "tags": [ "Authentication" ], "summary": "Login", "description": "User login endpoint", "operationId": "login_api_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Login Api Auth Login Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/register": { "post": { "tags": [ "Authentication" ], "summary": "Register", "description": "User registration endpoint with default configuration inheritance", "operationId": "register_api_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/change-password": { "post": { "tags": [ "Authentication" ], "summary": "Change Password", "description": "Change user password endpoint", "operationId": "change_password_api_auth_change_password_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/auth/refresh": { "post": { "tags": [ "Authentication" ], "summary": "Refresh Token", "description": "Refresh JWT access token using refresh token", "operationId": "refresh_token_api_auth_refresh_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshTokenRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshTokenResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/check": { "get": { "tags": [ "Authentication" ], "summary": "Check Auth", "description": "Check authentication status endpoint", "operationId": "check_auth_api_auth_check_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Check Auth Api Auth Check Get" } } } } } } }, "/api/auth/verify": { "get": { "tags": [ "Authentication" ], "summary": "Verify Current Token", "description": "Verify current token validity", "operationId": "verify_current_token_api_auth_verify_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Verify Current Token Api Auth Verify Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/auth/{provider}/login": { "get": { "tags": [ "Authentication" ], "summary": "Oauth Login", "description": "Unified entry point for OAuth login", "operationId": "oauth_login_api_auth__provider__login_get", "parameters": [ { "name": "provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider" } }, { "name": "token", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Token" } }, { "name": "app_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "App Id" } }, { "name": "redirect", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Redirect" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "title": "Response Oauth Login Api Auth Provider Login Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/{provider}/callback": { "get": { "tags": [ "Authentication" ], "summary": "Oauth Callback", "description": "Unified entry point for OAuth callback", "operationId": "oauth_callback_api_auth__provider__callback_get", "parameters": [ { "name": "provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "title": "Response Oauth Callback Api Auth Provider Callback Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/task/create": { "post": { "tags": [ "chat" ], "summary": "Create Task", "description": "Create new chat task", "operationId": "create_task_api_chat_task_create_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCreateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCreateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/chat/tasks": { "get": { "tags": [ "chat" ], "summary": "Get Tasks", "description": "Get tasks list with pagination", "operationId": "get_tasks_api_chat_tasks_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 1, "title": "Page" } }, { "name": "per_page", "in": "query", "required": false, "schema": { "type": "integer", "default": 10, "title": "Per Page" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "agent_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Type" } }, { "name": "exclude_agent_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Exclude Agent Type" } }, { "name": "execution_mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Mode" } }, { "name": "exclude_execution_mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Exclude Execution Mode" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Tasks Api Chat Tasks Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/task/{task_id}": { "get": { "tags": [ "chat" ], "summary": "Get Task", "description": "Get task details", "operationId": "get_task_api_chat_task__task_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Task Api Chat Task Task Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "chat" ], "summary": "Update Task", "description": "Update task details.", "operationId": "update_task_api_chat_task__task_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Update Task Api Chat Task Task Id Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "chat" ], "summary": "Delete Task", "description": "Delete a task and all related data", "operationId": "delete_task_api_chat_task__task_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } }, { "name": "request", "in": "query", "required": false, "schema": { "title": "Request" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Task Api Chat Task Task Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/task/{task_id}/status": { "get": { "tags": [ "chat" ], "summary": "Get Task Status", "description": "Get task status", "operationId": "get_task_status_api_chat_task__task_id__status_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Task Status Api Chat Task Task Id Status Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/workspace/{task_id}/files": { "get": { "tags": [ "chat" ], "summary": "Get Task Workspace Files", "description": "Get all workspace files for a task", "operationId": "get_task_workspace_files_api_chat_workspace__task_id__files_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } }, { "name": "request", "in": "query", "required": false, "schema": { "title": "Request" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Task Workspace Files Api Chat Workspace Task Id Files Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/workspace/{task_id}/output": { "get": { "tags": [ "chat" ], "summary": "Get Task Output Files", "description": "Get output files for a task", "operationId": "get_task_output_files_api_chat_workspace__task_id__output_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } }, { "name": "request", "in": "query", "required": false, "schema": { "title": "Request" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Task Output Files Api Chat Workspace Task Id Output Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/cloud/accounts": { "get": { "tags": [ "Cloud Storage" ], "summary": "List Connected Accounts", "description": "List connected cloud accounts", "operationId": "list_connected_accounts_api_cloud_accounts_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "title": "Response List Connected Accounts Api Cloud Accounts Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/cloud/accounts/{account_id}": { "delete": { "tags": [ "Cloud Storage" ], "summary": "Delete Connected Account", "description": "Delete a connected cloud account", "operationId": "delete_connected_account_api_cloud_accounts__account_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "account_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Account Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Connected Account Api Cloud Accounts Account Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/cloud/google-drive/drives": { "get": { "tags": [ "Cloud Storage" ], "summary": "List Google Drives", "description": "List Google Drives (My Drive + Shared Drives)", "operationId": "list_google_drives_api_cloud_google_drive_drives_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "account_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Account Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "title": "Response List Google Drives Api Cloud Google Drive Drives Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/cloud/google-drive/files": { "get": { "tags": [ "Cloud Storage" ], "summary": "List Google Drive Files", "description": "List files in Google Drive folder", "operationId": "list_google_drive_files_api_cloud_google_drive_files_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "folder_id", "in": "query", "required": false, "schema": { "type": "string", "default": "root", "title": "Folder Id" } }, { "name": "account_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Account Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "title": "Response List Google Drive Files Api Cloud Google Drive Files Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/files/upload": { "post": { "tags": [ "files" ], "summary": "Upload File", "operationId": "upload_file_api_files_upload_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_file_api_files_upload_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Upload File Api Files Upload Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/files/list": { "get": { "tags": [ "files" ], "summary": "List Files", "operationId": "list_files_api_files_list_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Files Api Files List Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/files/task/{task_id}": { "get": { "tags": [ "files" ], "summary": "List Task Files", "description": "Get all files for a specific task.\n\nMore efficient than /api/files/list as it filters at database level.\nOnly returns files that are already registered in the database.", "operationId": "list_task_files_api_files_task__task_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Task Files Api Files Task Task Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/files/download/{file_id}": { "get": { "tags": [ "files" ], "summary": "Download File", "operationId": "download_file_api_files_download__file_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/files/preview/{file_id}": { "get": { "tags": [ "files" ], "summary": "Preview File", "operationId": "preview_file_api_files_preview__file_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/files/public/preview/{file_id}": { "get": { "tags": [ "files" ], "summary": "Public Preview File", "operationId": "public_preview_file_api_files_public_preview__file_id__get", "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } }, { "name": "relative_path", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Relative Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/files/backfill": { "post": { "tags": [ "files" ], "summary": "Backfill Files", "description": "Manually trigger file backfill to sync filesystem with database.\n\nThis is a maintenance operation that scans the filesystem and creates\ndatabase records for any unregistered files. Only available to admins.", "operationId": "backfill_files_api_files_backfill_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Backfill Files Api Files Backfill Post" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/files/{file_id}": { "delete": { "tags": [ "files" ], "summary": "Delete File", "operationId": "delete_file_api_files__file_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete File Api Files File Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/kb/collections/{collection}/config": { "post": { "tags": [ "kb" ], "summary": "Save Collection Config", "description": "Save ingestion configuration for a specific collection.", "operationId": "save_collection_config_api_kb_collections__collection__config_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "collection", "in": "path", "required": true, "schema": { "type": "string", "title": "Collection" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionConfig" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CollectionOperationResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/kb/ingest": { "post": { "tags": [ "kb" ], "summary": "Ingest", "description": "Upload and ingest a document into the knowledge base.\n\nArgs:\n collection: Target collection name. If not provided, uses file name.\n file: The document file to upload and process.\n parse_method: Parser used during ingestion.\n chunk_strategy: Strategy for chunking the document.\n chunk_size: Target chunk size in characters.\n chunk_overlap: Overlap between consecutive chunks.\n separators: Optional JSON array of custom chunk separators (recursive only).\n embedding_model_id: Embedding model ID from model hub.\n embedding_batch_size: Batch size for embedding operations.\n max_retries: Maximum retry attempts for failures.\n retry_delay: Delay between retry attempts in seconds.", "operationId": "ingest_api_kb_ingest_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_ingest_api_kb_ingest_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/kb/ingest-cloud": { "post": { "tags": [ "kb" ], "summary": "Ingest Cloud", "description": "Ingest files from cloud storage.", "operationId": "ingest_cloud_api_kb_ingest_cloud_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CloudIngestRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/IngestionResult" }, "type": "array", "title": "Response Ingest Cloud Api Kb Ingest Cloud Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/kb/collections": { "get": { "tags": [ "kb" ], "summary": "List Collections Api", "description": "List all collections with their statistics.", "operationId": "list_collections_api_api_kb_collections_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCollectionsResult" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/kb/search": { "post": { "tags": [ "kb" ], "summary": "Search", "description": "Search documents in the knowledge base.\n\nArgs:\n collection: Target collection to search within.\n query_text: Query text to search for.\n embedding_model_id: Embedding model ID (required for dense/hybrid search).\n search_type: Search strategy (dense, sparse, or hybrid).\n top_k: Maximum number of results to return.\n filters: Optional filters for search.\n fusion_config: Optional fusion configuration for hybrid search.\n rerank_model_id: Optional rerank model for result reordering.\n rerank_top_k: Override for rerank result count.\n readonly: Whether to avoid index modifications.\n nprobes: Number of partitions to probe for ANN search.\n refine_factor: Refine factor for ANN search re-ranking.\n fallback_to_sparse: Allow hybrid search to fallback to sparse.", "operationId": "search_api_kb_search_post", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/Body_search_api_kb_search_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchPipelineResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/kb/ingest-web": { "post": { "tags": [ "kb" ], "summary": "Ingest Web", "description": "Ingest website content into the knowledge base.\n\nArgs:\n collection: Target collection name\n start_url: Starting URL for crawling\n max_pages: Maximum number of pages to crawl\n max_depth: Maximum crawl depth\n url_patterns: Comma-separated URL match patterns (regex)\n exclude_patterns: Comma-separated exclusion patterns (regex)\n same_domain_only: Only crawl same domain\n content_selector: CSS selector for main content area\n remove_selectors: Comma-separated CSS selectors to remove\n concurrent_requests: Number of concurrent requests\n request_delay: Delay between requests in seconds\n timeout: Request timeout in seconds\n respect_robots_txt: Respect robots.txt rules\n parse_method: Parser for document ingestion\n chunk_strategy: Chunking strategy\n chunk_size: Chunk size in characters\n chunk_overlap: Chunk overlap in characters\n embedding_model_id: Embedding model ID\n embedding_batch_size: Batch size for embedding\n max_retries: Maximum retry attempts\n retry_delay: Delay between retries", "operationId": "ingest_web_api_kb_ingest_web_post", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/Body_ingest_web_api_kb_ingest_web_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebIngestionResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/kb/collections/{collection_name}": { "delete": { "tags": [ "kb" ], "summary": "Delete Collection Api", "description": "Delete a collection and all its data.\n\nThis function ensures data consistency by attempting physical file deletion\nbefore database deletion. If physical deletion fails, the operation is\naborted to prevent inconsistent state.\n\nArgs:\n collection_name: Name of the collection to delete\n\nReturns:\n Deletion result with status, affected documents, and cleanup information\n\nRaises:\n HTTPException: If physical deletion fails (prevents database deletion)", "operationId": "delete_collection_api_api_kb_collections__collection_name__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "collection_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Collection Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CollectionOperationResult" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "kb" ], "summary": "Rename Collection Api", "description": "Rename a collection.\n\nArgs:\n collection_name: Current collection name\n new_name: New collection name\n\nReturns:\n Success message", "operationId": "rename_collection_api_api_kb_collections__collection_name__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "collection_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Collection Name" } } ], "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/Body_rename_collection_api_api_kb_collections__collection_name__put" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Rename Collection Api Api Kb Collections Collection Name Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/kb/collections/batch-delete": { "post": { "tags": [ "kb" ], "summary": "Batch Delete Collections Api", "description": "Delete multiple collections in one request.\n\nFor each name, runs the same pipeline as single delete (permissions, physical\ntrash, LanceDB, ``UploadedFile`` cleanup). Per-item failures are collected in\n``failed``; they do not roll back earlier successful deletions in the batch.\nLanceDB removal uses ``delete_collection`` with tenant-aware ``user_id`` and\n``is_admin`` filtering. Returns ``deleted`` and ``failed`` name lists.", "operationId": "batch_delete_collections_api_api_kb_collections_batch_delete_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchDeleteCollectionsRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchDeleteCollectionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/kb/collections/{collection_name}/documents/check": { "post": { "tags": [ "kb" ], "summary": "Check Documents Exist Api", "description": "Check which of the given filenames already exist in the collection.\n\nUsed by the frontend to show \"file already exists, re-upload?\" before ingest.\nNew records resolve names via `file_id -> UploadedFile.filename`; legacy records\nfall back to `source_path` basename.\n\nFor duplicate check we always filter by current user's documents only (including\nfor admins), so \"already exists\" matches what will be overwritten on re-upload.", "operationId": "check_documents_exist_api_api_kb_collections__collection_name__documents_check_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "collection_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Collection Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "description": "JSON body with 'filenames': list of filename strings", "title": "Body" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Check Documents Exist Api Api Kb Collections Collection Name Documents Check Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/kb/collections/{collection_name}/documents/{filename}": { "delete": { "tags": [ "kb" ], "summary": "Delete Document Api", "description": "Delete a document and all its associated data.\n\nArgs:\n collection_name: Name of the collection\n filename: Legacy filename lookup key for backward compatibility\n\nReturns:\n Deletion result with status, list of deleted doc_ids, and filename\n\nNote:\n This endpoint prefers `file_id` or `doc_id` when provided. The path\n `filename` is retained as a compatibility fallback for older clients.", "operationId": "delete_document_api_api_kb_collections__collection_name__documents__filename__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "collection_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Collection Name" } }, { "name": "filename", "in": "path", "required": true, "schema": { "type": "string", "title": "Filename" } }, { "name": "file_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Preferred UploadedFile file_id for document lookup", "title": "File Id" }, "description": "Preferred UploadedFile file_id for document lookup" }, { "name": "doc_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Preferred doc_id for document lookup", "title": "Doc Id" }, "description": "Preferred doc_id for document lookup" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Document Api Api Kb Collections Collection Name Documents Filename Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/kb/collections/{collection_name}/parses/{doc_id}/parse_result": { "get": { "tags": [ "kb" ], "summary": "Get Parse Result Api", "description": "Get parsed document results with pagination.\n\nArgs:\n collection_name: Collection name\n doc_id: Document ID\n page: Page number (1-indexed, default: 1)\n page_size: Number of elements per page (default: 20)\n parse_hash: Optional parse hash to filter. If None, uses the latest parse.\n\nReturns:\n ParseResultResponse with paginated text segments, tables, and figures", "operationId": "get_parse_result_api_api_kb_collections__collection_name__parses__doc_id__parse_result_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "collection_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Collection Name" } }, { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Doc Id" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page number (1-indexed)", "default": 1, "title": "Page" }, "description": "Page number (1-indexed)" }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Number of elements per page", "default": 20, "title": "Page Size" }, "description": "Number of elements per page" }, { "name": "parse_hash", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional parse hash to filter. If None, uses the latest parse.", "title": "Parse Hash" }, "description": "Optional parse hash to filter. If None, uses the latest parse." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ParseResultResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models/register": { "post": { "tags": [ "models" ], "summary": "Create Model", "description": "Create a new model configuration", "operationId": "create_model_api_models_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelWithAccessInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/": { "post": { "tags": [ "models" ], "summary": "Create Model", "description": "Create a new model configuration", "operationId": "create_model_api_models__post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelWithAccessInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "models" ], "summary": "List Models", "description": "List all model configurations accessible to the current user", "operationId": "list_models_api_models__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "model_provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by model type", "title": "Model Provider" }, "description": "Filter by model type" }, { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by category (llm, image)", "title": "Category" }, "description": "Filter by category (llm, image)" }, { "name": "is_active", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by active status", "default": true, "title": "Is Active" }, "description": "Filter by active status" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelWithAccessInfo" }, "title": "Response List Models Api Models Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models/user-default": { "get": { "tags": [ "models" ], "summary": "Get User Default Models", "description": "Get all user's default model configurations with per-type admin fallback", "operationId": "get_user_default_models_api_models_user_default_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": {}, "type": "array", "title": "Response Get User Default Models Api Models User Default Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "models" ], "summary": "Set User Default Model", "description": "Set a user's default model configuration", "operationId": "set_user_default_model_api_models_user_default_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDefaultModelCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDefaultModelResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/by-id/{model_id}": { "get": { "tags": [ "models" ], "summary": "Get Model By Path", "description": "Get a specific model configuration, including slash-containing model IDs.", "operationId": "get_model_by_path_api_models_by_id__model_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelWithAccessInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "models" ], "summary": "Update Model By Path", "description": "Update a model configuration, including slash-containing model IDs.", "operationId": "update_model_by_path_api_models_by_id__model_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelWithAccessInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "models" ], "summary": "Delete Model By Path", "description": "Delete a model configuration, including slash-containing model IDs.", "operationId": "delete_model_by_path_api_models_by_id__model_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Model By Path Api Models By Id Model Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models/{model_id}": { "get": { "tags": [ "models" ], "summary": "Get Model", "description": "Get a specific model configuration", "operationId": "get_model_api_models__model_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelWithAccessInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "models" ], "summary": "Update Model", "description": "Update a model configuration", "operationId": "update_model_api_models__model_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelWithAccessInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "models" ], "summary": "Delete Model", "description": "Delete a model configuration", "operationId": "delete_model_api_models__model_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Model Api Models Model Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models/test-connection": { "post": { "tags": [ "models" ], "summary": "Test Model Connection", "description": "Test connection with provided model parameters before saving.", "operationId": "test_model_connection_api_models_test_connection_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelConnectionTestRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelTestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/test": { "post": { "tags": [ "models" ], "summary": "Test Models", "description": "Test model configurations", "operationId": "test_models_api_models_test_post", "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ModelTestRequest" }, { "type": "null" } ], "title": "Test Request" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ModelTestResponse" }, "type": "array", "title": "Response Test Models Api Models Test Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/types/available": { "get": { "tags": [ "models" ], "summary": "Get Available Model Providers", "description": "Get available model providers", "operationId": "get_available_model_providers_api_models_types_available_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Available Model Providers Api Models Types Available Get" } } } } } } }, "/api/models/categories": { "get": { "tags": [ "models" ], "summary": "List Model Categories", "description": "List all model categories accessible to the current user", "operationId": "list_model_categories_api_models_categories_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Model Categories Api Models Categories Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/providers": { "get": { "tags": [ "models" ], "summary": "List Model Providers", "description": "List all model providers accessible to the current user", "operationId": "list_model_providers_api_models_providers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Model Providers Api Models Providers Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/abilities": { "get": { "tags": [ "models" ], "summary": "List Model Abilities", "description": "List all model abilities across accessible models", "operationId": "list_model_abilities_api_models_abilities_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Model Abilities Api Models Abilities Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/summary": { "get": { "tags": [ "models" ], "summary": "Get Models Summary", "description": "Get summary statistics of accessible models", "operationId": "get_models_summary_api_models_summary_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Models Summary Api Models Summary Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/default/{model_provider}": { "get": { "tags": [ "models" ], "summary": "Get Default Model", "description": "Get the default model for a specific type", "operationId": "get_default_model_api_models_default__model_provider__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "model_provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Model Provider" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ModelWithAccessInfo" }, { "type": "null" } ], "title": "Response Get Default Model Api Models Default Model Provider Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models/default/general": { "get": { "tags": [ "models" ], "summary": "Get General Default Model", "description": "Get the general default model (config_type='general')", "operationId": "get_general_default_model_api_models_default_general_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ModelWithAccessInfo" }, { "type": "null" } ], "title": "Response Get General Default Model Api Models Default General Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/default/small-fast": { "get": { "tags": [ "models" ], "summary": "Get Small Fast Default Model", "description": "Get the small/fast default model (config_type='small_fast')", "operationId": "get_small_fast_default_model_api_models_default_small_fast_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ModelWithAccessInfo" }, { "type": "null" } ], "title": "Response Get Small Fast Default Model Api Models Default Small Fast Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/default/visual": { "get": { "tags": [ "models" ], "summary": "Get Visual Default Model", "description": "Get the visual default model (config_type='visual')", "operationId": "get_visual_default_model_api_models_default_visual_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ModelWithAccessInfo" }, { "type": "null" } ], "title": "Response Get Visual Default Model Api Models Default Visual Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/default/compact": { "get": { "tags": [ "models" ], "summary": "Get Compact Default Model", "description": "Get the compact default model (config_type='compact')", "operationId": "get_compact_default_model_api_models_default_compact_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ModelWithAccessInfo" }, { "type": "null" } ], "title": "Response Get Compact Default Model Api Models Default Compact Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/default/embedding": { "get": { "tags": [ "models" ], "summary": "Get Embedding Default Model", "description": "Get the default embedding model (config_type='embedding')", "operationId": "get_embedding_default_model_api_models_default_embedding_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ModelWithAccessInfo" }, { "type": "null" } ], "title": "Response Get Embedding Default Model Api Models Default Embedding Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/user-default/{config_type}": { "get": { "tags": [ "models" ], "summary": "Get User Default Model", "description": "Get a user's default model configuration for a specific type", "operationId": "get_user_default_model_api_models_user_default__config_type__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "config_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Config Type" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/UserDefaultModelResponse" }, { "type": "null" } ], "title": "Response Get User Default Model Api Models User Default Config Type Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "models" ], "summary": "Delete User Default Model", "description": "Delete a user's default model configuration", "operationId": "delete_user_default_model_api_models_user_default__config_type__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "config_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Config Type" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete User Default Model Api Models User Default Config Type Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models/public/list": { "get": { "tags": [ "models" ], "summary": "List Public Models", "description": "List public model information (no authentication required).\n\nReturns only basic model information without sensitive data like API keys.", "operationId": "list_public_models_api_models_public_list_get", "parameters": [ { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by category", "title": "Category" }, "description": "Filter by category" }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by provider", "title": "Provider" }, "description": "Filter by provider" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Public Models Api Models Public List Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models/public/categories": { "get": { "tags": [ "models" ], "summary": "List Public Categories", "description": "List all available model categories (no authentication required).", "operationId": "list_public_categories_api_models_public_categories_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Public Categories Api Models Public Categories Get" } } } } } } }, "/api/models/public/providers": { "get": { "tags": [ "models" ], "summary": "List Public Providers", "description": "List all available model providers (no authentication required).", "operationId": "list_public_providers_api_models_public_providers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Public Providers Api Models Public Providers Get" } } } } } } }, "/api/models/public/summary": { "get": { "tags": [ "models" ], "summary": "Get Public Summary", "description": "Get public summary of available models (no authentication required).", "operationId": "get_public_summary_api_models_public_summary_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Public Summary Api Models Public Summary Get" } } } } } } }, "/api/models/providers/supported": { "get": { "tags": [ "models" ], "summary": "List Supported Providers", "description": "Get list of supported model providers with their information.", "operationId": "list_supported_providers_api_models_providers_supported_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response List Supported Providers Api Models Providers Supported Get" } } } } } } }, "/api/models/providers/{provider}/models": { "post": { "tags": [ "models" ], "summary": "Fetch Provider Models", "description": "Fetch available models from a specific provider.\n\nRequires the provider's API key. For providers like Azure OpenAI,\nbase_url is also required.", "operationId": "fetch_provider_models_api_models_providers__provider__models_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Body_fetch_provider_models_api_models_providers__provider__models_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Fetch Provider Models Api Models Providers Provider Models Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/models/providers/fetch": { "post": { "tags": [ "models" ], "summary": "Fetch Multiple Providers Models", "description": "Fetch available models from multiple providers at once.\n\nUses API keys from existing model configurations in the database.\nThis endpoint will use the API keys stored in your configured models\nto fetch available models from each provider.", "operationId": "fetch_multiple_providers_models_api_models_providers_fetch_post", "requestBody": { "content": { "application/json": { "schema": { "items": { "type": "string" }, "type": "array", "title": "Providers" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Fetch Multiple Providers Models Api Models Providers Fetch Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/models/xinference/tts-models": { "get": { "tags": [ "models" ], "summary": "List Xinference Tts Models", "description": "Get available TTS models from Xinference server.\n\nReturns a list of TTS/audio models running on the Xinference server,\nalong with their model abilities that can be used for the 'abilities' field\nwhen registering a model.\n\nFor TTS models, use abilities: [\"tts\"]\nFor ASR models, use abilities: [\"asr\"]\nFor models with both capabilities, use: [\"tts\", \"asr\"]", "operationId": "list_xinference_tts_models_api_models_xinference_tts_models_get", "parameters": [ { "name": "base_url", "in": "query", "required": true, "schema": { "type": "string", "description": "Xinference server base URL", "title": "Base Url" }, "description": "Xinference server base URL" }, { "name": "api_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional API key", "title": "Api Key" }, "description": "Optional API key" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Xinference Tts Models Api Models Xinference Tts Models Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/preview/{legacy_path}": { "get": { "summary": "Redirect Legacy Preview", "operationId": "redirect_legacy_preview_preview__legacy_path__get", "parameters": [ { "name": "legacy_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Legacy Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/monitor/tools": { "get": { "tags": [ "monitor" ], "summary": "Get Tools", "description": "Get list of available tools", "operationId": "get_tools_api_monitor_tools_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Tools Api Monitor Tools Get" } } } } } } }, "/api/monitor/agents": { "get": { "tags": [ "monitor" ], "summary": "Get Agents", "description": "Get list of agents", "operationId": "get_agents_api_monitor_agents_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response Get Agents Api Monitor Agents Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/monitor/stats": { "get": { "tags": [ "monitor" ], "summary": "Get Monitoring Stats", "description": "Get monitoring statistics", "operationId": "get_monitoring_stats_api_monitor_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Monitoring Stats Api Monitor Stats Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/monitor/popular-tools": { "get": { "tags": [ "monitor" ], "summary": "Get Popular Tools", "description": "Get popular tools statistics", "operationId": "get_popular_tools_api_monitor_popular_tools_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response Get Popular Tools Api Monitor Popular Tools Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/monitor/model-stats": { "get": { "tags": [ "monitor" ], "summary": "Get Model Stats", "description": "Get model usage statistics", "operationId": "get_model_stats_api_monitor_model_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response Get Model Stats Api Monitor Model Stats Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/monitor/dashboard-stats": { "get": { "tags": [ "monitor" ], "summary": "Get Dashboard Stats", "description": "Get dashboard statistics", "operationId": "get_dashboard_stats_api_monitor_dashboard_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Dashboard Stats Api Monitor Dashboard Stats Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/progress/{task_id}": { "get": { "summary": "Get Task Progress", "description": "Get current progress status for a task.", "operationId": "get_task_progress_api_progress__task_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Task Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Task Progress Api Progress Task Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/progress": { "get": { "summary": "List Active Tasks", "description": "List all active progress tasks for the current user.", "operationId": "list_active_tasks_api_progress_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "task_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by task type", "title": "Task Type" }, "description": "Filter by task type" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Active Tasks Api Progress Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/memory/list": { "get": { "tags": [ "memory" ], "summary": "List Memories", "operationId": "list_memories_api_memory_list_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by category", "title": "Category" }, "description": "Filter by category" }, { "name": "tags", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated tags to filter", "title": "Tags" }, "description": "Comma-separated tags to filter" }, { "name": "keywords", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Comma-separated keywords to filter", "title": "Keywords" }, "description": "Comma-separated keywords to filter" }, { "name": "date_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Filter from this date", "title": "Date From" }, "description": "Filter from this date" }, { "name": "date_to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Filter to this date", "title": "Date To" }, "description": "Filter to this date" }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search query to filter memories by content", "title": "Search" }, "description": "Search query to filter memories by content" }, { "name": "similarity_threshold", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "description": "Similarity threshold for vector search (0.1-2.0)", "title": "Similarity Threshold" }, "description": "Similarity threshold for vector search (0.1-2.0)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "description": "Maximum results to return", "default": 100, "title": "Limit" }, "description": "Maximum results to return" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "Offset for pagination", "default": 0, "title": "Offset" }, "description": "Offset for pagination" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/memory/{memory_id}": { "delete": { "tags": [ "memory" ], "summary": "Delete Memory", "operationId": "delete_memory_api_memory__memory_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Memory Api Memory Memory Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "memory" ], "summary": "Update Memory", "operationId": "update_memory_api_memory__memory_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Update Memory Api Memory Memory Id Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "memory" ], "summary": "Get Memory", "operationId": "get_memory_api_memory__memory_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Memory Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Memory Api Memory Memory Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/memory/stats": { "get": { "tags": [ "memory" ], "summary": "Get Memory Stats", "operationId": "get_memory_stats_api_memory_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryStatsResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/memory": { "post": { "tags": [ "memory" ], "summary": "Create Memory", "operationId": "create_memory_api_memory_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Memory Request" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Create Memory Api Memory Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/memory/store-info": { "get": { "tags": [ "memory" ], "summary": "Get Store Info", "description": "Get current memory store information for debugging", "operationId": "get_store_info_api_memory_store_info_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Store Info Api Memory Store Info Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/mcp/apps": { "get": { "tags": [ "MCP Management" ], "summary": "List Mcp Apps", "description": "Get the list of available MCP applications in the library.", "operationId": "list_mcp_apps_api_mcp_apps_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "All", "title": "Category" } }, { "name": "location", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "remote", "title": "Location" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "all", "title": "Status" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true }, "title": "Response List Mcp Apps Api Mcp Apps Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/mcp/servers": { "get": { "tags": [ "MCP Management" ], "summary": "Get Mcp Servers", "description": "List MCP servers for the current user.", "operationId": "get_mcp_servers_api_mcp_servers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/MCPServerResponse" }, "type": "array", "title": "Response Get Mcp Servers Api Mcp Servers Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "MCP Management" ], "summary": "Create Mcp Server", "description": "Create a new MCP server.", "operationId": "create_mcp_server_api_mcp_servers_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/mcp/servers/{server_id}": { "get": { "tags": [ "MCP Management" ], "summary": "Get Mcp Server", "description": "Get a specific MCP server.", "operationId": "get_mcp_server_api_mcp_servers__server_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Server Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "MCP Management" ], "summary": "Update Mcp Server", "description": "Update an existing MCP server.", "operationId": "update_mcp_server_api_mcp_servers__server_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Server Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "MCP Management" ], "summary": "Delete Mcp Server", "description": "Delete an MCP server.", "operationId": "delete_mcp_server_api_mcp_servers__server_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Server Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/mcp/servers/{server_id}/toggle": { "post": { "tags": [ "MCP Management" ], "summary": "Toggle Mcp Server", "description": "Toggle MCP server active status.", "operationId": "toggle_mcp_server_api_mcp_servers__server_id__toggle_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Server Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPServerResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/mcp/servers/{server_id}/logs": { "get": { "tags": [ "MCP Management" ], "summary": "Get Mcp Server Logs", "description": "Get logs for an internal MCP server.", "operationId": "get_mcp_server_logs_api_mcp_servers__server_id__logs_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Server Id" } }, { "name": "lines", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Lines" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Mcp Server Logs Api Mcp Servers Server Id Logs Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/mcp/test-connection": { "post": { "tags": [ "MCP Management" ], "summary": "Test Mcp Connection", "description": "Test MCP server connection without saving.", "operationId": "test_mcp_connection_api_mcp_test_connection_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPConnectionTest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MCPConnectionTestResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/mcp/transports": { "get": { "tags": [ "MCP Management" ], "summary": "Get Supported Transports", "description": "Get list of supported transport types with descriptions.", "operationId": "get_supported_transports_api_mcp_transports_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Supported Transports Api Mcp Transports Get" } } } } } } }, "/api/mcp/servers/{server_id}/tools": { "get": { "tags": [ "MCP Management" ], "summary": "Get Mcp Server Tools", "description": "Get tools available from a specific MCP server.", "operationId": "get_mcp_server_tools_api_mcp_servers__server_id__tools_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "server_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Server Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Mcp Server Tools Api Mcp Servers Server Id Tools Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/custom-apis": { "get": { "tags": [ "Custom API Management" ], "summary": "List Custom Apis", "description": "List all Custom APIs for the current user.", "operationId": "list_custom_apis_api_custom_apis_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/CustomApiResponse" }, "type": "array", "title": "Response List Custom Apis Api Custom Apis Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "Custom API Management" ], "summary": "Create Custom Api", "description": "Create a new Custom API.", "operationId": "create_custom_api_api_custom_apis_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomApiCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomApiResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/custom-apis/{api_id}": { "get": { "tags": [ "Custom API Management" ], "summary": "Get Custom Api", "description": "Get a specific Custom API by ID.", "operationId": "get_custom_api_api_custom_apis__api_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "api_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Api Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomApiResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Custom API Management" ], "summary": "Update Custom Api", "description": "Update an existing Custom API.", "operationId": "update_custom_api_api_custom_apis__api_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "api_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Api Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomApiUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomApiResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Custom API Management" ], "summary": "Delete Custom Api", "description": "Delete a Custom API.", "operationId": "delete_custom_api_api_custom_apis__api_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "api_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Api Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/text2sql/databases": { "get": { "tags": [ "text2sql" ], "summary": "Get Databases", "description": "Get user's database configurations", "operationId": "get_databases_api_text2sql_databases_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/DatabaseResponse" }, "type": "array", "title": "Response Get Databases Api Text2Sql Databases Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "text2sql" ], "summary": "Create Database", "description": "Create a new database configuration", "operationId": "create_database_api_text2sql_databases_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseCreateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/text2sql/databases/{database_id}": { "put": { "tags": [ "text2sql" ], "summary": "Update Database", "description": "Update an existing database configuration", "operationId": "update_database_api_text2sql_databases__database_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "database_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Database Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "text2sql" ], "summary": "Delete Database", "description": "Delete a database configuration", "operationId": "delete_database_api_text2sql_databases__database_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "database_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Database Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Delete Database Api Text2Sql Databases Database Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/text2sql/databases/{database_id}/test": { "post": { "tags": [ "text2sql" ], "summary": "Test Database Connection", "description": "Test database connection", "operationId": "test_database_connection_api_text2sql_databases__database_id__test_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "database_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Database Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Test Database Connection Api Text2Sql Databases Database Id Test Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/text2sql/predict": { "post": { "tags": [ "text2sql" ], "summary": "Predict Data", "description": "Generate prediction based on chart data", "operationId": "predict_data_api_text2sql_predict_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PredictionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PredictionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/tools/available": { "get": { "tags": [ "tools" ], "summary": "Get Available Tools", "description": "Get list of all available tools, including MCP tools.\n\nTools are self-describing - each tool declares its own category via\nmetadata.category field. No manual category mapping needed.", "operationId": "get_available_tools_api_tools_available_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Available Tools Api Tools Available Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/tools/configurable": { "get": { "tags": [ "tools" ], "summary": "Get Configurable Tools", "operationId": "get_configurable_tools_api_tools_configurable_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Configurable Tools Api Tools Configurable Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/tools/sql-connections": { "get": { "tags": [ "tools" ], "summary": "Get Sql Connections", "operationId": "get_sql_connections_api_tools_sql_connections_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Sql Connections Api Tools Sql Connections Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/tools/sql-connections/{name}": { "put": { "tags": [ "tools" ], "summary": "Upsert Sql Connection", "operationId": "upsert_sql_connection_api_tools_sql_connections__name__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlConnectionUpsertRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Upsert Sql Connection Api Tools Sql Connections Name Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "tools" ], "summary": "Remove Sql Connection", "operationId": "remove_sql_connection_api_tools_sql_connections__name__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Remove Sql Connection Api Tools Sql Connections Name Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tools/{tool_name}/enabled": { "put": { "tags": [ "tools" ], "summary": "Update Tool Enabled", "operationId": "update_tool_enabled_api_tools__tool_name__enabled_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolEnableUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Update Tool Enabled Api Tools Tool Name Enabled Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tools/{tool_name}/credentials": { "get": { "tags": [ "tools" ], "summary": "Get Tool Credentials", "operationId": "get_tool_credentials_api_tools__tool_name__credentials_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Tool Credentials Api Tools Tool Name Credentials Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "tools" ], "summary": "Update Tool Credentials", "operationId": "update_tool_credentials_api_tools__tool_name__credentials_put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolCredentialUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Update Tool Credentials Api Tools Tool Name Credentials Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tools/{tool_name}/credentials/{field_name}": { "delete": { "tags": [ "tools" ], "summary": "Delete Tool Credential", "operationId": "delete_tool_credential_api_tools__tool_name__credentials__field_name__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "tool_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Tool Name" } }, { "name": "field_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Field Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Tool Credential Api Tools Tool Name Credentials Field Name Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tools/usage": { "get": { "tags": [ "tools" ], "summary": "Get Tool Usage", "description": "Get tool usage statistics", "operationId": "get_tool_usage_api_tools_usage_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response Get Tool Usage Api Tools Usage Get" } } } } } } }, "/api/admin/users": { "get": { "tags": [ "admin-users" ], "summary": "Get Users", "description": "Get paginated list of users (admin only)", "operationId": "get_users_api_admin_users_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Page size", "default": 20, "title": "Size" }, "description": "Page size" }, { "name": "search", "in": "query", "required": false, "schema": { "type": "string", "description": "Search username", "default": "", "title": "Search" }, "description": "Search username" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/admin/users/{user_id}": { "delete": { "tags": [ "admin-users" ], "summary": "Delete User", "description": "Delete a user (admin only)", "operationId": "delete_user_api_admin_users__user_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Delete User Api Admin Users User Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/admin/mcp/providers": { "get": { "tags": [ "Admin MCP" ], "summary": "List Providers", "operationId": "list_providers_api_admin_mcp_providers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/OAuthProviderResponse" }, "type": "array", "title": "Response List Providers Api Admin Mcp Providers Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "Admin MCP" ], "summary": "Create Provider", "operationId": "create_provider_api_admin_mcp_providers_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthProviderCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthProviderResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/admin/mcp/providers/{provider_id}": { "put": { "tags": [ "Admin MCP" ], "summary": "Update Provider", "operationId": "update_provider_api_admin_mcp_providers__provider_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "provider_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Provider Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthProviderUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthProviderResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Admin MCP" ], "summary": "Delete Provider", "operationId": "delete_provider_api_admin_mcp_providers__provider_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "provider_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Provider Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Provider Api Admin Mcp Providers Provider Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/admin/mcp/apps": { "get": { "tags": [ "Admin MCP" ], "summary": "List Apps", "operationId": "list_apps_api_admin_mcp_apps_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/PublicMCPAppResponse" }, "type": "array", "title": "Response List Apps Api Admin Mcp Apps Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "Admin MCP" ], "summary": "Create App", "operationId": "create_app_api_admin_mcp_apps_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicMCPAppCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicMCPAppResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/admin/mcp/apps/{app_id}": { "put": { "tags": [ "Admin MCP" ], "summary": "Update App", "operationId": "update_app_api_admin_mcp_apps__app_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "app_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "App Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicMCPAppCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicMCPAppResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Admin MCP" ], "summary": "Delete App", "operationId": "delete_app_api_admin_mcp_apps__app_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "app_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "App Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete App Api Admin Mcp Apps App Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/skills/": { "get": { "tags": [ "skills" ], "summary": "List Skills", "description": "List all available skills\n\nReturns:\n List of available skills with basic information", "operationId": "list_skills_api_skills__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/SkillInfo" }, "type": "array", "title": "Response List Skills Api Skills Get" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/skills/{skill_name}": { "get": { "tags": [ "skills" ], "summary": "Get Skill", "description": "Get single skill detail (including template)\n\nArgs:\n skill_name: Name of the skill to retrieve\n\nReturns:\n Detailed skill information including template\n\nRaises:\n HTTPException: If skill not found", "operationId": "get_skill_api_skills__skill_name__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "skill_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Skill Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/skills/recall": { "post": { "tags": [ "skills" ], "summary": "Recall Skill", "description": "Select appropriate skill based on task\n\nThis is the core interface: Vibe Planner calls it to get relevant skill\n\nArgs:\n request_data: Recall request with task and llm_id\n\nReturns:\n Selected skill or null if no relevant skill found", "operationId": "recall_skill_api_skills_recall_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecallRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecallResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/skills/reload": { "post": { "tags": [ "skills" ], "summary": "Reload Skills", "description": "Manually reload all skills\n\nRescans the skills directory and reloads all skills.\n\nReturns:\n Reload status with skill count", "operationId": "reload_skills_api_skills_reload_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReloadResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/system/version": { "get": { "tags": [ "system" ], "summary": "Get Version", "operationId": "get_version_api_system_version_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "null" } ] }, "type": "object", "title": "Response Get Version Api System Version Get" } } } } } } }, "/api/templates/": { "get": { "tags": [ "templates" ], "summary": "List Templates", "description": "List all available templates (including statistics)\n\nArgs:\n lang: Optional language code for localized descriptions\n\nReturns:\n List of available templates with statistics", "operationId": "list_templates_api_templates__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "lang", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Language code (e.g., 'en', 'zh')", "title": "Lang" }, "description": "Language code (e.g., 'en', 'zh')" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TemplateInfo" }, "title": "Response List Templates Api Templates Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/templates/{template_id}": { "get": { "tags": [ "templates" ], "summary": "Get Template", "description": "Get details of a single template (including agent_config)\n\nArgs:\n template_id: ID of the template to retrieve\n lang: Optional language code for localized descriptions\n\nReturns:\n Detailed template information with agent configuration\n\nRaises:\n HTTPException: If template not found", "operationId": "get_template_api_templates__template_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Template Id" } }, { "name": "lang", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Language code (e.g., 'en', 'zh')", "title": "Lang" }, "description": "Language code (e.g., 'en', 'zh')" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/templates/{template_id}/like": { "post": { "tags": [ "templates" ], "summary": "Like Template", "description": "Like or unlike a template\n\nArgs:\n template_id: ID of the template to like/unlike\n\nReturns:\n Current like status and total likes\n\nRaises:\n HTTPException: If template not found", "operationId": "like_template_api_templates__template_id__like_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Template Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LikeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/templates/{template_id}/use": { "post": { "tags": [ "templates" ], "summary": "Use Template", "description": "Use a template to create an agent (records usage count)\n\nArgs:\n template_id: ID of the template to use\n\nReturns:\n Success message\n\nRaises:\n HTTPException: If template not found", "operationId": "use_template_api_templates__template_id__use_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "template_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Template Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Use Template Api Templates Template Id Use Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agents/optimize-instructions": { "post": { "tags": [ "agents" ], "summary": "Optimize Instructions", "description": "Optimize agent instructions using an LLM.", "operationId": "optimize_instructions_api_agents_optimize_instructions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OptimizeInstructionsRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Response Optimize Instructions Api Agents Optimize Instructions Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/agents": { "get": { "tags": [ "agents" ], "summary": "List Agents", "description": "List all agents for the current user.", "operationId": "list_agents_api_agents_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/AgentListItem" }, "type": "array", "title": "Response List Agents Api Agents Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "agents" ], "summary": "Create Agent", "description": "Create a new custom agent.", "operationId": "create_agent_api_agents_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentCreateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/agents/{agent_id}": { "get": { "tags": [ "agents" ], "summary": "Get Agent", "description": "Get agent details.", "operationId": "get_agent_api_agents__agent_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "agents" ], "summary": "Update Agent", "description": "Update an existing agent.", "operationId": "update_agent_api_agents__agent_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "agents" ], "summary": "Delete Agent", "description": "Delete an agent.", "operationId": "delete_agent_api_agents__agent_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Agent Api Agents Agent Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agents/{agent_id}/publish": { "post": { "tags": [ "agents" ], "summary": "Publish Agent", "description": "Publish an agent (make it publicly accessible).", "operationId": "publish_agent_api_agents__agent_id__publish_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agents/{agent_id}/unpublish": { "post": { "tags": [ "agents" ], "summary": "Unpublish Agent", "description": "Unpublish an agent (revert to draft status).", "operationId": "unpublish_agent_api_agents__agent_id__unpublish_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agents/{agent_id}/logo": { "post": { "tags": [ "agents" ], "summary": "Upload Agent Logo", "description": "Upload or update agent logo.", "operationId": "upload_agent_logo_api_agents__agent_id__logo_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "string", "description": "Logo image as base64 data URL", "title": "Logo Base64" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Upload Agent Logo Api Agents Agent Id Logo Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agents/preview": { "post": { "tags": [ "agents" ], "summary": "Preview Agent", "description": "Preview agent response without saving to database.", "operationId": "preview_agent_api_agents_preview_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentPreviewRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentPreviewResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/channels": { "get": { "tags": [ "Channels" ], "summary": "Get User Channels", "description": "Get all channels configured by the current user.", "operationId": "get_user_channels_api_channels_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/UserChannelResponse" }, "type": "array", "title": "Response Get User Channels Api Channels Get" } } } } }, "security": [ { "HTTPBearer": [] } ] }, "post": { "tags": [ "Channels" ], "summary": "Create User Channel", "description": "Create a new channel configuration.", "operationId": "create_user_channel_api_channels_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserChannelCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserChannelResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/channels/{channel_id}": { "put": { "tags": [ "Channels" ], "summary": "Update User Channel", "description": "Update a channel configuration.", "operationId": "update_user_channel_api_channels__channel_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Channel Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserChannelUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserChannelResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Channels" ], "summary": "Delete User Channel", "description": "Delete a channel configuration.", "operationId": "delete_user_channel_api_channels__channel_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Channel Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "title": "Response Delete User Channel Api Channels Channel Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/widget/auth": { "post": { "tags": [ "widget" ], "summary": "Authenticate Widget", "description": "Authenticate widget and issue a guest token", "operationId": "authenticate_widget_api_widget_auth_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetAuthRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetAuthResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/widget/chat/task/create": { "post": { "tags": [ "widget" ], "summary": "Create Widget Task", "description": "Create new chat task for widget guest", "operationId": "create_widget_task_api_widget_chat_task_create_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCreateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskCreateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } } }, "components": { "schemas": { "AgentCreateRequest": { "properties": { "name": { "type": "string", "maxLength": 200, "minLength": 1, "title": "Name", "description": "Agent name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "Agent description" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions", "description": "System instructions/prompt" }, "execution_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Mode", "description": "Execution mode: flash, balanced, or think", "default": "balanced" }, "models": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Models", "description": "Model config: {general, small_fast, visual, compact}" }, "knowledge_bases": { "items": { "type": "string" }, "type": "array", "title": "Knowledge Bases", "description": "Knowledge base names" }, "skills": { "items": { "type": "string" }, "type": "array", "title": "Skills", "description": "Skill names" }, "tool_categories": { "items": { "type": "string" }, "type": "array", "title": "Tool Categories", "description": "Tool category names" }, "suggested_prompts": { "items": { "type": "string" }, "type": "array", "title": "Suggested Prompts", "description": "Suggested prompt examples for users" }, "logo_base64": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Logo Base64", "description": "Logo image as base64 data URL" } }, "type": "object", "required": [ "name" ], "title": "AgentCreateRequest", "description": "Request model for creating a new agent." }, "AgentListItem": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "logo_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Logo Url" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" }, "widget_enabled": { "type": "boolean", "title": "Widget Enabled" }, "allowed_domains": { "items": { "type": "string" }, "type": "array", "title": "Allowed Domains" } }, "type": "object", "required": [ "id", "name", "description", "logo_url", "status", "created_at", "updated_at", "widget_enabled", "allowed_domains" ], "title": "AgentListItem", "description": "Simplified agent model for list views." }, "AgentPreviewRequest": { "properties": { "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions", "description": "System instructions/prompt" }, "execution_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Mode", "description": "Execution mode: flash, balanced, or think", "default": "balanced" }, "models": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Models", "description": "Model config: {general, small_fast, visual, compact}" }, "knowledge_bases": { "items": { "type": "string" }, "type": "array", "title": "Knowledge Bases", "description": "Knowledge base names" }, "skills": { "items": { "type": "string" }, "type": "array", "title": "Skills", "description": "Skill names" }, "tool_categories": { "items": { "type": "string" }, "type": "array", "title": "Tool Categories", "description": "Tool category names" }, "message": { "type": "string", "title": "Message", "description": "User message to preview" } }, "type": "object", "required": [ "message" ], "title": "AgentPreviewRequest", "description": "Request model for agent preview." }, "AgentPreviewResponse": { "properties": { "response": { "type": "string", "title": "Response" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "response", "status" ], "title": "AgentPreviewResponse", "description": "Response model for agent preview." }, "AgentResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "user_id": { "type": "integer", "title": "User Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "execution_mode": { "type": "string", "title": "Execution Mode" }, "models": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Models" }, "knowledge_bases": { "items": { "type": "string" }, "type": "array", "title": "Knowledge Bases" }, "skills": { "items": { "type": "string" }, "type": "array", "title": "Skills" }, "tool_categories": { "items": { "type": "string" }, "type": "array", "title": "Tool Categories" }, "suggested_prompts": { "items": { "type": "string" }, "type": "array", "title": "Suggested Prompts" }, "logo_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Logo Url" }, "status": { "type": "string", "title": "Status" }, "published_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Published At" }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" }, "widget_enabled": { "type": "boolean", "title": "Widget Enabled" }, "allowed_domains": { "items": { "type": "string" }, "type": "array", "title": "Allowed Domains" } }, "type": "object", "required": [ "id", "user_id", "name", "description", "instructions", "execution_mode", "models", "knowledge_bases", "skills", "tool_categories", "suggested_prompts", "logo_url", "status", "published_at", "created_at", "updated_at", "widget_enabled", "allowed_domains" ], "title": "AgentResponse", "description": "Response model for agent data." }, "AgentUpdateRequest": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 200, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "execution_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Mode", "description": "Execution mode: flash, balanced, or think" }, "models": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Models" }, "knowledge_bases": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Knowledge Bases" }, "skills": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Skills" }, "tool_categories": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tool Categories" }, "suggested_prompts": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Suggested Prompts", "description": "Suggested prompt examples for users" }, "logo_base64": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Logo Base64" }, "widget_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Widget Enabled" }, "allowed_domains": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Allowed Domains" } }, "type": "object", "title": "AgentUpdateRequest", "description": "Request model for updating an agent." }, "BatchDeleteCollectionsRequest": { "properties": { "collection_names": { "items": { "type": "string" }, "type": "array", "maxItems": 200, "minItems": 1, "title": "Collection Names", "description": "List of collection names to delete" } }, "type": "object", "required": [ "collection_names" ], "title": "BatchDeleteCollectionsRequest", "description": "Request body for batch delete collections." }, "BatchDeleteCollectionsResponse": { "properties": { "deleted": { "items": { "type": "string" }, "type": "array", "title": "Deleted", "description": "Collection names that were deleted successfully" }, "failed": { "items": { "$ref": "#/components/schemas/BatchDeleteFailureItem" }, "type": "array", "title": "Failed", "description": "Collection names that failed to delete with reasons" } }, "type": "object", "title": "BatchDeleteCollectionsResponse", "description": "Response for batch delete collections." }, "BatchDeleteFailureItem": { "properties": { "name": { "type": "string", "title": "Name", "description": "Collection name" }, "error": { "type": "string", "title": "Error", "description": "Error message" } }, "type": "object", "required": [ "name", "error" ], "title": "BatchDeleteFailureItem", "description": "One failed deletion in a batch." }, "Body_fetch_provider_models_api_models_providers__provider__models_post": { "properties": { "api_key": { "type": "string", "title": "Api Key" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" } }, "type": "object", "required": [ "api_key" ], "title": "Body_fetch_provider_models_api_models_providers__provider__models_post" }, "Body_ingest_api_kb_ingest_post": { "properties": { "collection": { "type": "string", "title": "Collection" }, "file": { "type": "string", "format": "binary", "title": "File" }, "parse_method": { "anyOf": [ { "$ref": "#/components/schemas/ParseMethod" }, { "type": "null" } ], "description": "Parser used during ingestion. Options: default, pypdf, pdfplumber, unstructured, pymupdf, deepdoc" }, "chunk_strategy": { "anyOf": [ { "$ref": "#/components/schemas/ChunkStrategy" }, { "type": "null" } ], "description": "Chunking strategy. Options: recursive (default), fixed_size, markdown" }, "chunk_size": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Chunk Size", "description": "Chunk size in characters (default: 1000)" }, "chunk_overlap": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Chunk Overlap", "description": "Chunk overlap in characters (default: 200)" }, "separators": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Separators", "description": "Custom chunk separators as JSON array of strings, e.g. [\"\\n\\n\", \"\\n\", \"。\"]. Only used when chunk_strategy is recursive. Omit or empty to use default separators." }, "embedding_model_id": { "type": "string", "title": "Embedding Model Id", "description": "Embedding model ID (default: text-embedding-v4)", "default": "text-embedding-v4" }, "embedding_batch_size": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Embedding Batch Size", "description": "Batch size for embedding (default: 10)" }, "max_retries": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Max Retries", "description": "Maximum retries for embedding failures (default: 3)" }, "retry_delay": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "null" } ], "title": "Retry Delay", "description": "Delay between retries in seconds (default: 1.0)" } }, "type": "object", "required": [ "file" ], "title": "Body_ingest_api_kb_ingest_post" }, "Body_ingest_web_api_kb_ingest_web_post": { "properties": { "collection": { "type": "string", "title": "Collection", "description": "Target collection name" }, "start_url": { "type": "string", "title": "Start Url", "description": "Starting URL for crawling" }, "max_pages": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Pages", "description": "Maximum number of pages to crawl (default: 100)", "default": 100 }, "max_depth": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Depth", "description": "Maximum crawl depth (default: 3)", "default": 3 }, "url_patterns": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url Patterns", "description": "Comma-separated URL match patterns (regex)" }, "exclude_patterns": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Exclude Patterns", "description": "Comma-separated exclusion patterns (regex)" }, "same_domain_only": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Same Domain Only", "description": "Only crawl same domain (default: True)", "default": true }, "content_selector": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content Selector", "description": "CSS selector for main content area" }, "remove_selectors": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Remove Selectors", "description": "Comma-separated CSS selectors to remove" }, "concurrent_requests": { "anyOf": [ { "type": "integer", "maximum": 10.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Concurrent Requests", "description": "Concurrent requests (default: 3, max: 10)", "default": 3 }, "request_delay": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "null" } ], "title": "Request Delay", "description": "Delay between requests in seconds (default: 1.0)", "default": 1.0 }, "timeout": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Timeout", "description": "Request timeout in seconds (default: 30)", "default": 30 }, "respect_robots_txt": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Respect Robots Txt", "description": "Respect robots.txt (default: True)", "default": true }, "parse_method": { "anyOf": [ { "$ref": "#/components/schemas/ParseMethod" }, { "type": "null" } ], "description": "Parser used during ingestion" }, "chunk_strategy": { "anyOf": [ { "$ref": "#/components/schemas/ChunkStrategy" }, { "type": "null" } ], "description": "Chunking strategy" }, "chunk_size": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Chunk Size", "description": "Chunk size in characters (default: 1000)" }, "chunk_overlap": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Chunk Overlap", "description": "Chunk overlap (default: 200)" }, "separators": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Separators", "description": "Custom chunk separators as JSON array of strings; only used when chunk_strategy is recursive." }, "embedding_model_id": { "type": "string", "title": "Embedding Model Id", "description": "Embedding model ID", "default": "text-embedding-v4" }, "embedding_batch_size": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Embedding Batch Size", "description": "Batch size for embedding (default: 10)" }, "max_retries": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Max Retries", "description": "Maximum retries for embedding failures (default: 3)" }, "retry_delay": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "null" } ], "title": "Retry Delay", "description": "Delay between retries in seconds (default: 1.0)" } }, "type": "object", "required": [ "collection", "start_url" ], "title": "Body_ingest_web_api_kb_ingest_web_post" }, "Body_rename_collection_api_api_kb_collections__collection_name__put": { "properties": { "new_name": { "type": "string", "title": "New Name", "description": "New collection name" } }, "type": "object", "required": [ "new_name" ], "title": "Body_rename_collection_api_api_kb_collections__collection_name__put" }, "Body_search_api_kb_search_post": { "properties": { "collection": { "type": "string", "title": "Collection", "description": "Target collection to search within" }, "query_text": { "type": "string", "title": "Query Text", "description": "Query text to search for" }, "embedding_model_id": { "type": "string", "title": "Embedding Model Id", "description": "Embedding model ID (default: text-embedding-v4)", "default": "text-embedding-v4" }, "search_type": { "anyOf": [ { "$ref": "#/components/schemas/SearchType" }, { "type": "null" } ], "description": "Search strategy: dense, sparse, or hybrid (default: hybrid)" }, "top_k": { "anyOf": [ { "type": "integer", "maximum": 100.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Top K", "description": "Maximum number of results to return (default: 5)" }, "filters": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Filters", "description": "Optional filters to apply during search. Format: {field: value} for equality filters. For advanced filters, use {field: {operator: str, value: Any}} where operator can be: eq, ne, gt, gte, lt, lte, in, contains." }, "fusion_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Fusion Config", "description": "Optional fusion configuration for hybrid search" }, "rerank_model_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Rerank Model Id", "description": "Optional rerank model ID for result reordering" }, "rerank_top_k": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Rerank Top K", "description": "Optional override for rerank result count" }, "readonly": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Readonly", "description": "Avoid index modifications (default: False)" }, "nprobes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Nprobes", "description": "Number of partitions to probe for ANN search" }, "refine_factor": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Refine Factor", "description": "Refine factor for ANN search re-ranking" }, "fallback_to_sparse": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Fallback To Sparse", "description": "Allow hybrid search to fallback to sparse (default: True)" } }, "type": "object", "required": [ "collection", "query_text" ], "title": "Body_search_api_kb_search_post" }, "Body_upload_file_api_files_upload_post": { "properties": { "file": { "anyOf": [ { "type": "string", "format": "binary" }, { "type": "null" } ], "title": "File" }, "files": { "anyOf": [ { "items": { "type": "string", "format": "binary" }, "type": "array" }, { "type": "null" } ], "title": "Files" }, "task_type": { "type": "string", "title": "Task Type" }, "message": { "type": "string", "title": "Message", "default": "" }, "task_id": { "type": "string", "title": "Task Id" }, "folder": { "type": "string", "title": "Folder" } }, "type": "object", "required": [ "task_type" ], "title": "Body_upload_file_api_files_upload_post" }, "ChangePasswordRequest": { "properties": { "current_password": { "type": "string", "title": "Current Password" }, "new_password": { "type": "string", "title": "New Password" } }, "type": "object", "required": [ "current_password", "new_password" ], "title": "ChangePasswordRequest", "description": "Change password request model" }, "ChangePasswordResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "success", "message" ], "title": "ChangePasswordResponse", "description": "Change password response model" }, "ChartData": { "properties": { "columns": { "items": { "type": "string" }, "type": "array", "title": "Columns" }, "rows": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Rows" } }, "type": "object", "required": [ "columns", "rows" ], "title": "ChartData", "description": "Chart data structure" }, "ChunkStrategy": { "type": "string", "enum": [ "recursive", "fixed_size", "markdown" ], "title": "ChunkStrategy", "description": "Available chunk strategies" }, "CloudFile": { "properties": { "provider": { "type": "string", "title": "Provider" }, "fileId": { "type": "string", "title": "Fileid" }, "fileName": { "type": "string", "title": "Filename" } }, "type": "object", "required": [ "provider", "fileId", "fileName" ], "title": "CloudFile" }, "CloudIngestRequest": { "properties": { "files": { "items": { "$ref": "#/components/schemas/CloudFile" }, "type": "array", "title": "Files" }, "collection": { "type": "string", "title": "Collection" }, "parse_method": { "anyOf": [ { "$ref": "#/components/schemas/ParseMethod" }, { "type": "null" } ] }, "chunk_strategy": { "anyOf": [ { "$ref": "#/components/schemas/ChunkStrategy" }, { "type": "null" } ] }, "chunk_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Size" }, "chunk_overlap": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Overlap" }, "separators": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Separators" }, "embedding_model_id": { "type": "string", "title": "Embedding Model Id", "default": "text-embedding-v4" }, "embedding_batch_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Embedding Batch Size" }, "max_retries": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Retries" }, "retry_delay": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Retry Delay" } }, "type": "object", "required": [ "files", "collection" ], "title": "CloudIngestRequest" }, "CollectionDocumentMetadata": { "properties": { "filename": { "type": "string", "title": "Filename", "description": "Display filename for the document" }, "file_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Id", "description": "UploadedFile identifier when available" }, "doc_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Doc Id", "description": "Knowledge base document identifier when available" } }, "type": "object", "required": [ "filename" ], "title": "CollectionDocumentMetadata" }, "CollectionInfo": { "properties": { "schema_version": { "type": "string", "title": "Schema Version", "description": "Schema version for migration compatibility", "default": "1.0.0" }, "name": { "type": "string", "title": "Name", "description": "Collection identifier" }, "embedding_model_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Model Id", "description": "Fixed embedding model ID. Set during first document ingestion." }, "embedding_dimension": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Embedding Dimension", "description": "Vector dimension. Auto-detected from embedding model." }, "documents": { "type": "integer", "title": "Documents", "description": "Total number of registered documents", "default": 0 }, "processed_documents": { "type": "integer", "title": "Processed Documents", "description": "Number of successfully processed documents", "default": 0 }, "parses": { "type": "integer", "title": "Parses", "description": "Number of parse records", "default": 0 }, "chunks": { "type": "integer", "title": "Chunks", "description": "Number of chunk records", "default": 0 }, "embeddings": { "type": "integer", "title": "Embeddings", "description": "Number of embedding vectors", "default": 0 }, "document_names": { "items": { "type": "string" }, "type": "array", "title": "Document Names", "description": "Distinct source paths for documents within the collection" }, "document_metadata": { "items": { "$ref": "#/components/schemas/CollectionDocumentMetadata" }, "type": "array", "title": "Document Metadata", "description": "Minimal per-document metadata for UI actions like unambiguous delete" }, "owners": { "items": { "type": "integer" }, "type": "array", "title": "Owners", "description": "Distinct user IDs that have documents in this collection" }, "collection_locked": { "type": "boolean", "title": "Collection Locked", "description": "Whether to lock collection configuration. When True, enforces strict config validation.", "default": false }, "allow_mixed_parse_methods": { "type": "boolean", "title": "Allow Mixed Parse Methods", "description": "Whether to allow mixed parse methods within the collection. When False, enforces type-based parse method consistency.", "default": false }, "skip_config_validation": { "type": "boolean", "title": "Skip Config Validation", "description": "Whether to skip configuration validation during ingestion. Use with caution.", "default": false }, "ingestion_config": { "anyOf": [ { "$ref": "#/components/schemas/IngestionConfig" }, { "type": "null" } ], "description": "Default ingestion configuration for the collection." }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "last_accessed_at": { "type": "string", "format": "date-time", "title": "Last Accessed At" }, "extra_metadata": { "additionalProperties": true, "type": "object", "title": "Extra Metadata", "description": "Additional metadata for future extensions" } }, "type": "object", "required": [ "name" ], "title": "CollectionInfo", "description": "Aggregate metadata for a single collection with embedding binding." }, "CollectionOperationDetail": { "properties": { "doc_id": { "type": "string", "title": "Doc Id", "description": "Document identifier affected by the operation" }, "status": { "$ref": "#/components/schemas/DocumentProcessingStatus", "description": "Resulting status recorded for the document" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message", "description": "Optional message describing individual document handling" } }, "type": "object", "required": [ "doc_id", "status" ], "title": "CollectionOperationDetail", "description": "Per-document detail for collection-level management operations." }, "CollectionOperationResult": { "properties": { "status": { "type": "string", "title": "Status", "description": "Operation status: success|partial_success|error" }, "collection": { "type": "string", "title": "Collection", "description": "Collection identifier affected by the operation" }, "message": { "type": "string", "title": "Message", "description": "Human-readable summary of the collection operation" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "description": "Non-fatal issues encountered while processing the collection" }, "affected_documents": { "items": { "$ref": "#/components/schemas/CollectionOperationDetail" }, "type": "array", "title": "Affected Documents", "description": "Subset of documents impacted by the collection operation" }, "deleted_counts": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Deleted Counts", "description": "Aggregated deletion counts per table when applicable" } }, "type": "object", "required": [ "status", "collection", "message" ], "title": "CollectionOperationResult", "description": "Response payload for collection-level management operations." }, "ConnectionInfo": { "properties": { "name": { "type": "string", "title": "Name", "description": "Name of the connection" }, "logo": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Logo", "description": "URL to the logo image" } }, "type": "object", "required": [ "name" ], "title": "ConnectionInfo", "description": "Information about a connection (e.g. MCP app)" }, "CredentialFieldUpdate": { "properties": { "value": { "type": "string", "title": "Value" } }, "type": "object", "required": [ "value" ], "title": "CredentialFieldUpdate" }, "CustomApiCreate": { "properties": { "name": { "type": "string", "maxLength": 100, "minLength": 1, "title": "Name", "description": "API name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "API description" }, "url": { "anyOf": [ { "type": "string", "maxLength": 500, "minLength": 1 }, { "type": "null" } ], "title": "Url", "description": "API URL" }, "method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Method", "description": "HTTP method", "default": "GET" }, "headers": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Headers", "description": "HTTP headers" }, "env": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Env", "description": "Environment variables (secrets)" }, "is_active": { "type": "boolean", "title": "Is Active", "description": "Whether the API is active", "default": true } }, "type": "object", "required": [ "name" ], "title": "CustomApiCreate", "description": "Request model for creating a Custom API." }, "CustomApiResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "user_id": { "type": "integer", "title": "User Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url" }, "method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Method" }, "headers": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Headers" }, "env": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Env" }, "is_active": { "type": "boolean", "title": "Is Active" }, "is_default": { "type": "boolean", "title": "Is Default" }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" } }, "type": "object", "required": [ "id", "user_id", "name", "description", "url", "method", "headers", "env", "is_active", "is_default", "created_at", "updated_at" ], "title": "CustomApiResponse", "description": "Response model for Custom API." }, "CustomApiUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 100, "minLength": 1 }, { "type": "null" } ], "title": "Name", "description": "API name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "API description" }, "url": { "anyOf": [ { "type": "string", "maxLength": 500, "minLength": 1 }, { "type": "null" } ], "title": "Url", "description": "API URL" }, "method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Method", "description": "HTTP method" }, "headers": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Headers", "description": "HTTP headers" }, "env": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Env", "description": "Environment variables (secrets)" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active", "description": "Whether the API is active" } }, "type": "object", "title": "CustomApiUpdate", "description": "Request model for updating a Custom API." }, "DataMapping": { "properties": { "xAxis": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Xaxis" }, "yAxis": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Yaxis" }, "valueAxis": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Valueaxis" } }, "type": "object", "title": "DataMapping", "description": "Data mapping for chart axes" }, "DatabaseCreateRequest": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name", "description": "Database display name" }, "type": { "type": "string", "title": "Type", "description": "Database type (sqlite, postgresql, mysql, sqlserver)" }, "url": { "type": "string", "minLength": 1, "title": "Url", "description": "Database connection URL" }, "read_only": { "type": "boolean", "title": "Read Only", "description": "Whether database is read-only", "default": true } }, "type": "object", "required": [ "name", "type", "url" ], "title": "DatabaseCreateRequest", "description": "Request schema for creating a new database configuration" }, "DatabaseResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "title": "Type" }, "url": { "type": "string", "title": "Url" }, "read_only": { "type": "boolean", "title": "Read Only" }, "status": { "type": "string", "title": "Status" }, "table_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Table Count" }, "last_connected_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Connected At" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" } }, "type": "object", "required": [ "id", "name", "type", "url", "read_only", "status", "created_at", "updated_at" ], "title": "DatabaseResponse", "description": "Response schema for database configuration" }, "DocumentProcessingStatus": { "type": "string", "enum": [ "pending", "running", "chunked", "partially_embedded", "success", "failed", "cancelled" ], "title": "DocumentProcessingStatus", "description": "States representing document ingestion lifecycle." }, "ExampleItem": { "properties": { "input": { "type": "string", "title": "Input" }, "output": { "type": "string", "title": "Output" } }, "type": "object", "required": [ "input", "output" ], "title": "ExampleItem", "description": "Input/output example for process mode" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "IngestionConfig": { "properties": { "deepdoc_processing_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Deepdoc Processing Mode", "description": "DeepDoc processing mode (e.g., 'pipeline', 'default')." }, "deepdoc_parallel_threads": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Deepdoc Parallel Threads", "description": "DeepDoc parallel threads (DEEPDOC_PARALLEL_THREADS)." }, "deepdoc_reserve_cpu": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Deepdoc Reserve Cpu", "description": "DeepDoc reserved CPU cores (DEEPDOC_RESERVE_CPU)." }, "deepdoc_limiter_capacity": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Deepdoc Limiter Capacity", "description": "DeepDoc CapacityLimiter capacity (DEEPDOC_LIMITER_CAPACITY)." }, "deepdoc_pipeline_monitor": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Deepdoc Pipeline Monitor", "description": "Enable DeepDoc pipeline monitor (DEEPDOC_PIPELINE_MONITOR)." }, "deepdoc_pipeline_s1_workers": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Deepdoc Pipeline S1 Workers", "description": "DeepDoc S1 worker count (DEEPDOC_PIPELINE_S1_WORKERS)." }, "deepdoc_gpu_sessions": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Deepdoc Gpu Sessions", "description": "DeepDoc GPU sessions count/preference (DEEPDOC_GPU_SESSIONS)." }, "embedding_base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Base Url", "description": "Override DashScope base URL for embedding requests." }, "embedding_api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Api Key", "description": "Override DashScope API key for embedding requests." }, "embedding_timeout_sec": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Embedding Timeout Sec", "description": "Override embedding request timeout (seconds)." }, "parse_method": { "$ref": "#/components/schemas/ParseMethod", "description": "Parse method used during parse_document step", "default": "default" }, "chunk_strategy": { "$ref": "#/components/schemas/ChunkStrategy", "description": "Chunk strategy passed to chunk_document", "default": "recursive" }, "chunk_method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Chunk Method", "description": "Custom chunk method identifier. If provided, takes precedence over chunk_strategy" }, "chunk_size": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Chunk Size", "description": "Chunk size passed to chunk_document; must be a positive integer. If None, semantic splitting is used without size limits.", "default": 1000 }, "chunk_overlap": { "type": "integer", "minimum": 0.0, "title": "Chunk Overlap", "description": "Chunk overlap passed to chunk_document; must be non-negative", "default": 200 }, "headers_to_split_on": { "anyOf": [ { "items": { "prefixItems": [ { "type": "string" }, { "type": "string" } ], "type": "array", "maxItems": 2, "minItems": 2 }, "type": "array" }, { "type": "null" } ], "title": "Headers To Split On", "description": "Markdown headers split rules for markdown strategy" }, "separators": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Separators", "description": "Custom separators for recursive/markdown strategies" }, "use_token_count": { "type": "boolean", "title": "Use Token Count", "description": "If True, chunk_size and chunk_overlap are in tokens (tiktoken); only applies to RECURSIVE strategy", "default": false }, "tiktoken_encoding": { "type": "string", "title": "Tiktoken Encoding", "description": "tiktoken encoding name when use_token_count=True (e.g. cl100k_base for GPT-4/3.5). Should align with config.DEFAULT_TIKTOKEN_ENCODING.", "default": "cl100k_base" }, "enable_protected_content": { "type": "boolean", "title": "Enable Protected Content", "description": "If True, do not split inside code blocks, formulas, tables (P1).", "default": true }, "protected_patterns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Protected Patterns", "description": "Optional regex patterns for protected regions; None uses config default." }, "table_context_size": { "type": "integer", "minimum": 0.0, "title": "Table Context Size", "description": "Chars from prev/next chunk to attach to table chunks; 0 = off (P2).", "default": 0 }, "image_context_size": { "type": "integer", "minimum": 0.0, "title": "Image Context Size", "description": "Chars from prev/next chunk to attach to image chunks; 0 = off (P2).", "default": 0 }, "embedding_model_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Model Id", "description": "Embedding model identifier registered in AgentOS model hub. If omitted, the pipeline attempts to auto-detect a single available embedding model." }, "collection_locked": { "type": "boolean", "title": "Collection Locked", "description": "Whether to lock collection configuration. When True, enforces strict config validation.", "default": false }, "allow_mixed_parse_methods": { "type": "boolean", "title": "Allow Mixed Parse Methods", "description": "Whether to allow mixed parse methods within the collection. When False, enforces type-based parse method consistency.", "default": false }, "skip_config_validation": { "type": "boolean", "title": "Skip Config Validation", "description": "Skip collection configuration validation. Use with caution.", "default": false }, "embedding_batch_size": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Embedding Batch Size", "description": "Batch size for embedding provider requests; must be positive", "default": 10 }, "embedding_concurrent": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Embedding Concurrent", "description": "Maximum concurrent requests for embedding computation when using async mode (for models that don't support batch processing, e.g., text-embedding-v4). Must be positive. Adjust based on machine configuration and API rate limits.", "default": 10 }, "embedding_use_async": { "type": "boolean", "title": "Embedding Use Async", "description": "Whether to use async concurrent processing for embeddings. Set to True for models that don't support batch processing (e.g., text-embedding-v4). When True, embeddings are processed concurrently using asyncio instead of batch API calls.", "default": false }, "max_retries": { "type": "integer", "minimum": 0.0, "title": "Max Retries", "description": "Maximum number of retries for embedding provider failures; must be non-negative", "default": 3 }, "retry_delay": { "type": "number", "minimum": 0.0, "title": "Retry Delay", "description": "Delay in seconds between embedding retries; must be non-negative", "default": 1.0 } }, "type": "object", "title": "IngestionConfig", "description": "Configuration values for the document ingestion pipeline." }, "IngestionResult": { "properties": { "status": { "type": "string", "title": "Status", "description": "Pipeline status: success|error|partial" }, "doc_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Doc Id", "description": "Document identifier produced by register_document" }, "parse_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parse Hash", "description": "Parse hash produced during parse_document step" }, "chunk_count": { "type": "integer", "minimum": 0.0, "title": "Chunk Count", "description": "Number of chunks created; must be non-negative", "default": 0 }, "embedding_count": { "type": "integer", "minimum": 0.0, "title": "Embedding Count", "description": "Number of embeddings generated; must be non-negative", "default": 0 }, "vector_count": { "type": "integer", "minimum": 0.0, "title": "Vector Count", "description": "Number of vectors written to storage; must be non-negative", "default": 0 }, "completed_steps": { "items": { "$ref": "#/components/schemas/IngestionStepResult" }, "type": "array", "title": "Completed Steps", "description": "List of successfully completed steps" }, "failed_step": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failed Step", "description": "Pipeline step where failure occurred, if any" }, "message": { "type": "string", "title": "Message", "description": "Human-readable summary of pipeline result" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "description": "Non-fatal warnings encountered" }, "file_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "File Id", "description": "Uploaded file ID for preview/download via /api/files (when ingest registers the file)" } }, "type": "object", "required": [ "status", "message" ], "title": "IngestionResult", "description": "Structured response for the document ingestion pipeline." }, "IngestionStepResult": { "properties": { "name": { "type": "string", "title": "Name", "description": "Step identifier" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "description": "Additional metadata captured for the step" } }, "type": "object", "required": [ "name" ], "title": "IngestionStepResult", "description": "Metadata for a successfully completed pipeline step." }, "LikeResponse": { "properties": { "liked": { "type": "boolean", "title": "Liked", "description": "Whether the template is liked" }, "likes": { "type": "integer", "title": "Likes", "description": "Total number of likes" } }, "type": "object", "required": [ "liked", "likes" ], "title": "LikeResponse", "description": "Like/unlike response" }, "ListCollectionsResult": { "properties": { "status": { "type": "string", "title": "Status", "description": "Operation status: success|error" }, "collections": { "items": { "$ref": "#/components/schemas/CollectionInfo" }, "type": "array", "title": "Collections", "description": "Collection statistics" }, "total_count": { "type": "integer", "title": "Total Count", "description": "Number of collections discovered" }, "message": { "type": "string", "title": "Message", "description": "Human-readable status message" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "description": "Non-fatal issues encountered during aggregation" } }, "type": "object", "required": [ "status", "total_count", "message" ], "title": "ListCollectionsResult", "description": "Response payload for the list collections operation." }, "LoginRequest": { "properties": { "username": { "type": "string", "title": "Username" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "username", "password" ], "title": "LoginRequest", "description": "Login request model" }, "MCPConnectionTest": { "properties": { "name": { "type": "string", "title": "Name", "description": "Connection name" }, "transport": { "type": "string", "title": "Transport", "description": "Transport type" }, "config": { "additionalProperties": true, "type": "object", "title": "Config", "description": "Connection configuration" } }, "type": "object", "required": [ "name", "transport", "config" ], "title": "MCPConnectionTest", "description": "Request model for testing MCP connection." }, "MCPConnectionTestResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "details": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Details" } }, "type": "object", "required": [ "success", "message" ], "title": "MCPConnectionTestResponse", "description": "Response model for MCP connection test." }, "MCPServerCreate": { "properties": { "name": { "type": "string", "maxLength": 100, "minLength": 1, "title": "Name", "description": "Server name" }, "transport": { "type": "string", "title": "Transport", "description": "Transport type (stdio, sse, websocket, streamable_http)" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "Server description" }, "config": { "additionalProperties": true, "type": "object", "title": "Config", "description": "Transport-specific configuration" }, "is_active": { "type": "boolean", "title": "Is Active", "description": "Whether the server is active", "default": true } }, "type": "object", "required": [ "name", "transport", "config" ], "title": "MCPServerCreate", "description": "Request model for creating MCP server." }, "MCPServerResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "user_id": { "type": "integer", "title": "User Id" }, "name": { "type": "string", "title": "Name" }, "transport": { "type": "string", "title": "Transport" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "config": { "additionalProperties": true, "type": "object", "title": "Config" }, "is_active": { "type": "boolean", "title": "Is Active" }, "is_default": { "type": "boolean", "title": "Is Default" }, "transport_display": { "type": "string", "title": "Transport Display" }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" }, "connected_account": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Connected Account" }, "app_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "App Id" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, "type": "object", "required": [ "id", "user_id", "name", "transport", "description", "config", "is_active", "is_default", "transport_display", "created_at", "updated_at" ], "title": "MCPServerResponse", "description": "Response model for MCP server." }, "MCPServerUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 100, "minLength": 1 }, { "type": "null" } ], "title": "Name", "description": "Server name" }, "transport": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Transport", "description": "Transport type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description", "description": "Server description" }, "config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config", "description": "Transport-specific configuration" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active", "description": "Whether the server is active" } }, "type": "object", "title": "MCPServerUpdate", "description": "Request model for updating MCP server." }, "MemoryListResponse": { "properties": { "memories": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Memories" }, "total_count": { "type": "integer", "title": "Total Count" }, "filters_used": { "additionalProperties": true, "type": "object", "title": "Filters Used" } }, "type": "object", "required": [ "memories", "total_count", "filters_used" ], "title": "MemoryListResponse" }, "MemoryStatsResponse": { "properties": { "total_count": { "type": "integer", "title": "Total Count" }, "category_counts": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Category Counts" }, "tag_counts": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Tag Counts" }, "memory_store_type": { "type": "string", "title": "Memory Store Type" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "total_count", "category_counts", "tag_counts", "memory_store_type" ], "title": "MemoryStatsResponse" }, "MemoryUpdateRequest": { "properties": { "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content", "description": "Updated memory content" }, "keywords": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Keywords", "description": "Updated memory keywords" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags", "description": "Updated memory tags" }, "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category", "description": "Updated memory category" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Updated memory metadata" } }, "type": "object", "title": "MemoryUpdateRequest" }, "ModelConnectionTestRequest": { "properties": { "model_provider": { "type": "string", "title": "Model Provider" }, "model_name": { "type": "string", "title": "Model Name" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "category": { "type": "string", "title": "Category", "default": "llm" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "dimension": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Dimension" }, "abilities": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Abilities" } }, "type": "object", "required": [ "model_provider", "model_name" ], "title": "ModelConnectionTestRequest", "description": "Request schema for testing an unsaved model connection" }, "ModelCreate": { "properties": { "model_id": { "type": "string", "title": "Model Id" }, "category": { "type": "string", "title": "Category", "default": "llm" }, "model_provider": { "type": "string", "title": "Model Provider" }, "model_name": { "type": "string", "title": "Model Name" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "dimension": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Dimension" }, "abilities": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Abilities" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "share_with_users": { "type": "boolean", "title": "Share With Users", "default": false }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" }, "voice": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Voice" }, "format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Format" }, "sample_rate": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sample Rate" } }, "type": "object", "required": [ "model_id", "model_provider", "model_name" ], "title": "ModelCreate", "description": "Model creation request schema" }, "ModelTestRequest": { "properties": { "model_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Model Ids" } }, "type": "object", "title": "ModelTestRequest", "description": "Model test request schema" }, "ModelTestResponse": { "properties": { "model_id": { "type": "string", "title": "Model Id" }, "status": { "type": "string", "title": "Status" }, "response_time": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Response Time" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "model_id", "status", "response_time", "message", "error" ], "title": "ModelTestResponse", "description": "Model test response schema" }, "ModelUpdate": { "properties": { "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" }, "model_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Provider" }, "model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Name" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "dimension": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Dimension" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "abilities": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Abilities" }, "share_with_users": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Share With Users" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" }, "voice": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Voice" }, "format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Format" }, "sample_rate": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sample Rate" } }, "type": "object", "title": "ModelUpdate", "description": "Model update request schema" }, "ModelWithAccessInfo": { "properties": { "id": { "type": "integer", "title": "Id" }, "model_id": { "type": "string", "title": "Model Id" }, "category": { "type": "string", "title": "Category" }, "model_provider": { "type": "string", "title": "Model Provider" }, "model_name": { "type": "string", "title": "Model Name" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "dimension": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Dimension" }, "abilities": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Abilities" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Updated At" }, "is_active": { "type": "boolean", "title": "Is Active" }, "is_owner": { "type": "boolean", "title": "Is Owner" }, "can_edit": { "type": "boolean", "title": "Can Edit" }, "can_delete": { "type": "boolean", "title": "Can Delete" }, "is_shared": { "type": "boolean", "title": "Is Shared" } }, "type": "object", "required": [ "id", "model_id", "category", "model_provider", "model_name", "base_url", "temperature", "dimension", "abilities", "description", "created_at", "updated_at", "is_active", "is_owner", "can_edit", "can_delete", "is_shared" ], "title": "ModelWithAccessInfo", "description": "Model response with user access information" }, "OAuthProviderCreate": { "properties": { "provider_name": { "type": "string", "title": "Provider Name" }, "name": { "type": "string", "title": "Name" }, "client_id": { "type": "string", "title": "Client Id" }, "client_secret": { "type": "string", "title": "Client Secret" }, "auth_url": { "type": "string", "title": "Auth Url" }, "token_url": { "type": "string", "title": "Token Url" }, "redirect_uri": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Redirect Uri" }, "userinfo_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Userinfo Url" }, "user_id_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id Path", "default": "id" }, "email_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email Path", "default": "email" }, "default_scopes": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Default Scopes" } }, "type": "object", "required": [ "provider_name", "name", "client_id", "client_secret", "auth_url", "token_url" ], "title": "OAuthProviderCreate" }, "OAuthProviderResponse": { "properties": { "provider_name": { "type": "string", "title": "Provider Name" }, "name": { "type": "string", "title": "Name" }, "client_id": { "type": "string", "title": "Client Id" }, "client_secret": { "type": "string", "title": "Client Secret" }, "auth_url": { "type": "string", "title": "Auth Url" }, "token_url": { "type": "string", "title": "Token Url" }, "redirect_uri": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Redirect Uri" }, "userinfo_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Userinfo Url" }, "user_id_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id Path", "default": "id" }, "email_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email Path", "default": "email" }, "default_scopes": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Default Scopes" }, "id": { "type": "integer", "title": "Id" } }, "type": "object", "required": [ "provider_name", "name", "client_id", "client_secret", "auth_url", "token_url", "id" ], "title": "OAuthProviderResponse" }, "OAuthProviderUpdate": { "properties": { "provider_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider Name" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "client_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Client Id" }, "client_secret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Client Secret" }, "auth_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Auth Url" }, "token_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Token Url" }, "redirect_uri": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Redirect Uri" }, "userinfo_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Userinfo Url" }, "user_id_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id Path" }, "email_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email Path" }, "default_scopes": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Default Scopes" } }, "type": "object", "title": "OAuthProviderUpdate" }, "OptimizeInstructionsRequest": { "properties": { "instructions": { "type": "string", "title": "Instructions", "description": "Draft instructions to optimize" }, "model_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Model Id", "description": "Model ID to use for optimization" } }, "type": "object", "required": [ "instructions" ], "title": "OptimizeInstructionsRequest", "description": "Request model for optimizing agent instructions." }, "ParseMethod": { "type": "string", "enum": [ "default", "pypdf", "pdfplumber", "unstructured", "pymupdf", "deepdoc" ], "title": "ParseMethod", "description": "Available parsing methods" }, "ParseResultResponse": { "properties": { "doc_id": { "type": "string", "title": "Doc Id", "description": "The document ID" }, "parse_hash": { "type": "string", "title": "Parse Hash", "description": "SHA256 hash of parse configuration" }, "elements": { "items": { "oneOf": [ { "$ref": "#/components/schemas/ParsedTextSegmentDisplay" }, { "$ref": "#/components/schemas/ParsedTableDisplay" }, { "$ref": "#/components/schemas/ParsedFigureDisplay" } ], "discriminator": { "propertyName": "type", "mapping": { "figure": "#/components/schemas/ParsedFigureDisplay", "table": "#/components/schemas/ParsedTableDisplay", "text": "#/components/schemas/ParsedTextSegmentDisplay" } } }, "type": "array", "title": "Elements", "description": "Ordered list of parsed elements" }, "pagination": { "additionalProperties": true, "type": "object", "title": "Pagination", "description": "Pagination information including page, page_size, total counts" } }, "type": "object", "required": [ "doc_id", "parse_hash", "pagination" ], "title": "ParseResultResponse", "description": "Response model for displaying parse results with pagination." }, "ParsedFigureDisplay": { "properties": { "type": { "type": "string", "const": "figure", "title": "Type", "default": "figure" }, "text": { "type": "string", "title": "Text", "description": "Caption or text associated with the figure" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "description": "Metadata including positions, image_path, etc." } }, "type": "object", "required": [ "text" ], "title": "ParsedFigureDisplay", "description": "Display model for a parsed figure." }, "ParsedTableDisplay": { "properties": { "type": { "type": "string", "const": "table", "title": "Type", "default": "table" }, "html": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Html", "description": "HTML representation of the table" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "description": "Metadata including positions, caption, etc." } }, "type": "object", "title": "ParsedTableDisplay", "description": "Display model for a parsed table." }, "ParsedTextSegmentDisplay": { "properties": { "type": { "type": "string", "const": "text", "title": "Type", "default": "text" }, "text": { "type": "string", "title": "Text", "description": "The text content of the segment" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "description": "Metadata including positions, style, etc." } }, "type": "object", "required": [ "text" ], "title": "ParsedTextSegmentDisplay", "description": "Display model for a parsed text segment." }, "PredictionPoint": { "properties": { "period": { "type": "string", "title": "Period" }, "predictedValue": { "type": "number", "title": "Predictedvalue" }, "confidenceLower": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidencelower" }, "confidenceUpper": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidenceupper" } }, "type": "object", "required": [ "period", "predictedValue" ], "title": "PredictionPoint", "description": "Single prediction data point" }, "PredictionRequest": { "properties": { "chartType": { "type": "string", "title": "Charttype", "description": "Chart type: bar, pie, line" }, "data": { "$ref": "#/components/schemas/ChartData", "description": "Chart data" }, "mapping": { "anyOf": [ { "$ref": "#/components/schemas/DataMapping" }, { "type": "null" } ], "description": "Data mapping for axes" }, "predictPeriods": { "type": "integer", "title": "Predictperiods", "description": "Number of periods to predict", "default": 5 } }, "type": "object", "required": [ "chartType", "data" ], "title": "PredictionRequest", "description": "Request schema for data prediction" }, "PredictionResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "predictedData": { "items": { "$ref": "#/components/schemas/PredictionPoint" }, "type": "array", "title": "Predicteddata" }, "chartType": { "type": "string", "title": "Charttype" }, "confidence": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Confidence" }, "trendAnalysis": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trendanalysis" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "success", "predictedData", "chartType" ], "title": "PredictionResponse", "description": "Response schema for data prediction" }, "PublicMCPAppCreate": { "properties": { "app_id": { "type": "string", "title": "App Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon" }, "transport": { "type": "string", "title": "Transport", "default": "oauth" }, "provider_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider Name" }, "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" }, "oauth_scopes": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Oauth Scopes" }, "launch_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Launch Config" } }, "type": "object", "required": [ "app_id", "name" ], "title": "PublicMCPAppCreate" }, "PublicMCPAppResponse": { "properties": { "app_id": { "type": "string", "title": "App Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Icon" }, "transport": { "type": "string", "title": "Transport", "default": "oauth" }, "provider_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider Name" }, "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" }, "oauth_scopes": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Oauth Scopes" }, "launch_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Launch Config" }, "id": { "type": "integer", "title": "Id" } }, "type": "object", "required": [ "app_id", "name", "id" ], "title": "PublicMCPAppResponse" }, "PublishResponse": { "properties": { "message": { "type": "string", "title": "Message" }, "agent": { "$ref": "#/components/schemas/AgentResponse" } }, "type": "object", "required": [ "message", "agent" ], "title": "PublishResponse", "description": "Response model for publish/unpublish operations." }, "RecallRequest": { "properties": { "task": { "type": "string", "title": "Task", "description": "User task description" }, "llm_id": { "type": "string", "title": "Llm Id", "description": "LLM ID to use for selection" } }, "type": "object", "required": [ "task", "llm_id" ], "title": "RecallRequest", "description": "Skill recall request" }, "RecallResponse": { "properties": { "skill": { "anyOf": [ { "$ref": "#/components/schemas/SkillDetail" }, { "type": "null" } ], "description": "Selected skill or null" }, "reasoning": { "type": "string", "title": "Reasoning", "description": "Reasoning for selection" } }, "type": "object", "required": [ "reasoning" ], "title": "RecallResponse", "description": "Skill recall response" }, "RefreshTokenRequest": { "properties": { "refresh_token": { "type": "string", "title": "Refresh Token" } }, "type": "object", "required": [ "refresh_token" ], "title": "RefreshTokenRequest", "description": "Refresh token request model" }, "RefreshTokenResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "access_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Access Token" }, "refresh_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Refresh Token" }, "expires_in": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Expires In" }, "refresh_expires_in": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Refresh Expires In" } }, "type": "object", "required": [ "success", "message" ], "title": "RefreshTokenResponse", "description": "Refresh token response model" }, "RegisterRequest": { "properties": { "username": { "type": "string", "title": "Username" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "username", "password" ], "title": "RegisterRequest", "description": "User registration request model" }, "RegisterResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "message": { "type": "string", "title": "Message" }, "user": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "User" } }, "type": "object", "required": [ "success", "message" ], "title": "RegisterResponse", "description": "User registration response model" }, "RegisterSwitchRequest": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "enabled" ], "title": "RegisterSwitchRequest" }, "RegisterSwitchResponse": { "properties": { "success": { "type": "boolean", "title": "Success" }, "registration_enabled": { "type": "boolean", "title": "Registration Enabled" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "success", "registration_enabled", "message" ], "title": "RegisterSwitchResponse" }, "ReloadResponse": { "properties": { "message": { "type": "string", "title": "Message", "description": "Status message" }, "count": { "type": "integer", "title": "Count", "description": "Number of skills loaded" } }, "type": "object", "required": [ "message", "count" ], "title": "ReloadResponse", "description": "Skills reload response" }, "SearchPipelineResult": { "properties": { "status": { "type": "string", "title": "Status", "description": "Pipeline status: success|partial_success|error" }, "search_type": { "$ref": "#/components/schemas/SearchType", "description": "Actual search strategy executed (post-fallback if any)" }, "results": { "items": { "$ref": "#/components/schemas/SearchResult" }, "type": "array", "title": "Results", "description": "Search results (possibly reranked)" }, "result_count": { "type": "integer", "title": "Result Count", "description": "Number of results returned" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "description": "Non-fatal warnings and fallback messages" }, "message": { "type": "string", "title": "Message", "description": "Human-readable pipeline outcome message" }, "used_rerank": { "type": "boolean", "title": "Used Rerank", "description": "Whether rerank model was applied to the results", "default": false } }, "type": "object", "required": [ "status", "search_type", "result_count", "message" ], "title": "SearchPipelineResult", "description": "Unified response payload for document search pipeline." }, "SearchResult": { "properties": { "doc_id": { "type": "string", "title": "Doc Id", "description": "Document ID" }, "chunk_id": { "type": "string", "title": "Chunk Id", "description": "Chunk ID within the document" }, "text": { "type": "string", "title": "Text", "description": "Text content of the chunk" }, "score": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Score", "description": "Similarity score (0-1, higher is better); must be between 0 and 1 inclusive" }, "parse_hash": { "type": "string", "title": "Parse Hash", "description": "Parse version hash" }, "model_tag": { "type": "string", "title": "Model Tag", "description": "Embedding model identifier" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "Chunk creation timestamp" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata", "description": "Additional metadata for the chunk (page_number, section, source, etc.)" }, "vector_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Vector Score", "description": "Original vector search score (before rerank/fusion)" }, "fts_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Fts Score", "description": "Original FTS search score (before rerank/fusion)" }, "vector_rank": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Vector Rank", "description": "Original rank in vector search results (1-based)" }, "fts_rank": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Fts Rank", "description": "Original rank in FTS search results (1-based)" } }, "type": "object", "required": [ "doc_id", "chunk_id", "text", "score", "parse_hash", "model_tag" ], "title": "SearchResult", "description": "Individual search result item." }, "SearchType": { "type": "string", "enum": [ "dense", "sparse", "hybrid" ], "title": "SearchType", "description": "Unified search types for the document search pipeline." }, "SetupStatusResponse": { "properties": { "initialized": { "type": "boolean", "title": "Initialized" }, "needs_setup": { "type": "boolean", "title": "Needs Setup" }, "registration_enabled": { "type": "boolean", "title": "Registration Enabled" } }, "type": "object", "required": [ "initialized", "needs_setup", "registration_enabled" ], "title": "SetupStatusResponse" }, "SkillDetail": { "properties": { "name": { "type": "string", "title": "Name", "description": "Skill name" }, "description": { "type": "string", "title": "Description", "description": "Skill description" }, "when_to_use": { "type": "string", "title": "When To Use", "description": "When to use this skill" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "description": "Skill tags" }, "content": { "type": "string", "title": "Content", "description": "Complete SKILL.md content" }, "execution_flow": { "type": "string", "title": "Execution Flow", "description": "Execution flow" }, "files": { "items": { "type": "string" }, "type": "array", "title": "Files", "description": "Files in skill directory" }, "path": { "type": "string", "title": "Path", "description": "Skill directory path" } }, "type": "object", "required": [ "name", "description", "when_to_use", "content", "execution_flow", "path" ], "title": "SkillDetail", "description": "Skill complete information" }, "SkillInfo": { "properties": { "name": { "type": "string", "title": "Name", "description": "Skill name" }, "description": { "type": "string", "title": "Description", "description": "Skill description" }, "when_to_use": { "type": "string", "title": "When To Use", "description": "When to use this skill" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "description": "Skill tags" } }, "type": "object", "required": [ "name", "description", "when_to_use" ], "title": "SkillInfo", "description": "Skill brief information" }, "SqlConnectionUpsertRequest": { "properties": { "connection_url": { "type": "string", "title": "Connection Url" } }, "type": "object", "required": [ "connection_url" ], "title": "SqlConnectionUpsertRequest" }, "TaskCreateRequest": { "properties": { "title": { "type": "string", "title": "Title" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "agent_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Agent Id" }, "files": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Files" }, "llm_ids": { "anyOf": [ { "items": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "array" }, { "type": "null" } ], "title": "Llm Ids" }, "memory_similarity_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Memory Similarity Threshold", "default": 1.5 }, "agent_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Type", "default": "standard" }, "agent_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Agent Config" }, "execution_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Mode" }, "process_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Process Description" }, "examples": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ExampleItem" }, "type": "array" }, { "type": "null" } ], "title": "Examples" } }, "type": "object", "required": [ "title" ], "title": "TaskCreateRequest", "description": "Create task request" }, "TaskCreateResponse": { "properties": { "task_id": { "type": "integer", "title": "Task Id" }, "title": { "type": "string", "title": "Title" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "string", "title": "Created At" }, "model_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Id" }, "small_fast_model_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Small Fast Model Id" }, "visual_model_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Visual Model Id" }, "compact_model_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Compact Model Id" }, "model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Name" }, "small_fast_model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Small Fast Model Name" }, "visual_model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Visual Model Name" }, "compact_model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Compact Model Name" }, "execution_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Mode" }, "channel_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Channel Id" }, "channel_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel Name" } }, "type": "object", "required": [ "task_id", "title", "status", "created_at" ], "title": "TaskCreateResponse", "description": "Create task response" }, "TemplateDetail": { "properties": { "id": { "type": "string", "title": "Id", "description": "Template unique identifier" }, "name": { "type": "string", "title": "Name", "description": "Template name" }, "category": { "type": "string", "title": "Category", "description": "Template category" }, "featured": { "type": "boolean", "title": "Featured", "description": "Whether the template is featured", "default": false }, "description": { "type": "string", "title": "Description", "description": "Template description" }, "features": { "items": { "type": "string" }, "type": "array", "title": "Features", "description": "Template features" }, "connections": { "items": { "$ref": "#/components/schemas/ConnectionInfo" }, "type": "array", "title": "Connections", "description": "App connections" }, "setup_time": { "type": "string", "title": "Setup Time", "description": "Setup time", "default": "5 min setup" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "description": "Template tags" }, "author": { "type": "string", "title": "Author", "description": "Template author" }, "version": { "type": "string", "title": "Version", "description": "Template version" }, "views": { "type": "integer", "title": "Views", "description": "Number of views", "default": 0 }, "likes": { "type": "integer", "title": "Likes", "description": "Number of likes", "default": 0 }, "used_count": { "type": "integer", "title": "Used Count", "description": "Number of times used", "default": 0 }, "agent_config": { "additionalProperties": true, "type": "object", "title": "Agent Config", "description": "Agent configuration" } }, "type": "object", "required": [ "id", "name", "category", "description", "author", "version", "agent_config" ], "title": "TemplateDetail", "description": "Detailed template response including agent configuration" }, "TemplateInfo": { "properties": { "id": { "type": "string", "title": "Id", "description": "Template unique identifier" }, "name": { "type": "string", "title": "Name", "description": "Template name" }, "category": { "type": "string", "title": "Category", "description": "Template category" }, "featured": { "type": "boolean", "title": "Featured", "description": "Whether the template is featured", "default": false }, "description": { "type": "string", "title": "Description", "description": "Template description" }, "features": { "items": { "type": "string" }, "type": "array", "title": "Features", "description": "Template features" }, "connections": { "items": { "$ref": "#/components/schemas/ConnectionInfo" }, "type": "array", "title": "Connections", "description": "App connections" }, "setup_time": { "type": "string", "title": "Setup Time", "description": "Setup time", "default": "5 min setup" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "description": "Template tags" }, "author": { "type": "string", "title": "Author", "description": "Template author" }, "version": { "type": "string", "title": "Version", "description": "Template version" }, "views": { "type": "integer", "title": "Views", "description": "Number of views", "default": 0 }, "likes": { "type": "integer", "title": "Likes", "description": "Number of likes", "default": 0 }, "used_count": { "type": "integer", "title": "Used Count", "description": "Number of times used", "default": 0 } }, "type": "object", "required": [ "id", "name", "category", "description", "author", "version" ], "title": "TemplateInfo", "description": "Template brief information" }, "ToolCredentialUpdateRequest": { "properties": { "credentials": { "additionalProperties": { "$ref": "#/components/schemas/CredentialFieldUpdate" }, "type": "object", "title": "Credentials" } }, "type": "object", "required": [ "credentials" ], "title": "ToolCredentialUpdateRequest" }, "ToolEnableUpdateRequest": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "enabled" ], "title": "ToolEnableUpdateRequest" }, "UserChannelCreate": { "properties": { "channel_type": { "type": "string", "title": "Channel Type", "description": "e.g. telegram, feishu" }, "channel_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel Name", "description": "User-friendly name" }, "config": { "additionalProperties": true, "type": "object", "title": "Config", "description": "Channel specific configuration" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true } }, "type": "object", "required": [ "channel_type", "config" ], "title": "UserChannelCreate" }, "UserChannelResponse": { "properties": { "channel_type": { "type": "string", "title": "Channel Type", "description": "e.g. telegram, feishu" }, "channel_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel Name", "description": "User-friendly name" }, "config": { "additionalProperties": true, "type": "object", "title": "Config", "description": "Channel specific configuration" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true }, "id": { "type": "integer", "title": "Id" }, "user_id": { "type": "integer", "title": "User Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "channel_type", "config", "id", "user_id", "created_at" ], "title": "UserChannelResponse" }, "UserChannelUpdate": { "properties": { "channel_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel Name" }, "config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "type": "object", "title": "UserChannelUpdate" }, "UserDefaultModelCreate": { "properties": { "model_id": { "type": "integer", "title": "Model Id" }, "config_type": { "type": "string", "title": "Config Type" } }, "type": "object", "required": [ "model_id", "config_type" ], "title": "UserDefaultModelCreate", "description": "User default model configuration creation schema" }, "UserDefaultModelResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "user_id": { "type": "integer", "title": "User Id" }, "model_id": { "type": "integer", "title": "Model Id" }, "config_type": { "type": "string", "title": "Config Type" }, "created_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "id", "user_id", "model_id", "config_type", "created_at", "updated_at" ], "title": "UserDefaultModelResponse", "description": "User default model configuration response schema" }, "UserListResponse": { "properties": { "users": { "items": { "$ref": "#/components/schemas/UserResponse" }, "type": "array", "title": "Users" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "size": { "type": "integer", "title": "Size" }, "pages": { "type": "integer", "title": "Pages" } }, "type": "object", "required": [ "users", "total", "page", "size", "pages" ], "title": "UserListResponse" }, "UserResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "username": { "type": "string", "title": "Username" }, "is_admin": { "type": "boolean", "title": "Is Admin" }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" } }, "type": "object", "required": [ "id", "username", "is_admin", "created_at", "updated_at" ], "title": "UserResponse" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WebIngestionResult": { "properties": { "status": { "type": "string", "title": "Status", "description": "Overall status: success|error|partial" }, "collection": { "type": "string", "title": "Collection", "description": "Target collection name" }, "total_urls_found": { "type": "integer", "minimum": 0.0, "title": "Total Urls Found", "description": "Total number of unique URLs discovered" }, "pages_crawled": { "type": "integer", "minimum": 0.0, "title": "Pages Crawled", "description": "Number of successfully crawled pages" }, "pages_failed": { "type": "integer", "minimum": 0.0, "title": "Pages Failed", "description": "Number of pages that failed to crawl" }, "documents_created": { "type": "integer", "minimum": 0.0, "title": "Documents Created", "description": "Number of documents created in collection" }, "chunks_created": { "type": "integer", "minimum": 0.0, "title": "Chunks Created", "description": "Total number of chunks created" }, "embeddings_created": { "type": "integer", "minimum": 0.0, "title": "Embeddings Created", "description": "Total number of embeddings generated" }, "crawled_urls": { "items": { "type": "string" }, "type": "array", "title": "Crawled Urls", "description": "List of successfully crawled URLs" }, "failed_urls": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Failed Urls", "description": "Map of failed URLs to error messages" }, "message": { "type": "string", "title": "Message", "description": "Human-readable summary message" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings", "description": "Non-critical warnings" }, "elapsed_time_ms": { "type": "integer", "minimum": 0.0, "title": "Elapsed Time Ms", "description": "Total elapsed time in milliseconds" } }, "type": "object", "required": [ "status", "collection", "total_urls_found", "pages_crawled", "pages_failed", "documents_created", "chunks_created", "embeddings_created", "message", "elapsed_time_ms" ], "title": "WebIngestionResult", "description": "Result of website crawling and knowledge base ingestion.\n\nThis model provides comprehensive statistics about the crawling and\ningestion process, including success/failure counts and timing." }, "WidgetAuthRequest": { "properties": { "guest_id": { "type": "string", "title": "Guest Id" }, "agent_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Agent Id" } }, "type": "object", "required": [ "guest_id" ], "title": "WidgetAuthRequest" }, "WidgetAuthResponse": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "token_type": { "type": "string", "title": "Token Type", "default": "bearer" }, "agent_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Agent Id" }, "agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Name" }, "agent_logo": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Logo" } }, "type": "object", "required": [ "access_token" ], "title": "WidgetAuthResponse" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } }