From 6cffc8ee76ca31af118d2be7472e610ed47d4197 Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Wed, 4 Mar 2026 16:48:35 +0530 Subject: [PATCH 01/13] feat: add AI Agents OpenAPI spec with BYO and Agent Builder API sections --- ai-agent-service.json | 5048 +++++++++++++++++++++++++++++++++++++++++ docs.json | 133 ++ 2 files changed, 5181 insertions(+) create mode 100644 ai-agent-service.json diff --git a/ai-agent-service.json b/ai-agent-service.json new file mode 100644 index 00000000..91e275ee --- /dev/null +++ b/ai-agent-service.json @@ -0,0 +1,5048 @@ +{ + "openapi": "3.0.0", + "paths": { + "/ai-agents/agents": { + "post": { + "operationId": "AgentsController_createAgent", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentDTO" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agents" + ] + }, + "get": { + "operationId": "AgentsController_getAgents", + "parameters": [], + "responses": { + "200": { + "description": "List of agents", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetAgentDetailDto" + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agents" + ] + } + }, + "/ai-agents/agents/{id}": { + "patch": { + "operationId": "AgentsController_updateAgent", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAgentDTO" + } + } + } + }, + "responses": { + "200": { + "description": "Agent updated successfully" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agents" + ] + }, + "delete": { + "operationId": "AgentsController_deleteAgent", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Agent deleted successfully" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agents" + ] + } + }, + "/ai-agents/tools": { + "post": { + "operationId": "ToolsController_createTool", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ] + }, + "get": { + "operationId": "ToolsController_getAllTools", + "parameters": [ + { + "name": "type", + "required": false, + "in": "query", + "description": "Filter tools by type", + "schema": { + "enum": [ + "action", + "tool" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ] + } + }, + "/ai-agents/tools/{name}": { + "get": { + "operationId": "ToolsController_getToolByName", + "parameters": [ + { + "name": "name", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ] + }, + "put": { + "operationId": "ToolsController_updateTool", + "parameters": [ + { + "name": "name", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ] + }, + "delete": { + "operationId": "ToolsController_deleteTool", + "parameters": [ + { + "name": "name", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ] + } + }, + "/ai-agents/integrations": { + "post": { + "operationId": "IntegrationsController_createIntegration", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Integrations" + ] + }, + "get": { + "operationId": "IntegrationsController_getIntegrations", + "parameters": [ + { + "name": "type", + "required": false, + "in": "query", + "description": "Optional integration type", + "schema": { + "type": "string" + } + }, + { + "name": "isActive", + "required": false, + "in": "query", + "description": "Optional active status", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Integrations" + ] + } + }, + "/ai-agents/agent-builder/agents/available-models": { + "get": { + "operationId": "AgentBuilderController_getAvailableModels", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get available models", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/variables/all": { + "get": { + "operationId": "AgentBuilderController_getAvailableVariables", + "parameters": [ + { + "name": "groupByCategory", + "required": false, + "in": "query", + "description": "Group variables by category", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all available variables for an app", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentId}/tools/search": { + "get": { + "operationId": "AgentBuilderController_searchAllTools", + "parameters": [ + { + "name": "agentId", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + }, + { + "name": "key", + "required": false, + "in": "query", + "description": "Search term to filter actions by name, description, or slug", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": false, + "in": "query", + "description": "Filter by specific integration slug", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Search across ready to use tool actions, api tools and mcp for an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/enabled-items": { + "get": { + "operationId": "AgentBuilderController_getEnabledItems", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + }, + { + "name": "tools", + "required": false, + "in": "query", + "description": "Include enabled tools (default: true)", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "name": "frontendActions", + "required": false, + "in": "query", + "description": "Include enabled frontend actions (default: true)", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "name": "apiTools", + "required": false, + "in": "query", + "description": "Include enabled API tools (default: true)", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "name": "mcpServers", + "required": false, + "in": "query", + "description": "Include enabled MCP servers (default: true)", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "name": "key", + "required": false, + "in": "query", + "description": "Search term to filter by name/description", + "schema": { + "type": "string" + } + }, + { + "name": "_", + "required": false, + "in": "query", + "description": "Cache-busting timestamp (ignored by server)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get enabled items (tools, frontend actions, API tools, MCP servers) for an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents": { + "post": { + "operationId": "AgentBuilderController_create", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCometChatAgentDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create a new agent", + "tags": [ + "Agent Builder" + ] + }, + "get": { + "operationId": "AgentBuilderController_findAll", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "Search term to filter agents by name, description, or other fields", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all agents for an app", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{id}": { + "get": { + "operationId": "AgentBuilderController_findOne", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get an agent by UID", + "tags": [ + "Agent Builder" + ] + }, + "patch": { + "operationId": "AgentBuilderController_update", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCometChatAgentDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update an agent by UID", + "tags": [ + "Agent Builder" + ] + }, + "delete": { + "operationId": "AgentBuilderController_remove", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete an agent by UID", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/add": { + "patch": { + "operationId": "AgentBuilderController_addToolsToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add tools to an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/remove": { + "patch": { + "operationId": "AgentBuilderController_removeToolsFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove tools from an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/mcp/add": { + "patch": { + "operationId": "AgentBuilderController_addMcpServersToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentMcpDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add MCP servers to an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/mcp/remove": { + "patch": { + "operationId": "AgentBuilderController_removeMcpServersFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentMcpDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove MCP servers from an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/api-tools/add": { + "patch": { + "operationId": "AgentBuilderController_addApiToolsToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentApiToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add API tools to an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/api-tools/remove": { + "patch": { + "operationId": "AgentBuilderController_removeApiToolsFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentApiToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove API tools from an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/add": { + "patch": { + "operationId": "AgentBuilderController_addFrontendActionsToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add frontend actions to an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/remove": { + "patch": { + "operationId": "AgentBuilderController_removeFrontendActionsFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove frontend actions from an agent", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/add": { + "patch": { + "operationId": "AgentBuilderController_addFilesToKnowledgeBase", + "parameters": [ + { + "name": "agentId", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + }, + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" + } + } + } + }, + "responses": { + "200": { + "description": "Files added to knowledge base successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add files to agent knowledge base", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/remove": { + "patch": { + "operationId": "AgentBuilderController_removeFilesFromKnowledgeBase", + "parameters": [ + { + "name": "agentId", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + }, + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" + } + } + } + }, + "responses": { + "200": { + "description": "Files removed from knowledge base successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove files from agent knowledge base", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/add": { + "patch": { + "operationId": "AgentBuilderController_addActionsToTool", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Tool slug (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Actions added successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Enable actions for a tool", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/remove": { + "patch": { + "operationId": "AgentBuilderController_removeActionsFromTool", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Tool slug (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Actions removed successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove actions for a tool", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/variables/custom": { + "get": { + "operationId": "AgentBuilderController_getAllCustomVariables", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all custom variables for the app", + "tags": [ + "Agent Builder" + ] + }, + "post": { + "operationId": "AgentBuilderController_createCustomVariable", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCustomVariableDto" + } + } + } + }, + "responses": { + "201": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create a new custom variable", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/variables/custom/{variableId}": { + "patch": { + "operationId": "AgentBuilderController_updateCustomVariable", + "parameters": [ + { + "name": "variableId", + "required": true, + "in": "path", + "description": "Variable ID to update", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCustomVariableDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update a custom variable", + "tags": [ + "Agent Builder" + ] + }, + "delete": { + "operationId": "AgentBuilderController_deleteCustomVariable", + "parameters": [ + { + "name": "variableId", + "required": true, + "in": "path", + "description": "Variable ID to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete a custom variable", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/api-tools": { + "get": { + "operationId": "ApiToolsController_getAllApiTools", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all api-tools for an app", + "tags": [ + "Agent Builder API Tools" + ] + }, + "post": { + "operationId": "ApiToolsController_createApiTool", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ] + } + }, + "/ai-agents/agent-builder/api-tools/{slug}": { + "get": { + "operationId": "ApiToolsController_getApiToolBySlug", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ] + }, + "patch": { + "operationId": "ApiToolsController_updateApiTool", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateApiToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ] + }, + "delete": { + "operationId": "ApiToolsController_deleteApiTool", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ] + } + }, + "/ai-agents/agent-builder/mcp-servers": { + "post": { + "operationId": "McpServersController_createMcpServer", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMcpServerDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ] + }, + "get": { + "operationId": "McpServersController_getAllMcpServers", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ] + } + }, + "/ai-agents/agent-builder/mcp-servers/{slug}": { + "get": { + "operationId": "McpServersController_getMcpServerBySlug", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ] + }, + "patch": { + "operationId": "McpServersController_updateMcpServer", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMcpServerDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ] + }, + "delete": { + "operationId": "McpServersController_deleteMcpServer", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ] + } + }, + "/ai-agents/agent-builder/tools/agent/{agentUid}": { + "get": { + "operationId": "ComposioController_getAvailableIntegration", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": false, + "in": "query", + "description": "Optional slug to filter integration (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "Search term for tool name or slug", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Available Composio tools retrieved successfully from integrations" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get Ready To Use Tools", + "tags": [ + "Agent Builder Ready to Use Tools" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions": { + "get": { + "operationId": "ComposioController_getAvailableComposioToolsForAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Get actions available within a tool (e.g., send-email, draft-email)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Available Composio tools retrieved successfully from integrations" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get actions available within a tool for agent", + "tags": [ + "Agent Builder Ready to Use Tools" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/authenticate": { + "post": { + "operationId": "ComposioController_authenticateTool", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Tool slug to authenticate (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticateToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "OAuth authentication initiated successfully with redirect URL" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Authenticate a Composio tool with OAuth", + "tags": [ + "Agent Builder Ready to Use Tools" + ] + } + }, + "/ai-agents/agent-builder/frontend-actions": { + "get": { + "operationId": "FrontendActionsController_getAllFrontendActions", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all frontend actions for an app", + "tags": [ + "Agent Builder Frontend Actions" + ] + }, + "post": { + "operationId": "FrontendActionsController_createFrontendAction", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFrontendActionDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create a frontend action", + "tags": [ + "Agent Builder Frontend Actions" + ] + } + }, + "/ai-agents/agent-builder/frontend-actions/{id}": { + "get": { + "operationId": "FrontendActionsController_getFrontendActionById", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get a frontend action by id", + "tags": [ + "Agent Builder Frontend Actions" + ] + }, + "patch": { + "operationId": "FrontendActionsController_updateFrontendAction", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFrontendActionDto" + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update a frontend action", + "tags": [ + "Agent Builder Frontend Actions" + ] + }, + "delete": { + "operationId": "FrontendActionsController_deleteFrontendAction", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete a frontend action", + "tags": [ + "Agent Builder Frontend Actions" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/uploads/initiate": { + "post": { + "description": "Generate presigned URLs and create upload records for multiple files", + "operationId": "RagController_initiateUpload", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InitiateUploadDto" + }, + "examples": { + "example1": { + "summary": "Upload multiple files", + "value": { + "files": [ + { + "fileName": "document.pdf", + "mimeType": "application/pdf", + "fileSize": 1024000 + }, + { + "fileName": "document_2.pdf", + "mimeType": "application/pdf", + "fileSize": 512000 + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Initiate file uploads", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/text": { + "post": { + "description": "Accepts title and text content, converts to .md file, uploads to S3, and adds to knowledge base", + "operationId": "RagController_createTextDetail", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTextDetailDto" + }, + "examples": { + "example1": { + "summary": "Create a text detail", + "value": { + "title": "Company Policy Document", + "text": "This document outlines the company policies and procedures for remote work, including communication guidelines, working hours expectations, and performance metrics." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create text detail and upload to knowledge base", + "tags": [ + "knowledge-base" + ] + }, + "get": { + "description": "Retrieves all text details records for a given app. Requires the appId header.", + "operationId": "RagController_getTextDetails", + "parameters": [], + "responses": { + "200": { + "description": "Text details retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all text details for an app", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/text/{uniqueId}": { + "get": { + "description": "Retrieves a specific text detail record by its uniqueId. Requires the appId header.", + "operationId": "RagController_getTextDetailById", + "parameters": [ + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique text detail ID", + "schema": { + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Text detail retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "text": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "s3Key": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vectorizationStatus": { + "type": "string" + }, + "createdAt": { + "type": "number" + }, + "updatedAt": { + "type": "number" + }, + "isActive": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get a specific text detail by uniqueId", + "tags": [ + "knowledge-base" + ] + }, + "patch": { + "description": "Updates a specific text detail record by its uniqueId. Updates S3 content and resets status to indexing. Requires the appId header.", + "operationId": "RagController_updateTextDetail", + "parameters": [ + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique text detail ID", + "schema": { + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTextDetailDto" + }, + "examples": { + "example1": { + "summary": "Update text detail", + "value": { + "title": "Updated Company Policy Document", + "text": "This is the updated document content with new policies and procedures..." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Text detail updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "s3Key": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vectorizationStatus": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update a specific text detail by uniqueId", + "tags": [ + "knowledge-base" + ] + }, + "delete": { + "description": "Removes text detail record, deletes upload record, vector data, and S3 file", + "operationId": "RagController_deleteTextDetail", + "parameters": [ + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique text detail ID to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete text detail and all associated data", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base": { + "get": { + "description": "Retrieve knowledge base records for an app using efficient cursor-based pagination. Records are returned in descending order (newest first). Supports bidirectional navigation using cursor and affix parameters.", + "operationId": "RagController_getKnowledgeBase", + "parameters": [ + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor (paginationKey from previous response meta). Used to fetch records relative to a specific position.", + "schema": { + "example": "1732492800000.12345", + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "Number of records per page (default: 10, maximum: 100)", + "schema": { + "example": 20, + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "description": "Navigation direction: \"append\" for next/older records, \"prepend\" for previous/newer records", + "schema": { + "enum": [ + "append", + "prepend" + ], + "type": "string" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "endTime", + "required": false, + "in": "query", + "description": "End timestamp (Unix timestamp in milliseconds) to filter records created before this time", + "schema": { + "example": 1732579200000, + "type": "number" + } + }, + { + "name": "startTime", + "required": false, + "in": "query", + "description": "Start timestamp (Unix timestamp in milliseconds) to filter records created after this time", + "schema": { + "example": 1732492800000, + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Knowledge base records retrieved successfully with pagination metadata", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Array of knowledge base records (excludes _id, __v, paginationKey)", + "items": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string", + "description": "Unique identifier for the record" + }, + "appId": { + "type": "string", + "description": "Application ID" + }, + "sourceName": { + "type": "string", + "description": "Name of the source file or text detail" + }, + "type": { + "type": "string", + "description": "Type of source (uploads, text-details)" + }, + "status": { + "type": "string", + "description": "Current status (inSync, indexing, indexed, failed)" + }, + "lastSynced": { + "type": "number", + "description": "Timestamp of last synchronization" + }, + "createdAt": { + "type": "number", + "description": "Creation timestamp" + }, + "updatedAt": { + "type": "number", + "description": "Last update timestamp" + } + } + } + }, + "meta": { + "type": "object", + "description": "Pagination metadata for navigation", + "properties": { + "current": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Requested page limit" + }, + "count": { + "type": "number", + "description": "Actual number of records returned" + } + } + }, + "previous": { + "type": "object", + "description": "Previous page navigation (only present if previous page exists)", + "properties": { + "affix": { + "type": "string", + "enum": [ + "prepend" + ], + "description": "Direction for previous page" + }, + "cursor": { + "type": "string", + "description": "Cursor for previous page" + } + } + }, + "next": { + "type": "object", + "description": "Next page navigation (only present if next page exists)", + "properties": { + "affix": { + "type": "string", + "enum": [ + "append" + ], + "description": "Direction for next page" + }, + "cursor": { + "type": "string", + "description": "Cursor for next page" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Missing appId header or invalid parameters" + }, + "500": { + "description": "Internal Server Error - Failed to retrieve knowledge base records" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get knowledge base records with cursor-based pagination", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/pages": { + "get": { + "description": "Retrieves paginated pages for a given source file. Requires appId header. Supports limit, page, and affix for pagination.", + "operationId": "RagController_getSourcePages", + "parameters": [ + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { + "type": "string" + } + }, + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique file ID to fetch pages for", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "Number of pages to return (default 1)", + "schema": { + "type": "number" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "Cursor page number for pagination", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "description": "append or prepend", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Source pages retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object" + } + }, + "meta": { + "type": "object" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get paginated source pages", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/sync": { + "patch": { + "description": "Triggers revectorization for a source by type and unique ID. Requires appId header.", + "operationId": "RagController_revectorizeSource", + "parameters": [ + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { + "type": "string" + } + }, + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique source ID to revectorize", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Revectorization triggered successfully." + }, + "400": { + "description": "Bad Request." + }, + "404": { + "description": "Source not found." + }, + "500": { + "description": "Internal Server Error." + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Resync/Revectorize source", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/status/poll": { + "post": { + "operationId": "RagController_getBatchStatus", + "parameters": [], + "requestBody": { + "required": true, + "description": "Array of unique IDs to query", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusQueryDto" + } + } + } + }, + "responses": { + "200": { + "description": "Status for requested unique IDs", + "content": { + "application/json": { + "schema": { + "type": "object", + "example": { + "success": true, + "data": { + "id1": "indexing", + "id2": "indexed" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get status for multiple unique IDs", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/scrape": { + "post": { + "description": "Scrape a website to fetch links and then batch scrape them with configuration options for filtering and depth control", + "operationId": "CrawlWebPagesController_crawlWebsite", + "parameters": [], + "requestBody": { + "required": true, + "description": "Website crawling configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrapePagesDto" + }, + "examples": { + "basic": { + "summary": "Website sitemap scrape", + "description": "Scrape website and fetch sitemap with basic configuration", + "value": { + "url": "https://example.com", + "maxDepth": 3, + "maxPages": 5 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Website scraped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Website scrape completed successfully" + }, + "data": { + "type": "object", + "properties": { + "crawlId": { + "type": "string", + "example": "crawl-1701789123456" + }, + "crawlDuration": { + "type": "number", + "example": 120000 + }, + "status": { + "type": "string", + "example": "completed" + }, + "sitemap": { + "type": "object", + "properties": { + "found": { + "type": "boolean", + "example": true + }, + "url": { + "type": "string", + "example": "https://docs.example.com/sitemap.xml" + }, + "totalUrls": { + "type": "number", + "example": 245 + }, + "urls": { + "type": "array", + "items": { + "type": "string" + } + }, + "lastModified": { + "type": "string", + "example": "2025-12-05T10:30:00Z" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 400 + }, + "message": { + "type": "string", + "example": "Invalid URL format" + }, + "error": { + "type": "string", + "example": "Bad Request" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized - missing or invalid appId" + }, + "429": { + "description": "Too many requests - rate limit exceeded" + }, + "500": { + "description": "Internal server error during scraping", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 500 + }, + "message": { + "type": "string", + "example": "Failed to scrape website: FIRECRAWL_API_KEY not configured" + }, + "error": { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Scrape a website and fetch sitemap", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/individual-page": { + "post": { + "description": "Scrapes a single webpage to extract title, description, and full content using the specified scraper", + "operationId": "CrawlWebPagesController_scrapePage", + "parameters": [], + "requestBody": { + "required": true, + "description": "Single page scraping configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrapeIndividualPageDto" + }, + "examples": { + "basic": { + "summary": "Basic page scrape", + "description": "Simple page content extraction", + "value": { + "url": "https://docs.example.com/getting-started", + "timeout": 30000, + "format": "markdown" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Page scraped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Page scraped successfully" + }, + "data": { + "type": "object", + "properties": { + "url": { + "type": "string", + "example": "https://docs.example.com/getting-started" + }, + "title": { + "type": "string", + "example": "Getting Started Guide" + }, + "description": { + "type": "string", + "example": "Learn how to get started with our platform" + }, + "content": { + "type": "string", + "example": "# Getting Started\n\nWelcome to our platform..." + }, + "metadata": { + "type": "object", + "properties": { + "og": { + "type": "object" + }, + "twitter": { + "type": "object" + }, + "canonical": { + "type": "string" + }, + "language": { + "type": "string" + } + } + }, + "scraper": { + "type": "string", + "example": "Firecrawl" + }, + "crawlDuration": { + "type": "number", + "example": 2500 + }, + "contentLength": { + "type": "number", + "example": 1024 + }, + "timestamp": { + "type": "string", + "example": "2025-12-05T17:30:00Z" + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 400 + }, + "message": { + "type": "string", + "example": "Invalid URL format" + }, + "error": { + "type": "string", + "example": "Bad Request" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized - missing or invalid appId" + }, + "500": { + "description": "Internal server error during page scraping", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 500 + }, + "message": { + "type": "string", + "example": "Failed to scrape page: Timeout exceeded" + }, + "error": { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Scrape a single page and extract content", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls": { + "get": { + "description": "Retrieves all URLs discovered during a website crawl or single page scrape with cursor-based pagination", + "operationId": "CrawlWebPagesController_getDiscoveredUrls", + "parameters": [ + { + "name": "parentUniqueId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor (timestamp from previous response meta)", + "schema": { + "example": "1701789000000", + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "Number of records per page (default: 10, maximum: 100)", + "schema": { + "example": 20, + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "description": "Navigation direction: \"append\" for next/older records, \"prepend\" for previous/newer records", + "schema": { + "enum": [ + "append", + "prepend" + ], + "type": "string" + } + }, + { + "name": "status", + "required": false, + "in": "query", + "description": "Filter by URL processing status", + "schema": { + "enum": [ + "discovered", + "processing", + "processed", + "failed", + "skipped" + ], + "type": "string" + } + }, + { + "name": "startTime", + "required": false, + "in": "query", + "description": "Start timestamp (Unix timestamp in milliseconds) to filter records created after this time", + "schema": { + "example": 1701780000000, + "type": "number" + } + }, + { + "name": "endTime", + "required": false, + "in": "query", + "description": "End timestamp (Unix timestamp in milliseconds) to filter records created before this time", + "schema": { + "example": 1701790000000, + "type": "number" + } + }, + { + "name": "parentId", + "required": true, + "in": "path", + "description": "Unique ID of the parent crawl (from WebPages collection)", + "schema": { + "example": "uuid-1234-5678-9abc" + } + } + ], + "responses": { + "200": { + "description": "Discovered URLs retrieved successfully with pagination metadata", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Array of discovered URL records", + "items": { + "type": "object", + "properties": { + "urlId": { + "type": "string", + "description": "Unique identifier for the discovered URL", + "example": "uuid-abcd-1234" + }, + "url": { + "type": "string", + "description": "The discovered URL", + "example": "https://docs.example.com/guide" + }, + "title": { + "type": "string", + "description": "Page title extracted from the URL", + "example": "Getting Started Guide" + }, + "description": { + "type": "string", + "description": "Page description or meta description", + "example": "Learn how to get started..." + }, + "content": { + "type": "string", + "description": "Page content preview (truncated to 500 characters)", + "example": "Page content preview..." + }, + "status": { + "type": "string", + "description": "Processing status of the URL", + "example": "processed" + }, + "lastCrawledAt": { + "type": "number", + "description": "Timestamp when URL was last crawled", + "example": 1701789123456 + }, + "retryCount": { + "type": "number", + "description": "Number of retry attempts", + "example": 0 + }, + "createdAt": { + "type": "number", + "description": "Creation timestamp", + "example": 1701789000000 + }, + "updatedAt": { + "type": "number", + "description": "Last update timestamp", + "example": 1701789123456 + }, + "vectorizationStatus": { + "type": "string", + "description": "Status of content vectorization", + "example": "completed" + }, + "chunksCreated": { + "type": "number", + "description": "Number of text chunks created", + "example": 5 + }, + "embeddingsGenerated": { + "type": "number", + "description": "Number of embeddings generated", + "example": 5 + } + } + } + }, + "meta": { + "type": "object", + "description": "Pagination metadata for navigation", + "properties": { + "current": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Records per page limit used for this request" + }, + "count": { + "type": "number", + "description": "Number of records returned in this page" + } + } + }, + "previous": { + "type": "object", + "description": "Navigation info for previous page (newer records). Present only if there are newer records available.", + "properties": { + "affix": { + "type": "string", + "enum": [ + "prepend" + ], + "description": "Use \"prepend\" to get previous/newer records" + }, + "cursor": { + "type": "string", + "description": "Cursor value to use in next request for previous page" + } + } + }, + "next": { + "type": "object", + "description": "Navigation info for next page (older records). Present only if there are older records available.", + "properties": { + "affix": { + "type": "string", + "enum": [ + "append" + ], + "description": "Use \"append\" to get next/older records" + }, + "cursor": { + "type": "string", + "description": "Cursor value to use in next request for next page" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Missing appId header or invalid parameters" + }, + "500": { + "description": "Internal Server Error - Failed to retrieve discovered URLs" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get discovered URLs for a parent crawl", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process": { + "post": { + "description": "Mark discovered URLs for exclusion and initiate batch crawling with FireCrawl webhook callback", + "operationId": "CrawlWebPagesController_processDiscoveredUrls", + "parameters": [ + { + "name": "parentUniqueId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Discovered URLs processing configuration. App ID is taken from header, not body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDiscoveredUrlsDto" + }, + "examples": { + "basic": { + "summary": "Process discovered URLs", + "description": "Process multiple discovered URLs for batch crawling. App ID comes from header.", + "value": { + "exclude": [ + "550e8400-e29b-41d4-a716-446655440001", + "550e8400-e29b-41d4-a716-446655440002" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Batch processing initiated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Batch processing initiated successfully" + }, + "data": { + "type": "object", + "properties": { + "batchId": { + "type": "string", + "example": "batch-1701789123456" + }, + "urlsProcessed": { + "type": "number", + "example": 2 + }, + "totalUrls": { + "type": "number", + "example": 2 + }, + "webhookUrl": { + "type": "string", + "example": "https://webhook.site/b4994000-62d9-4e17-928f-790282cb5815" + }, + "status": { + "type": "string", + "example": "processing" + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request parameters or mismatched arrays" + }, + "404": { + "description": "No valid discovered URLs found for processing" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Process discovered URLs for batch crawling", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/status/poll": { + "post": { + "description": "Retrieves status information for discovered URLs by their unique IDs within a parent website crawl. Only returns existing records, omitting non-existing uniqueIds from the response.", + "operationId": "CrawlWebPagesController_getDiscoveredUrlsStatus", + "parameters": [ + { + "name": "parentUniqueId", + "required": true, + "in": "path", + "description": "Parent website crawl unique ID", + "schema": { + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Array of discovered URL unique IDs to query status for", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoveredUrlsStatusQueryDto" + }, + "examples": { + "example1": { + "summary": "Query multiple discovered URL statuses", + "value": { + "uniqueId": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Status for requested discovered URLs (omits non-existing uniqueIds)", + "content": { + "application/json": { + "schema": { + "type": "object", + "example": { + "success": true, + "data": { + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e": "processed", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1": "discovered" + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Missing appId header or invalid parameters" + }, + "500": { + "description": "Internal Server Error - Failed to retrieve discovered URLs status" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get status for multiple discovered URLs", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/sync": { + "patch": { + "description": "Selectively process only the specified discovered URLs that are not excluded (excludeFlag !== true). This endpoint allows you to sync specific URLs within a parent website crawl without processing all discovered URLs.", + "operationId": "CrawlWebPagesController_syncDiscoveredUrls", + "parameters": [ + { + "name": "parentUniqueId", + "required": true, + "in": "path", + "description": "Parent website crawl unique ID", + "schema": { + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Array of discovered URL unique IDs to sync. Only non-excluded URLs will be processed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncDiscoveredUrlsDto" + }, + "examples": { + "sync_specific_urls": { + "summary": "Sync specific discovered URLs", + "description": "Process only the specified discovered URLs that are not excluded", + "value": { + "uniqueIds": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1", + "550e8400-e29b-41d4-a716-446655440003" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Sync processing initiated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Sync processing initiated successfully" + }, + "data": { + "type": "object", + "properties": { + "batchId": { + "type": "string", + "example": "sync-batch-1701789123456" + }, + "urlsProcessed": { + "type": "number", + "example": 2 + }, + "totalRequested": { + "type": "number", + "example": 3 + }, + "excludedUrls": { + "type": "number", + "example": 1 + }, + "webhookUrl": { + "type": "string", + "example": "https://webhook.site/b4994000-62d9-4e17-928f-790282cb5815" + }, + "status": { + "type": "string", + "example": "processing" + }, + "processedUrls": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Missing appId header, invalid parameters, or empty uniqueIds array" + }, + "404": { + "description": "No valid non-excluded discovered URLs found for sync processing" + }, + "500": { + "description": "Internal Server Error - Failed to sync discovered URLs" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Sync specific discovered URLs for batch processing", + "tags": [ + "crawl-web-pages" + ] + } + } + }, + "info": { + "title": "AI Agents APIs", + "description": "API reference for CometChat AI Agents service", + "version": "1.0" + }, + "tags": [ + { + "name": "ai-agent", + "description": "" + } + ], + "servers": [ + { + "url": "https://{appid}.api-{region}.cometchat.io/v3", + "variables": { + "appid": { + "default": "appId", + "description": "(Required) App ID" + }, + "region": { + "enum": [ + "us", + "eu", + "in" + ], + "default": "us", + "description": "Select Region" + } + } + } + ], + "components": { + "securitySchemes": { + "apiKey": { + "type": "apiKey", + "description": "API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).", + "name": "apikey", + "in": "header" + } + }, + "schemas": { + "CreateAgentDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the agent" + }, + "icon": { + "type": "string", + "description": "URL to the icon/avatar of the agent" + }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is the agent active?" + }, + "integrateWith": { + "type": "string", + "description": "ID of the LLM or platform this agent connects to" + }, + "integrationType": { + "type": "string", + "enum": [ + "llm", + "agent" + ], + "description": "Type of connection: llm or agent" + }, + "integrationMeta": { + "type": "object", + "description": "Required if integrationType is \"agent\". URL where the agent is deployed" + }, + "actions": { + "description": "List of actions", + "type": "array", + "items": { + "type": "string" + } + }, + "tools": { + "description": "List of tools", + "type": "array", + "items": { + "type": "string" + } + }, + "cometchatTools": { + "description": "List of CometChat-provided tools", + "type": "array", + "items": { + "type": "string" + } + }, + "instruction": { + "type": "string", + "description": "Instruction for the agent" + }, + "suggestions": { + "description": "Array of suggestion texts for the agent", + "type": "array", + "items": { + "type": "string" + } + }, + "metaData": { + "type": "object", + "description": "Optional metadata object for the agent" + } + }, + "required": [ + "name", + "isActive", + "integrateWith", + "integrationType", + "actions", + "tools" + ] + }, + "GetAgentDetailDto": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "deploymentUrl": { + "type": "string" + }, + "apiKey": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "deploymentUrl", + "apiKey" + ] + }, + "UpdateAgentDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the agent" + }, + "icon": { + "type": "string", + "description": "URL to the icon/avatar of the agent" + }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is the agent active?" + }, + "integrateWith": { + "type": "string", + "description": "ID of the LLM or platform this agent connects to" + }, + "integrationType": { + "type": "string", + "enum": [ + "llm", + "agent" + ], + "description": "Type of connection: llm or agent" + }, + "integrationMeta": { + "type": "object", + "description": "Required if integrationType is \"agent\". URL where the agent is deployed" + }, + "actions": { + "description": "List of actions", + "type": "array", + "items": { + "type": "string" + } + }, + "tools": { + "description": "List of tools", + "type": "array", + "items": { + "type": "string" + } + }, + "cometchatTools": { + "description": "List of CometChat-provided tools", + "type": "array", + "items": { + "type": "string" + } + }, + "instruction": { + "type": "string", + "description": "Instruction for the agent" + }, + "suggestions": { + "description": "Array of suggestion texts for the agent", + "type": "array", + "items": { + "type": "string" + } + }, + "metaData": { + "type": "object", + "description": "Optional metadata object for the agent" + } + } + }, + "CreateTagDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "style": { + "type": "object" + } + }, + "required": [ + "id", + "text", + "style" + ] + }, + "UpdateTagDto": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "style": { + "type": "object" + } + }, + "required": [ + "text", + "style" + ] + }, + "ToolDto": { + "type": "object", + "properties": {} + }, + "MessageEventDTO": { + "type": "object", + "properties": {} + }, + "CreateIntegrationDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "agent", + "llm" + ], + "description": "Allowed values: agent, llm" + }, + "icon": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "isActive": { + "type": "boolean", + "default": true + }, + "metaData": { + "type": "object", + "default": {} + } + }, + "required": [ + "id", + "name", + "type", + "icon", + "tags", + "isActive", + "metaData" + ] + }, + "UpdateIntegrationDto": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "isActive": { + "type": "boolean", + "default": true + }, + "metaData": { + "type": "object", + "default": {} + } + }, + "required": [ + "name", + "icon", + "tags", + "isActive", + "metaData" + ] + }, + "CreateCometChatAgentDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the agent" + }, + "icon": { + "type": "string", + "description": "URL to the icon/avatar of the agent" + }, + "description": { + "type": "string", + "description": "Description of the agent" + }, + "tools": { + "description": "Array of tool names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "apiTools": { + "description": "Array of API tool names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "mcpServers": { + "description": "Array of MCP server names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "instruction": { + "type": "string", + "description": "Instructions for the agent behavior" + }, + "metaData": { + "type": "object", + "description": "Additional metadata for the agent" + }, + "model": { + "type": "string", + "description": "AI model to use for this agent", + "default": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "description": "Configuration metadata for the AI model" + }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is the agent active?" + } + }, + "required": [ + "name", + "description", + "isActive" + ] + }, + "UpdateCometChatAgentDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the agent" + }, + "icon": { + "type": "string", + "description": "URL to the icon/avatar of the agent" + }, + "description": { + "type": "string", + "description": "Description of the agent" + }, + "tools": { + "description": "Array of tool names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "apiTools": { + "description": "Array of API tool names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "mcpServers": { + "description": "Array of MCP server names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "instruction": { + "type": "string", + "description": "Instructions for the agent behavior" + }, + "metaData": { + "type": "object", + "description": "Additional metadata for the agent" + }, + "model": { + "type": "string", + "description": "AI model to use for this agent", + "default": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "description": "Configuration metadata for the AI model" + }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is the agent active?" + } + } + }, + "ManageAgentToolsDto": { + "type": "object", + "properties": { + "tools": { + "description": "Array of tool names to add or remove", + "example": [ + "gmail", + "google-sheets", + "slack" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tools" + ] + }, + "ManageAgentMcpDto": { + "type": "object", + "properties": { + "mcps": { + "description": "Array of MCP server slugs to add or remove", + "example": [ + "filesystem", + "git", + "postgres" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mcps" + ] + }, + "ManageAgentApiToolsDto": { + "type": "object", + "properties": { + "apiTools": { + "description": "Array of API tool slugs to add or remove", + "example": [ + "get_weather", + "send_email", + "create_task" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "apiTools" + ] + }, + "ManageAgentFrontendActionsDto": { + "type": "object", + "properties": { + "frontendActions": { + "description": "Array of frontend action function names to add or remove", + "example": [ + "openProduct_modal", + "showNotification" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "frontendActions" + ] + }, + "ManageKnowledgeBaseFilesDto": { + "type": "object", + "properties": { + "uniqueIds": { + "description": "Array of file IDs to be added to the knowledge base", + "example": [ + "60f7b3b3b3b3b3b3b3b3b3b3", + "60f7b3b3b3b3b3b3b3b3b3b4" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uniqueIds" + ] + }, + "ManageActionsDto": { + "type": "object", + "properties": { + "actions": { + "description": "Array of action names to add or remove", + "example": [ + "send-email", + "draft-email", + "read-emails" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "authMeta": { + "type": "object", + "description": "Credentials or metadata required for authenticating the tool", + "example": [ + "emailId: \"example@cometchat.com\"" + ] + } + }, + "required": [ + "actions", + "authMeta" + ] + }, + "CreateCustomVariableDto": { + "type": "object", + "properties": {} + }, + "UpdateCustomVariableDto": { + "type": "object", + "properties": {} + }, + "TestVariableResolutionDto": { + "type": "object", + "properties": {} + }, + "ApiToolSampleContextDto": { + "type": "object", + "properties": { + "senderUid": { + "type": "string", + "description": "Sender user ID", + "example": "user123" + }, + "senderRole": { + "type": "string", + "description": "Sender role", + "example": "default" + }, + "senderMetadata": { + "type": "object", + "description": "Sender metadata object", + "example": { + "department": "engineering", + "level": "senior" + } + }, + "receiverUid": { + "type": "string", + "description": "Receiver user ID (defaults to agent ID)", + "example": "agent456" + }, + "messageMetadata": { + "type": "object", + "description": "Message metadata object", + "example": { + "priority": "high", + "source": "web" + } + } + }, + "required": [ + "senderUid" + ] + }, + "TestApiToolVariablesDto": { + "type": "object", + "properties": { + "sampleContext": { + "description": "Sample context for variable resolution", + "allOf": [ + { + "$ref": "#/components/schemas/ApiToolSampleContextDto" + } + ] + }, + "sampleQueryParams": { + "type": "object", + "description": "Sample query parameters to test resolution", + "example": { + "userId": "[{variable-auth: \"sender.uid\"}]", + "limit": "10" + } + } + }, + "required": [ + "sampleContext" + ] + }, + "ApiToolParameter": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Parameter key/name", + "example": "email" + }, + "type": { + "type": "string", + "description": "Parameter type", + "example": "string" + }, + "description": { + "type": "string", + "description": "Parameter description", + "example": "Email of the lead" + }, + "required": { + "type": "boolean", + "description": "Whether the parameter is required", + "example": false + } + }, + "required": [ + "key", + "type", + "description" + ] + }, + "CreateApiToolDto": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Slug for the API tool (unique)", + "example": "create_lead" + }, + "description": { + "type": "string", + "description": "Description of the API tool", + "example": "When to use, preconditions, what it returns" + }, + "endpoint": { + "type": "string", + "description": "API endpoint URL", + "example": "https://api.example.com/leads" + }, + "method": { + "type": "string", + "description": "HTTP method", + "example": "POST", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + "enableBasicAuth": { + "type": "boolean", + "description": "Whether to enable basic authentication", + "example": true + }, + "basicAuthUsername": { + "type": "string", + "description": "Basic auth username (required if enableBasicAuth is true)", + "example": "username" + }, + "basicAuthPassword": { + "type": "string", + "description": "Basic auth password (required if enableBasicAuth is true)", + "example": "password" + }, + "headers": { + "type": "string", + "description": "HTTP headers as a JSON string (e.g., '{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}')", + "example": "{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}" + }, + "bodyTemplate": { + "type": "string", + "description": "Body template for the API request", + "example": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "description": "Whether to allow additional properties", + "example": false, + "default": false + }, + "parameters": { + "description": "Array of parameters for the API tool", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiToolParameter" + } + }, + "icon": { + "type": "string", + "description": "Icon for the API Tool", + "example": "http://localhost:3001" + }, + "name": { + "type": "string", + "description": "Name of the API tool", + "example": "Create Lead" + } + }, + "required": [ + "slug", + "description", + "endpoint", + "method", + "enableBasicAuth", + "name" + ] + }, + "UpdateApiToolDto": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Slug for the API tool (unique)", + "example": "create_lead" + }, + "description": { + "type": "string", + "description": "Description of the API tool", + "example": "When to use, preconditions, what it returns" + }, + "endpoint": { + "type": "string", + "description": "API endpoint URL", + "example": "https://api.example.com/leads" + }, + "method": { + "type": "string", + "description": "HTTP method", + "example": "POST", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + "enableBasicAuth": { + "type": "boolean", + "description": "Whether to enable basic authentication", + "example": true + }, + "basicAuthUsername": { + "type": "string", + "description": "Basic auth username (required if enableBasicAuth is true)", + "example": "username" + }, + "basicAuthPassword": { + "type": "string", + "description": "Basic auth password (required if enableBasicAuth is true)", + "example": "password" + }, + "headers": { + "type": "string", + "description": "HTTP headers as a JSON string (e.g., '{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}')", + "example": "{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}" + }, + "bodyTemplate": { + "type": "string", + "description": "Body template for the API request", + "example": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "description": "Whether to allow additional properties", + "example": false, + "default": false + }, + "parameters": { + "description": "Array of parameters for the API tool", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiToolParameter" + } + }, + "icon": { + "type": "string", + "description": "Icon for the API Tool", + "example": "http://localhost:3001" + } + } + }, + "CreateMcpServerDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the MCP server (human readable)", + "example": "Weather Server" + }, + "slug": { + "type": "string", + "description": "Slug of the MCP server (unique, URL-safe)", + "example": "weather-server" + }, + "description": { + "type": "string", + "description": "Description of the MCP server", + "example": "Provides weather data for cities" + }, + "url": { + "type": "string", + "description": "URL of the MCP server", + "example": "http://localhost:3001" + }, + "icon": { + "type": "string", + "description": "Icon for the MCP server", + "example": "http://localhost:3001/icon.png" + } + }, + "required": [ + "name", + "slug", + "description", + "url" + ] + }, + "UpdateMcpServerDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Updated name of the MCP server (human readable)", + "example": "Weather Server" + }, + "description": { + "type": "string", + "description": "Updated description of the MCP server", + "example": "Provides weather data for cities" + }, + "url": { + "type": "string", + "description": "Updated URL of the MCP server", + "example": "http://localhost:3002" + }, + "icon": { + "type": "string", + "description": "Updated icon for the MCP server", + "example": "http://localhost:3002/icon.png" + } + } + }, + "AuthenticateToolDto": { + "type": "object", + "properties": { + "authMeta": { + "type": "object", + "description": "Authentication metadata required for the tool", + "example": { + "emailId": "user@example.com" + } + } + } + }, + "FrontendActionParameter": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Parameter key/name", + "example": "productId" + }, + "type": { + "type": "string", + "description": "Parameter type", + "example": "string" + }, + "description": { + "type": "string", + "description": "Parameter description", + "example": "The ID of the product to display" + }, + "required": { + "type": "boolean", + "description": "Whether the parameter is required", + "example": true + } + }, + "required": [ + "key", + "type", + "description" + ] + }, + "CreateFrontendActionDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Display name of the frontend action", + "example": "Open Product Modal" + }, + "description": { + "type": "string", + "description": "Description of what the frontend action does", + "example": "Opens a modal displaying product details for the specified product ID" + }, + "triggerFunction": { + "type": "string", + "description": "The function name that the frontend will execute (used as unique identifier)", + "example": "showProductModal" + }, + "parameters": { + "description": "Array of parameters for the frontend action", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendActionParameter" + } + }, + "icon": { + "type": "string", + "description": "Icon URL for the frontend action", + "example": "https://example.com/icon.png" + } + }, + "required": [ + "name", + "description", + "triggerFunction" + ] + }, + "UpdateFrontendActionDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the frontend action", + "example": "Open Product Modal" + }, + "description": { + "type": "string", + "description": "Description of what the frontend action does", + "example": "Opens a modal displaying product details" + }, + "parameters": { + "description": "Array of parameters for the frontend action", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendActionParameter" + } + }, + "icon": { + "type": "string", + "description": "Icon URL for the frontend action", + "example": "https://example.com/icon.png" + } + } + }, + "FileDescriptorDto": { + "type": "object", + "properties": { + "fileName": { + "type": "string", + "description": "Name of the file", + "example": "document.pdf" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the file", + "example": "application/pdf" + }, + "fileSize": { + "type": "number", + "description": "Size of the file in bytes", + "example": 1024000 + } + }, + "required": [ + "fileName", + "mimeType", + "fileSize" + ] + }, + "InitiateUploadDto": { + "type": "object", + "properties": { + "files": { + "description": "List of files to upload", + "type": "array", + "items": { + "$ref": "#/components/schemas/FileDescriptorDto" + } + } + }, + "required": [ + "files" + ] + }, + "CreateTextDetailDto": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the text content", + "example": "Company Policy Document", + "maxLength": 500 + }, + "text": { + "type": "string", + "description": "Text content to be processed", + "example": "This document outlines the company policies and procedures...", + "maxLength": 5000 + } + }, + "required": [ + "title", + "text" + ] + }, + "UpdateTextDetailDto": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the text content", + "example": "Updated Company Policy Document", + "maxLength": 500 + }, + "text": { + "type": "string", + "description": "Text content to be processed", + "example": "This is the updated document content with new policies and procedures...", + "maxLength": 5000 + } + } + }, + "StatusQueryDto": { + "type": "object", + "properties": { + "uniqueId": { + "description": "Array of unique IDs to query", + "example": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uniqueId" + ] + }, + "ScrapePagesDto": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Target website URL to crawl", + "example": "https://docs.example.com" + }, + "maxDepth": { + "type": "number", + "description": "Maximum depth to crawl from the starting URL", + "minimum": 1, + "maximum": 10, + "default": 3, + "example": 5 + }, + "maxPages": { + "type": "number", + "description": "Maximum number of pages to crawl", + "minimum": 1, + "maximum": 10000, + "default": 100, + "example": 500 + }, + "include": { + "description": "URL patterns to include in crawling (substring matching)", + "example": [ + "docs/", + "api/", + "guides/" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "exclude": { + "description": "URL patterns to exclude from crawling (substring matching)", + "example": [ + "login", + "signup", + "admin", + "privacy" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "fetchSitemap": { + "type": "boolean", + "description": "Fetch and return sitemap URLs from the website", + "default": false, + "example": true + }, + "crawlerType": { + "type": "string", + "description": "Crawler service to use for crawling (firecrawl, puppeteer, etc.)", + "default": "firecrawl", + "example": "firecrawl" + } + }, + "required": [ + "url" + ] + }, + "ScrapeIndividualPageDto": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Target page URL to crawl and extract content from", + "example": "https://docs.example.com/getting-started" + }, + "timeout": { + "type": "number", + "description": "Request timeout in milliseconds", + "minimum": 5000, + "maximum": 120000, + "default": 30000, + "example": 30000 + }, + "crawlerType": { + "type": "string", + "description": "Crawler service to use for page crawling (firecrawl, puppeteer, etc.)", + "default": "firecrawl", + "example": "firecrawl" + }, + "format": { + "type": "string", + "description": "Extract content in specific format", + "enum": [ + "markdown", + "html", + "text" + ], + "default": "markdown", + "example": "markdown" + } + }, + "required": [ + "url" + ] + }, + "ProcessDiscoveredUrlsDto": { + "type": "object", + "properties": { + "exclude": { + "description": "Array of unique IDs to exclude from crawling", + "example": [ + "550e8400-e29b-41d4-a716-446655440001", + "550e8400-e29b-41d4-a716-446655440002" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "exclude" + ] + }, + "DiscoveredUrlsStatusQueryDto": { + "type": "object", + "properties": { + "uniqueId": { + "description": "Array of discovered URL unique IDs to query status for", + "example": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uniqueId" + ] + }, + "SyncDiscoveredUrlsDto": { + "type": "object", + "properties": { + "uniqueIds": { + "description": "Array of unique IDs to sync for batch processing", + "example": [ + "url-id-1", + "url-id-2", + "url-id-3" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uniqueIds" + ] + }, + "FormFieldDto": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Field label" + }, + "required": { + "type": "boolean", + "description": "Whether field is required" + }, + "type": { + "type": "string", + "description": "Field type (text, url, boolean, dropdown, toggles)" + }, + "keyInPayload": { + "type": "string", + "description": "Key to use in payload" + }, + "keyInData": { + "type": "string", + "description": "Key to use in data" + }, + "hidden": { + "type": "boolean", + "description": "Whether field is hidden", + "default": false + }, + "disabled": { + "type": "boolean", + "description": "Whether field is disabled", + "default": false + }, + "placeholder": { + "type": "object", + "description": "Placeholder text/number/object for the field" + }, + "tip": { + "type": "object", + "description": "Tip information for the field", + "properties": { + "title": { + "type": "string", + "description": "Tip title/text" + }, + "icon": { + "type": "string", + "description": "Optional tip icon" + } + } + }, + "value": { + "type": "object", + "description": "Default field value" + }, + "dynamicOptions": { + "type": "object", + "description": "Dynamic options configuration" + } + }, + "required": [ + "label", + "required", + "type" + ] + }, + "SubmitDetailsDto": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method" + }, + "url": { + "type": "string", + "description": "Submit URL" + }, + "Authorization": { + "type": "string", + "description": "Authorization header" + }, + "redirectPath": { + "type": "string", + "description": "Redirect path after submit" + } + }, + "required": [ + "method", + "url" + ] + }, + "CreateFormDto": { + "type": "object", + "properties": { + "formType": { + "type": "string", + "description": "Form type identifier" + }, + "name": { + "type": "string", + "description": "Form name" + }, + "description": { + "type": "string", + "description": "Form description" + }, + "fields": { + "description": "Form fields", + "type": "array", + "items": { + "$ref": "#/components/schemas/FormFieldDto" + } + }, + "submitDetails": { + "description": "Submit configuration", + "allOf": [ + { + "$ref": "#/components/schemas/SubmitDetailsDto" + } + ] + }, + "isActive": { + "type": "boolean", + "description": "Whether form is active", + "default": true + }, + "version": { + "type": "string", + "description": "Form version" + } + }, + "required": [ + "formType", + "name", + "fields", + "submitDetails" + ] + }, + "UpdateFormDto": { + "type": "object", + "properties": { + "formType": { + "type": "string", + "description": "Form type identifier" + }, + "name": { + "type": "string", + "description": "Form name" + }, + "description": { + "type": "string", + "description": "Form description" + }, + "fields": { + "description": "Form fields", + "type": "array", + "items": { + "$ref": "#/components/schemas/FormFieldDto" + } + }, + "submitDetails": { + "description": "Submit configuration", + "allOf": [ + { + "$ref": "#/components/schemas/SubmitDetailsDto" + } + ] + }, + "isActive": { + "type": "boolean", + "description": "Whether form is active", + "default": true + }, + "version": { + "type": "string", + "description": "Form version" + } + } + } + } + } +} diff --git a/docs.json b/docs.json index 5e6b7921..dcab2ec3 100644 --- a/docs.json +++ b/docs.json @@ -28,6 +28,13 @@ ] }, "favicon": "/favicon.png", + "openapi": [ + "chat-apis.json", + "management-apis.json", + "data-import-apis.json", + "calls.json", + "ai-agent-service.json" + ], "navigation": { "products": [ { @@ -5096,6 +5103,132 @@ "/ai-chatbots/ai-bots/instructions", "/ai-chatbots/ai-bots/bots" ] + }, + { + "tab": "BYO Agent APIs", + "pages": [ + { + "group": "Third-Party Agents", + "pages": [ + "ai-agents/apis/create-third-party-agent", + "ai-agents/apis/list-third-party-agents", + "ai-agents/apis/update-third-party-agent", + "ai-agents/apis/delete-third-party-agent" + ] + }, + { + "group": "Tools", + "pages": [ + "ai-agents/apis/list-tools", + "ai-agents/apis/get-tool", + "ai-agents/apis/create-tool", + "ai-agents/apis/update-tool", + "ai-agents/apis/delete-tool" + ] + }, + { + "group": "Integrations", + "pages": [ + "ai-agents/apis/list-integrations" + ] + } + ] + }, + { + "tab": "Agent Builder APIs", + "pages": [ + "ai-agents/api-explorer", + { + "group": "Agents", + "pages": [ + "ai-agents/apis/create-agent", + "ai-agents/apis/list-agents", + "ai-agents/apis/get-agent", + "ai-agents/apis/update-agent", + "ai-agents/apis/delete-agent", + "ai-agents/apis/search-agent-tools", + "ai-agents/apis/get-enabled-items", + "ai-agents/apis/get-available-models" + ] + }, + { + "group": "Tools", + "pages": [ + "ai-agents/apis/get-composio-tools", + "ai-agents/apis/add-tools-to-agent", + "ai-agents/apis/remove-tools-from-agent", + "ai-agents/apis/get-tool-actions-for-agent", + "ai-agents/apis/enable-tool-actions", + "ai-agents/apis/remove-tool-actions", + "ai-agents/apis/authenticate-composio-tool" + ] + }, + { + "group": "Custom API Tools", + "pages": [ + "ai-agents/apis/list-api-tools", + "ai-agents/apis/create-api-tool", + "ai-agents/apis/update-api-tool", + "ai-agents/apis/delete-api-tool", + "ai-agents/apis/add-api-tools-to-agent", + "ai-agents/apis/remove-api-tools-from-agent" + ] + }, + { + "group": "Frontend Actions", + "pages": [ + "ai-agents/apis/list-frontend-actions", + "ai-agents/apis/create-frontend-action", + "ai-agents/apis/update-frontend-action", + "ai-agents/apis/delete-frontend-action", + "ai-agents/apis/add-frontend-actions-to-agent", + "ai-agents/apis/remove-frontend-actions-from-agent" + ] + }, + { + "group": "MCP Servers", + "pages": [ + "ai-agents/apis/list-mcp-servers", + "ai-agents/apis/create-mcp-server", + "ai-agents/apis/update-mcp-server", + "ai-agents/apis/delete-mcp-server", + "ai-agents/apis/add-mcp-servers-to-agent", + "ai-agents/apis/remove-mcp-servers-from-agent" + ] + }, + { + "group": "Knowledge Base", + "pages": [ + "ai-agents/apis/list-knowledge-base-records", + "ai-agents/apis/get-source-pages", + "ai-agents/apis/resync-knowledge-base-source", + "ai-agents/apis/initiate-file-uploads", + "ai-agents/apis/delete-uploaded-file", + "ai-agents/apis/create-text-detail", + "ai-agents/apis/update-text-detail", + "ai-agents/apis/poll-knowledge-base-status", + "ai-agents/apis/add-knowledge-base-files", + "ai-agents/apis/remove-knowledge-base-files", + "ai-agents/apis/scrape-website", + "ai-agents/apis/scrape-single-page", + "ai-agents/apis/delete-website", + "ai-agents/apis/get-discovered-urls", + "ai-agents/apis/get-sitemap-discovered-urls", + "ai-agents/apis/process-discovered-urls", + "ai-agents/apis/poll-discovered-urls-status", + "ai-agents/apis/sync-discovered-urls" + ] + }, + { + "group": "Variables", + "pages": [ + "ai-agents/apis/get-all-available-variables", + "ai-agents/apis/create-custom-variable", + "ai-agents/apis/update-custom-variable", + "ai-agents/apis/delete-custom-variable" + ] + } + ] } ] }, From d8288f2bd912a4f8440b1ca25f8fb2759aa91a02 Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Wed, 4 Mar 2026 17:07:02 +0530 Subject: [PATCH 02/13] feat: add AI Agents API MDX endpoint pages --- ai-agents/api-explorer.mdx | 45 +++++++++++++++++++ ai-agents/apis/add-api-tools-to-agent.mdx | 3 ++ .../apis/add-frontend-actions-to-agent.mdx | 3 ++ ai-agents/apis/add-knowledge-base-files.mdx | 3 ++ ai-agents/apis/add-mcp-servers-to-agent.mdx | 3 ++ ai-agents/apis/add-tools-to-agent.mdx | 3 ++ ai-agents/apis/authenticate-composio-tool.mdx | 3 ++ ai-agents/apis/create-agent.mdx | 3 ++ ai-agents/apis/create-api-tool.mdx | 3 ++ ai-agents/apis/create-custom-variable.mdx | 3 ++ ai-agents/apis/create-frontend-action.mdx | 3 ++ ai-agents/apis/create-integration.mdx | 3 ++ ai-agents/apis/create-mcp-server.mdx | 3 ++ ai-agents/apis/create-tag.mdx | 3 ++ ai-agents/apis/create-text-detail.mdx | 3 ++ ai-agents/apis/create-third-party-agent.mdx | 3 ++ ai-agents/apis/create-tool.mdx | 3 ++ ai-agents/apis/delete-agent.mdx | 3 ++ ai-agents/apis/delete-api-tool.mdx | 3 ++ ai-agents/apis/delete-custom-variable.mdx | 3 ++ ai-agents/apis/delete-frontend-action.mdx | 3 ++ ai-agents/apis/delete-mcp-server.mdx | 3 ++ ai-agents/apis/delete-text-detail.mdx | 3 ++ ai-agents/apis/delete-third-party-agent.mdx | 3 ++ ai-agents/apis/delete-tool.mdx | 3 ++ ai-agents/apis/delete-uploaded-file.mdx | 3 ++ ai-agents/apis/delete-website.mdx | 3 ++ ai-agents/apis/enable-tool-actions.mdx | 3 ++ ai-agents/apis/get-action-edit-form.mdx | 3 ++ ai-agents/apis/get-actions-creation-form.mdx | 3 ++ ai-agents/apis/get-actions-form.mdx | 3 ++ ai-agents/apis/get-agent-creation-form.mdx | 3 ++ ai-agents/apis/get-agent-edit-form.mdx | 3 ++ ai-agents/apis/get-agent.mdx | 3 ++ .../apis/get-all-available-variables.mdx | 3 ++ ai-agents/apis/get-all-tools-for-agent.mdx | 3 ++ ai-agents/apis/get-all-variables.mdx | 3 ++ ai-agents/apis/get-api-tool.mdx | 3 ++ ai-agents/apis/get-available-models.mdx | 3 ++ ai-agents/apis/get-composio-tools.mdx | 3 ++ ai-agents/apis/get-custom-variables.mdx | 3 ++ ai-agents/apis/get-discovered-urls.mdx | 3 ++ ai-agents/apis/get-enabled-items.mdx | 3 ++ ai-agents/apis/get-form-fields.mdx | 3 ++ ai-agents/apis/get-frontend-action.mdx | 3 ++ ai-agents/apis/get-mcp-server.mdx | 3 ++ ai-agents/apis/get-parent-urls.mdx | 3 ++ ai-agents/apis/get-predefined-variables.mdx | 3 ++ .../apis/get-sitemap-discovered-urls.mdx | 3 ++ ai-agents/apis/get-source-pages.mdx | 3 ++ ai-agents/apis/get-text-detail.mdx | 3 ++ ai-agents/apis/get-tool-actions-for-agent.mdx | 3 ++ ai-agents/apis/get-tool-actions.mdx | 3 ++ ai-agents/apis/get-tool-configurations.mdx | 3 ++ ai-agents/apis/get-tool-edit-form.mdx | 3 ++ ai-agents/apis/get-tool.mdx | 3 ++ ai-agents/apis/get-tools-creation-form.mdx | 3 ++ ai-agents/apis/get-tools-form.mdx | 3 ++ ai-agents/apis/get-upcoming-tools.mdx | 3 ++ ai-agents/apis/initiate-file-uploads.mdx | 3 ++ ai-agents/apis/kb-delete-integration.mdx | 3 ++ ai-agents/apis/kb-generate-auth-url.mdx | 3 ++ ai-agents/apis/kb-oauth-callback.mdx | 3 ++ ai-agents/apis/kb-trigger-sync.mdx | 3 ++ ai-agents/apis/list-agents.mdx | 3 ++ ai-agents/apis/list-api-tools.mdx | 3 ++ ai-agents/apis/list-frontend-actions.mdx | 3 ++ ai-agents/apis/list-integrations.mdx | 3 ++ .../apis/list-knowledge-base-records.mdx | 3 ++ ai-agents/apis/list-mcp-servers.mdx | 3 ++ ai-agents/apis/list-text-details.mdx | 3 ++ ai-agents/apis/list-third-party-agents.mdx | 3 ++ ai-agents/apis/list-tools.mdx | 3 ++ ai-agents/apis/oauth-redirect-composio.mdx | 3 ++ .../apis/poll-discovered-urls-status.mdx | 3 ++ ai-agents/apis/poll-knowledge-base-status.mdx | 3 ++ ai-agents/apis/process-discovered-urls.mdx | 3 ++ .../apis/remove-api-tools-from-agent.mdx | 3 ++ .../remove-frontend-actions-from-agent.mdx | 3 ++ .../apis/remove-knowledge-base-files.mdx | 3 ++ .../apis/remove-mcp-servers-from-agent.mdx | 3 ++ ai-agents/apis/remove-tool-actions.mdx | 3 ++ ai-agents/apis/remove-tools-from-agent.mdx | 3 ++ .../apis/resync-knowledge-base-source.mdx | 3 ++ ai-agents/apis/scrape-single-page.mdx | 3 ++ ai-agents/apis/scrape-website.mdx | 3 ++ ai-agents/apis/search-agent-tools.mdx | 3 ++ ai-agents/apis/sync-discovered-urls.mdx | 3 ++ ai-agents/apis/test-api-tool-variables.mdx | 3 ++ ai-agents/apis/test-third-party-agent.mdx | 3 ++ ai-agents/apis/test-variable-resolution.mdx | 3 ++ ai-agents/apis/update-agent.mdx | 3 ++ ai-agents/apis/update-api-tool.mdx | 3 ++ ai-agents/apis/update-custom-variable.mdx | 3 ++ ai-agents/apis/update-frontend-action.mdx | 3 ++ ai-agents/apis/update-integration.mdx | 3 ++ ai-agents/apis/update-mcp-server.mdx | 3 ++ ai-agents/apis/update-tag.mdx | 3 ++ ai-agents/apis/update-text-detail.mdx | 3 ++ ai-agents/apis/update-third-party-agent.mdx | 3 ++ ai-agents/apis/update-tool.mdx | 3 ++ 101 files changed, 345 insertions(+) create mode 100644 ai-agents/api-explorer.mdx create mode 100644 ai-agents/apis/add-api-tools-to-agent.mdx create mode 100644 ai-agents/apis/add-frontend-actions-to-agent.mdx create mode 100644 ai-agents/apis/add-knowledge-base-files.mdx create mode 100644 ai-agents/apis/add-mcp-servers-to-agent.mdx create mode 100644 ai-agents/apis/add-tools-to-agent.mdx create mode 100644 ai-agents/apis/authenticate-composio-tool.mdx create mode 100644 ai-agents/apis/create-agent.mdx create mode 100644 ai-agents/apis/create-api-tool.mdx create mode 100644 ai-agents/apis/create-custom-variable.mdx create mode 100644 ai-agents/apis/create-frontend-action.mdx create mode 100644 ai-agents/apis/create-integration.mdx create mode 100644 ai-agents/apis/create-mcp-server.mdx create mode 100644 ai-agents/apis/create-tag.mdx create mode 100644 ai-agents/apis/create-text-detail.mdx create mode 100644 ai-agents/apis/create-third-party-agent.mdx create mode 100644 ai-agents/apis/create-tool.mdx create mode 100644 ai-agents/apis/delete-agent.mdx create mode 100644 ai-agents/apis/delete-api-tool.mdx create mode 100644 ai-agents/apis/delete-custom-variable.mdx create mode 100644 ai-agents/apis/delete-frontend-action.mdx create mode 100644 ai-agents/apis/delete-mcp-server.mdx create mode 100644 ai-agents/apis/delete-text-detail.mdx create mode 100644 ai-agents/apis/delete-third-party-agent.mdx create mode 100644 ai-agents/apis/delete-tool.mdx create mode 100644 ai-agents/apis/delete-uploaded-file.mdx create mode 100644 ai-agents/apis/delete-website.mdx create mode 100644 ai-agents/apis/enable-tool-actions.mdx create mode 100644 ai-agents/apis/get-action-edit-form.mdx create mode 100644 ai-agents/apis/get-actions-creation-form.mdx create mode 100644 ai-agents/apis/get-actions-form.mdx create mode 100644 ai-agents/apis/get-agent-creation-form.mdx create mode 100644 ai-agents/apis/get-agent-edit-form.mdx create mode 100644 ai-agents/apis/get-agent.mdx create mode 100644 ai-agents/apis/get-all-available-variables.mdx create mode 100644 ai-agents/apis/get-all-tools-for-agent.mdx create mode 100644 ai-agents/apis/get-all-variables.mdx create mode 100644 ai-agents/apis/get-api-tool.mdx create mode 100644 ai-agents/apis/get-available-models.mdx create mode 100644 ai-agents/apis/get-composio-tools.mdx create mode 100644 ai-agents/apis/get-custom-variables.mdx create mode 100644 ai-agents/apis/get-discovered-urls.mdx create mode 100644 ai-agents/apis/get-enabled-items.mdx create mode 100644 ai-agents/apis/get-form-fields.mdx create mode 100644 ai-agents/apis/get-frontend-action.mdx create mode 100644 ai-agents/apis/get-mcp-server.mdx create mode 100644 ai-agents/apis/get-parent-urls.mdx create mode 100644 ai-agents/apis/get-predefined-variables.mdx create mode 100644 ai-agents/apis/get-sitemap-discovered-urls.mdx create mode 100644 ai-agents/apis/get-source-pages.mdx create mode 100644 ai-agents/apis/get-text-detail.mdx create mode 100644 ai-agents/apis/get-tool-actions-for-agent.mdx create mode 100644 ai-agents/apis/get-tool-actions.mdx create mode 100644 ai-agents/apis/get-tool-configurations.mdx create mode 100644 ai-agents/apis/get-tool-edit-form.mdx create mode 100644 ai-agents/apis/get-tool.mdx create mode 100644 ai-agents/apis/get-tools-creation-form.mdx create mode 100644 ai-agents/apis/get-tools-form.mdx create mode 100644 ai-agents/apis/get-upcoming-tools.mdx create mode 100644 ai-agents/apis/initiate-file-uploads.mdx create mode 100644 ai-agents/apis/kb-delete-integration.mdx create mode 100644 ai-agents/apis/kb-generate-auth-url.mdx create mode 100644 ai-agents/apis/kb-oauth-callback.mdx create mode 100644 ai-agents/apis/kb-trigger-sync.mdx create mode 100644 ai-agents/apis/list-agents.mdx create mode 100644 ai-agents/apis/list-api-tools.mdx create mode 100644 ai-agents/apis/list-frontend-actions.mdx create mode 100644 ai-agents/apis/list-integrations.mdx create mode 100644 ai-agents/apis/list-knowledge-base-records.mdx create mode 100644 ai-agents/apis/list-mcp-servers.mdx create mode 100644 ai-agents/apis/list-text-details.mdx create mode 100644 ai-agents/apis/list-third-party-agents.mdx create mode 100644 ai-agents/apis/list-tools.mdx create mode 100644 ai-agents/apis/oauth-redirect-composio.mdx create mode 100644 ai-agents/apis/poll-discovered-urls-status.mdx create mode 100644 ai-agents/apis/poll-knowledge-base-status.mdx create mode 100644 ai-agents/apis/process-discovered-urls.mdx create mode 100644 ai-agents/apis/remove-api-tools-from-agent.mdx create mode 100644 ai-agents/apis/remove-frontend-actions-from-agent.mdx create mode 100644 ai-agents/apis/remove-knowledge-base-files.mdx create mode 100644 ai-agents/apis/remove-mcp-servers-from-agent.mdx create mode 100644 ai-agents/apis/remove-tool-actions.mdx create mode 100644 ai-agents/apis/remove-tools-from-agent.mdx create mode 100644 ai-agents/apis/resync-knowledge-base-source.mdx create mode 100644 ai-agents/apis/scrape-single-page.mdx create mode 100644 ai-agents/apis/scrape-website.mdx create mode 100644 ai-agents/apis/search-agent-tools.mdx create mode 100644 ai-agents/apis/sync-discovered-urls.mdx create mode 100644 ai-agents/apis/test-api-tool-variables.mdx create mode 100644 ai-agents/apis/test-third-party-agent.mdx create mode 100644 ai-agents/apis/test-variable-resolution.mdx create mode 100644 ai-agents/apis/update-agent.mdx create mode 100644 ai-agents/apis/update-api-tool.mdx create mode 100644 ai-agents/apis/update-custom-variable.mdx create mode 100644 ai-agents/apis/update-frontend-action.mdx create mode 100644 ai-agents/apis/update-integration.mdx create mode 100644 ai-agents/apis/update-mcp-server.mdx create mode 100644 ai-agents/apis/update-tag.mdx create mode 100644 ai-agents/apis/update-text-detail.mdx create mode 100644 ai-agents/apis/update-third-party-agent.mdx create mode 100644 ai-agents/apis/update-tool.mdx diff --git a/ai-agents/api-explorer.mdx b/ai-agents/api-explorer.mdx new file mode 100644 index 00000000..6023b985 --- /dev/null +++ b/ai-agents/api-explorer.mdx @@ -0,0 +1,45 @@ +--- +title: "AI Agents APIs" +sidebarTitle: "Overview" +--- + +The AI Agents API provides endpoints for creating, configuring, and managing AI-powered agents within your CometChat application. This API enables you to build agents that leverage third-party frameworks (OpenAI, AG2, CrewAI, LangGraph, etc.) or CometChat's native agent builder with tools, MCP servers, API tools, frontend actions, and RAG-based knowledge bases. + +Below is an overview of the key functionalities provided by the AI Agents API: + +1. The Third-Party Agents endpoints allow you to create and manage agents that delegate to external AI frameworks. +2. The CometChat Agents endpoints allow you to create, configure, and manage native CometChat agents with full tool and knowledge base support. +3. The Tool Management endpoints allow you to add, remove, and configure ready-to-use Composio tools, MCP servers, API tools, and frontend actions for your agents. +4. The Variable Management endpoints allow you to manage predefined and custom variables used in agent configurations. +5. The Knowledge Base endpoints allow you to manage file uploads, text details, and website crawling sources for RAG-based agent responses. +6. The Integrations endpoints allow you to manage available AI framework integrations. +7. The Forms endpoints provide dynamic form configurations for agent and tool creation workflows. + +--- + +## API Constraints + + +All endpoints require Basic authentication via the `appid` header unless explicitly marked as public. A few endpoints (such as OAuth callbacks) are public and do not require authentication. + + + + + | Property | Details | + |----------|---------| + | **Type** | Basic authentication | + | **Header** | `appid` | + | **Requirement** | Required on all endpoints unless marked as `@Public` | + | **Admin endpoints** | Some endpoints (integrations, forms management) require admin-level authentication via `AdminAuthGuard` | + + + Many list endpoints support cursor-based pagination with the following parameters: + + | Parameter | Description | + |-----------|-------------| + | **`limit`** | Number of records per page | + | **`affix`** | Direction: `append` (next/older) or `prepend` (previous/newer) | + | **`cursor`** | Pagination cursor for fetching the next or previous page | + | **`search`** | Search filter (where applicable) | + + diff --git a/ai-agents/apis/add-api-tools-to-agent.mdx b/ai-agents/apis/add-api-tools-to-agent.mdx new file mode 100644 index 00000000..4ce051d3 --- /dev/null +++ b/ai-agents/apis/add-api-tools-to-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/api-tools/add +--- diff --git a/ai-agents/apis/add-frontend-actions-to-agent.mdx b/ai-agents/apis/add-frontend-actions-to-agent.mdx new file mode 100644 index 00000000..625ac296 --- /dev/null +++ b/ai-agents/apis/add-frontend-actions-to-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/frontend-actions/add +--- diff --git a/ai-agents/apis/add-knowledge-base-files.mdx b/ai-agents/apis/add-knowledge-base-files.mdx new file mode 100644 index 00000000..42012b75 --- /dev/null +++ b/ai-agents/apis/add-knowledge-base-files.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/add +--- diff --git a/ai-agents/apis/add-mcp-servers-to-agent.mdx b/ai-agents/apis/add-mcp-servers-to-agent.mdx new file mode 100644 index 00000000..5a55fa45 --- /dev/null +++ b/ai-agents/apis/add-mcp-servers-to-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/mcp/add +--- diff --git a/ai-agents/apis/add-tools-to-agent.mdx b/ai-agents/apis/add-tools-to-agent.mdx new file mode 100644 index 00000000..db2a3e1f --- /dev/null +++ b/ai-agents/apis/add-tools-to-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/tools/add +--- diff --git a/ai-agents/apis/authenticate-composio-tool.mdx b/ai-agents/apis/authenticate-composio-tool.mdx new file mode 100644 index 00000000..57ec53ea --- /dev/null +++ b/ai-agents/apis/authenticate-composio-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/authenticate +--- diff --git a/ai-agents/apis/create-agent.mdx b/ai-agents/apis/create-agent.mdx new file mode 100644 index 00000000..ea136b52 --- /dev/null +++ b/ai-agents/apis/create-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/agents +--- diff --git a/ai-agents/apis/create-api-tool.mdx b/ai-agents/apis/create-api-tool.mdx new file mode 100644 index 00000000..833a8214 --- /dev/null +++ b/ai-agents/apis/create-api-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/api-tools +--- diff --git a/ai-agents/apis/create-custom-variable.mdx b/ai-agents/apis/create-custom-variable.mdx new file mode 100644 index 00000000..dbe5b6e5 --- /dev/null +++ b/ai-agents/apis/create-custom-variable.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/agents/variables/custom +--- diff --git a/ai-agents/apis/create-frontend-action.mdx b/ai-agents/apis/create-frontend-action.mdx new file mode 100644 index 00000000..6ba5b596 --- /dev/null +++ b/ai-agents/apis/create-frontend-action.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/frontend-actions +--- diff --git a/ai-agents/apis/create-integration.mdx b/ai-agents/apis/create-integration.mdx new file mode 100644 index 00000000..b93e051d --- /dev/null +++ b/ai-agents/apis/create-integration.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/integrations +--- diff --git a/ai-agents/apis/create-mcp-server.mdx b/ai-agents/apis/create-mcp-server.mdx new file mode 100644 index 00000000..564affd3 --- /dev/null +++ b/ai-agents/apis/create-mcp-server.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/mcp-servers +--- diff --git a/ai-agents/apis/create-tag.mdx b/ai-agents/apis/create-tag.mdx new file mode 100644 index 00000000..eb1bd241 --- /dev/null +++ b/ai-agents/apis/create-tag.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/tags +--- diff --git a/ai-agents/apis/create-text-detail.mdx b/ai-agents/apis/create-text-detail.mdx new file mode 100644 index 00000000..c6fe50b2 --- /dev/null +++ b/ai-agents/apis/create-text-detail.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/knowledge-base/text +--- diff --git a/ai-agents/apis/create-third-party-agent.mdx b/ai-agents/apis/create-third-party-agent.mdx new file mode 100644 index 00000000..15246a83 --- /dev/null +++ b/ai-agents/apis/create-third-party-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agents +--- diff --git a/ai-agents/apis/create-tool.mdx b/ai-agents/apis/create-tool.mdx new file mode 100644 index 00000000..535d26a4 --- /dev/null +++ b/ai-agents/apis/create-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/tools +--- diff --git a/ai-agents/apis/delete-agent.mdx b/ai-agents/apis/delete-agent.mdx new file mode 100644 index 00000000..7ab99dc8 --- /dev/null +++ b/ai-agents/apis/delete-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/agents/{id} +--- diff --git a/ai-agents/apis/delete-api-tool.mdx b/ai-agents/apis/delete-api-tool.mdx new file mode 100644 index 00000000..bf04a9cd --- /dev/null +++ b/ai-agents/apis/delete-api-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/api-tools/{slug} +--- diff --git a/ai-agents/apis/delete-custom-variable.mdx b/ai-agents/apis/delete-custom-variable.mdx new file mode 100644 index 00000000..7bec4b90 --- /dev/null +++ b/ai-agents/apis/delete-custom-variable.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/agents/variables/custom/{variableId} +--- diff --git a/ai-agents/apis/delete-frontend-action.mdx b/ai-agents/apis/delete-frontend-action.mdx new file mode 100644 index 00000000..196fc06a --- /dev/null +++ b/ai-agents/apis/delete-frontend-action.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/frontend-actions/{id} +--- diff --git a/ai-agents/apis/delete-mcp-server.mdx b/ai-agents/apis/delete-mcp-server.mdx new file mode 100644 index 00000000..23745cf7 --- /dev/null +++ b/ai-agents/apis/delete-mcp-server.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/mcp-servers/{slug} +--- diff --git a/ai-agents/apis/delete-text-detail.mdx b/ai-agents/apis/delete-text-detail.mdx new file mode 100644 index 00000000..7c6422e2 --- /dev/null +++ b/ai-agents/apis/delete-text-detail.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/knowledge-base/text/{uniqueId} +--- diff --git a/ai-agents/apis/delete-third-party-agent.mdx b/ai-agents/apis/delete-third-party-agent.mdx new file mode 100644 index 00000000..933f56f3 --- /dev/null +++ b/ai-agents/apis/delete-third-party-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agents/{id} +--- diff --git a/ai-agents/apis/delete-tool.mdx b/ai-agents/apis/delete-tool.mdx new file mode 100644 index 00000000..424e4cb0 --- /dev/null +++ b/ai-agents/apis/delete-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/tools/{name} +--- diff --git a/ai-agents/apis/delete-uploaded-file.mdx b/ai-agents/apis/delete-uploaded-file.mdx new file mode 100644 index 00000000..f53ec690 --- /dev/null +++ b/ai-agents/apis/delete-uploaded-file.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/knowledge-base/uploads/{uniqueId} +--- diff --git a/ai-agents/apis/delete-website.mdx b/ai-agents/apis/delete-website.mdx new file mode 100644 index 00000000..9fff8225 --- /dev/null +++ b/ai-agents/apis/delete-website.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/knowledge-base/website/{uniqueId} +--- diff --git a/ai-agents/apis/enable-tool-actions.mdx b/ai-agents/apis/enable-tool-actions.mdx new file mode 100644 index 00000000..82e3a09e --- /dev/null +++ b/ai-agents/apis/enable-tool-actions.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/add +--- diff --git a/ai-agents/apis/get-action-edit-form.mdx b/ai-agents/apis/get-action-edit-form.mdx new file mode 100644 index 00000000..e6b0efa4 --- /dev/null +++ b/ai-agents/apis/get-action-edit-form.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/forms/action-edit/{name} +--- diff --git a/ai-agents/apis/get-actions-creation-form.mdx b/ai-agents/apis/get-actions-creation-form.mdx new file mode 100644 index 00000000..067a15f7 --- /dev/null +++ b/ai-agents/apis/get-actions-creation-form.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/forms/actions-creation +--- diff --git a/ai-agents/apis/get-actions-form.mdx b/ai-agents/apis/get-actions-form.mdx new file mode 100644 index 00000000..4872f775 --- /dev/null +++ b/ai-agents/apis/get-actions-form.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/forms/actions +--- diff --git a/ai-agents/apis/get-agent-creation-form.mdx b/ai-agents/apis/get-agent-creation-form.mdx new file mode 100644 index 00000000..a9008230 --- /dev/null +++ b/ai-agents/apis/get-agent-creation-form.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/forms/agent-creation +--- diff --git a/ai-agents/apis/get-agent-edit-form.mdx b/ai-agents/apis/get-agent-edit-form.mdx new file mode 100644 index 00000000..93766e4e --- /dev/null +++ b/ai-agents/apis/get-agent-edit-form.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/forms/agent-edit/{id} +--- diff --git a/ai-agents/apis/get-agent.mdx b/ai-agents/apis/get-agent.mdx new file mode 100644 index 00000000..4d8427cd --- /dev/null +++ b/ai-agents/apis/get-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/{id} +--- diff --git a/ai-agents/apis/get-all-available-variables.mdx b/ai-agents/apis/get-all-available-variables.mdx new file mode 100644 index 00000000..30114fdd --- /dev/null +++ b/ai-agents/apis/get-all-available-variables.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/variables/all +--- diff --git a/ai-agents/apis/get-all-tools-for-agent.mdx b/ai-agents/apis/get-all-tools-for-agent.mdx new file mode 100644 index 00000000..dfd5288e --- /dev/null +++ b/ai-agents/apis/get-all-tools-for-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/{agentId}/all-tools +--- diff --git a/ai-agents/apis/get-all-variables.mdx b/ai-agents/apis/get-all-variables.mdx new file mode 100644 index 00000000..c2f3bb5c --- /dev/null +++ b/ai-agents/apis/get-all-variables.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/variables +--- diff --git a/ai-agents/apis/get-api-tool.mdx b/ai-agents/apis/get-api-tool.mdx new file mode 100644 index 00000000..ee77362a --- /dev/null +++ b/ai-agents/apis/get-api-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/api-tools/{slug} +--- diff --git a/ai-agents/apis/get-available-models.mdx b/ai-agents/apis/get-available-models.mdx new file mode 100644 index 00000000..4eca2cf6 --- /dev/null +++ b/ai-agents/apis/get-available-models.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/available-models +--- diff --git a/ai-agents/apis/get-composio-tools.mdx b/ai-agents/apis/get-composio-tools.mdx new file mode 100644 index 00000000..61a21129 --- /dev/null +++ b/ai-agents/apis/get-composio-tools.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/tools/agent/{agentUid} +--- diff --git a/ai-agents/apis/get-custom-variables.mdx b/ai-agents/apis/get-custom-variables.mdx new file mode 100644 index 00000000..22d5de3d --- /dev/null +++ b/ai-agents/apis/get-custom-variables.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/variables/custom +--- diff --git a/ai-agents/apis/get-discovered-urls.mdx b/ai-agents/apis/get-discovered-urls.mdx new file mode 100644 index 00000000..7070ced9 --- /dev/null +++ b/ai-agents/apis/get-discovered-urls.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls +--- diff --git a/ai-agents/apis/get-enabled-items.mdx b/ai-agents/apis/get-enabled-items.mdx new file mode 100644 index 00000000..eafbc6d6 --- /dev/null +++ b/ai-agents/apis/get-enabled-items.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/{agentUid}/enabled-items +--- diff --git a/ai-agents/apis/get-form-fields.mdx b/ai-agents/apis/get-form-fields.mdx new file mode 100644 index 00000000..e29338e1 --- /dev/null +++ b/ai-agents/apis/get-form-fields.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agents/form-fields +--- diff --git a/ai-agents/apis/get-frontend-action.mdx b/ai-agents/apis/get-frontend-action.mdx new file mode 100644 index 00000000..7063cb29 --- /dev/null +++ b/ai-agents/apis/get-frontend-action.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/frontend-actions/{id} +--- diff --git a/ai-agents/apis/get-mcp-server.mdx b/ai-agents/apis/get-mcp-server.mdx new file mode 100644 index 00000000..2f8b4004 --- /dev/null +++ b/ai-agents/apis/get-mcp-server.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/mcp-servers/{slug} +--- diff --git a/ai-agents/apis/get-parent-urls.mdx b/ai-agents/apis/get-parent-urls.mdx new file mode 100644 index 00000000..9cb5ff7c --- /dev/null +++ b/ai-agents/apis/get-parent-urls.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/knowledge-base/parent-urls +--- diff --git a/ai-agents/apis/get-predefined-variables.mdx b/ai-agents/apis/get-predefined-variables.mdx new file mode 100644 index 00000000..7f3f0009 --- /dev/null +++ b/ai-agents/apis/get-predefined-variables.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/variables/predefined +--- diff --git a/ai-agents/apis/get-sitemap-discovered-urls.mdx b/ai-agents/apis/get-sitemap-discovered-urls.mdx new file mode 100644 index 00000000..5d4659ed --- /dev/null +++ b/ai-agents/apis/get-sitemap-discovered-urls.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/knowledge-base/website/site-map/{uniqueId}/discovered-urls +--- diff --git a/ai-agents/apis/get-source-pages.mdx b/ai-agents/apis/get-source-pages.mdx new file mode 100644 index 00000000..2a2888e5 --- /dev/null +++ b/ai-agents/apis/get-source-pages.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/pages +--- diff --git a/ai-agents/apis/get-text-detail.mdx b/ai-agents/apis/get-text-detail.mdx new file mode 100644 index 00000000..2c3b702c --- /dev/null +++ b/ai-agents/apis/get-text-detail.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/knowledge-base/text/{uniqueId} +--- diff --git a/ai-agents/apis/get-tool-actions-for-agent.mdx b/ai-agents/apis/get-tool-actions-for-agent.mdx new file mode 100644 index 00000000..6622aa86 --- /dev/null +++ b/ai-agents/apis/get-tool-actions-for-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions +--- diff --git a/ai-agents/apis/get-tool-actions.mdx b/ai-agents/apis/get-tool-actions.mdx new file mode 100644 index 00000000..17063e41 --- /dev/null +++ b/ai-agents/apis/get-tool-actions.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/tools/{slug}/actions +--- diff --git a/ai-agents/apis/get-tool-configurations.mdx b/ai-agents/apis/get-tool-configurations.mdx new file mode 100644 index 00000000..6317fda2 --- /dev/null +++ b/ai-agents/apis/get-tool-configurations.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/tools/{agentUid}/configurations +--- diff --git a/ai-agents/apis/get-tool-edit-form.mdx b/ai-agents/apis/get-tool-edit-form.mdx new file mode 100644 index 00000000..c3c56a07 --- /dev/null +++ b/ai-agents/apis/get-tool-edit-form.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/forms/tool-edit/{name} +--- diff --git a/ai-agents/apis/get-tool.mdx b/ai-agents/apis/get-tool.mdx new file mode 100644 index 00000000..72baf1a9 --- /dev/null +++ b/ai-agents/apis/get-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/tools/{name} +--- diff --git a/ai-agents/apis/get-tools-creation-form.mdx b/ai-agents/apis/get-tools-creation-form.mdx new file mode 100644 index 00000000..249fff08 --- /dev/null +++ b/ai-agents/apis/get-tools-creation-form.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/forms/tools-creation +--- diff --git a/ai-agents/apis/get-tools-form.mdx b/ai-agents/apis/get-tools-form.mdx new file mode 100644 index 00000000..5bea618f --- /dev/null +++ b/ai-agents/apis/get-tools-form.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/forms/tools +--- diff --git a/ai-agents/apis/get-upcoming-tools.mdx b/ai-agents/apis/get-upcoming-tools.mdx new file mode 100644 index 00000000..a97b82ac --- /dev/null +++ b/ai-agents/apis/get-upcoming-tools.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/tools/upcoming-tools +--- diff --git a/ai-agents/apis/initiate-file-uploads.mdx b/ai-agents/apis/initiate-file-uploads.mdx new file mode 100644 index 00000000..04acaf30 --- /dev/null +++ b/ai-agents/apis/initiate-file-uploads.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/knowledge-base/uploads/initiate +--- diff --git a/ai-agents/apis/kb-delete-integration.mdx b/ai-agents/apis/kb-delete-integration.mdx new file mode 100644 index 00000000..2fcfb4ba --- /dev/null +++ b/ai-agents/apis/kb-delete-integration.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agent-builder/kb/integration/{integrationId}/{uniqueId} +--- diff --git a/ai-agents/apis/kb-generate-auth-url.mdx b/ai-agents/apis/kb-generate-auth-url.mdx new file mode 100644 index 00000000..0f281a26 --- /dev/null +++ b/ai-agents/apis/kb-generate-auth-url.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/kb/integration/{integrationId}/auth-url +--- diff --git a/ai-agents/apis/kb-oauth-callback.mdx b/ai-agents/apis/kb-oauth-callback.mdx new file mode 100644 index 00000000..ed4d944d --- /dev/null +++ b/ai-agents/apis/kb-oauth-callback.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/kb/integration/{integrationId}/oauth +--- diff --git a/ai-agents/apis/kb-trigger-sync.mdx b/ai-agents/apis/kb-trigger-sync.mdx new file mode 100644 index 00000000..ff05facb --- /dev/null +++ b/ai-agents/apis/kb-trigger-sync.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/kb/integration/{integrationId}/{uniqueId}/sync +--- diff --git a/ai-agents/apis/list-agents.mdx b/ai-agents/apis/list-agents.mdx new file mode 100644 index 00000000..83c5d0c0 --- /dev/null +++ b/ai-agents/apis/list-agents.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents +--- diff --git a/ai-agents/apis/list-api-tools.mdx b/ai-agents/apis/list-api-tools.mdx new file mode 100644 index 00000000..e9ea65da --- /dev/null +++ b/ai-agents/apis/list-api-tools.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/api-tools +--- diff --git a/ai-agents/apis/list-frontend-actions.mdx b/ai-agents/apis/list-frontend-actions.mdx new file mode 100644 index 00000000..4b4e1554 --- /dev/null +++ b/ai-agents/apis/list-frontend-actions.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/frontend-actions +--- diff --git a/ai-agents/apis/list-integrations.mdx b/ai-agents/apis/list-integrations.mdx new file mode 100644 index 00000000..1285ca24 --- /dev/null +++ b/ai-agents/apis/list-integrations.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/integrations +--- diff --git a/ai-agents/apis/list-knowledge-base-records.mdx b/ai-agents/apis/list-knowledge-base-records.mdx new file mode 100644 index 00000000..5586a048 --- /dev/null +++ b/ai-agents/apis/list-knowledge-base-records.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/knowledge-base +--- diff --git a/ai-agents/apis/list-mcp-servers.mdx b/ai-agents/apis/list-mcp-servers.mdx new file mode 100644 index 00000000..013fdd6d --- /dev/null +++ b/ai-agents/apis/list-mcp-servers.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/mcp-servers +--- diff --git a/ai-agents/apis/list-text-details.mdx b/ai-agents/apis/list-text-details.mdx new file mode 100644 index 00000000..3423ee21 --- /dev/null +++ b/ai-agents/apis/list-text-details.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/knowledge-base/text +--- diff --git a/ai-agents/apis/list-third-party-agents.mdx b/ai-agents/apis/list-third-party-agents.mdx new file mode 100644 index 00000000..471474bb --- /dev/null +++ b/ai-agents/apis/list-third-party-agents.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agents +--- diff --git a/ai-agents/apis/list-tools.mdx b/ai-agents/apis/list-tools.mdx new file mode 100644 index 00000000..e5c6b459 --- /dev/null +++ b/ai-agents/apis/list-tools.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/tools +--- diff --git a/ai-agents/apis/oauth-redirect-composio.mdx b/ai-agents/apis/oauth-redirect-composio.mdx new file mode 100644 index 00000000..0c74f4bf --- /dev/null +++ b/ai-agents/apis/oauth-redirect-composio.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/tools/auth +--- diff --git a/ai-agents/apis/poll-discovered-urls-status.mdx b/ai-agents/apis/poll-discovered-urls-status.mdx new file mode 100644 index 00000000..b28e053d --- /dev/null +++ b/ai-agents/apis/poll-discovered-urls-status.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/status/poll +--- diff --git a/ai-agents/apis/poll-knowledge-base-status.mdx b/ai-agents/apis/poll-knowledge-base-status.mdx new file mode 100644 index 00000000..a8d419d0 --- /dev/null +++ b/ai-agents/apis/poll-knowledge-base-status.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/knowledge-base/status/poll +--- diff --git a/ai-agents/apis/process-discovered-urls.mdx b/ai-agents/apis/process-discovered-urls.mdx new file mode 100644 index 00000000..9b561e5e --- /dev/null +++ b/ai-agents/apis/process-discovered-urls.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process +--- diff --git a/ai-agents/apis/remove-api-tools-from-agent.mdx b/ai-agents/apis/remove-api-tools-from-agent.mdx new file mode 100644 index 00000000..c2ae8c5f --- /dev/null +++ b/ai-agents/apis/remove-api-tools-from-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/api-tools/remove +--- diff --git a/ai-agents/apis/remove-frontend-actions-from-agent.mdx b/ai-agents/apis/remove-frontend-actions-from-agent.mdx new file mode 100644 index 00000000..7c0556c6 --- /dev/null +++ b/ai-agents/apis/remove-frontend-actions-from-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/frontend-actions/remove +--- diff --git a/ai-agents/apis/remove-knowledge-base-files.mdx b/ai-agents/apis/remove-knowledge-base-files.mdx new file mode 100644 index 00000000..bc733cd6 --- /dev/null +++ b/ai-agents/apis/remove-knowledge-base-files.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/remove +--- diff --git a/ai-agents/apis/remove-mcp-servers-from-agent.mdx b/ai-agents/apis/remove-mcp-servers-from-agent.mdx new file mode 100644 index 00000000..e7fbe272 --- /dev/null +++ b/ai-agents/apis/remove-mcp-servers-from-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/mcp/remove +--- diff --git a/ai-agents/apis/remove-tool-actions.mdx b/ai-agents/apis/remove-tool-actions.mdx new file mode 100644 index 00000000..0091876c --- /dev/null +++ b/ai-agents/apis/remove-tool-actions.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/remove +--- diff --git a/ai-agents/apis/remove-tools-from-agent.mdx b/ai-agents/apis/remove-tools-from-agent.mdx new file mode 100644 index 00000000..562304b2 --- /dev/null +++ b/ai-agents/apis/remove-tools-from-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{agentUid}/tools/remove +--- diff --git a/ai-agents/apis/resync-knowledge-base-source.mdx b/ai-agents/apis/resync-knowledge-base-source.mdx new file mode 100644 index 00000000..c1da3024 --- /dev/null +++ b/ai-agents/apis/resync-knowledge-base-source.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/sync +--- diff --git a/ai-agents/apis/scrape-single-page.mdx b/ai-agents/apis/scrape-single-page.mdx new file mode 100644 index 00000000..12ac66e7 --- /dev/null +++ b/ai-agents/apis/scrape-single-page.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/knowledge-base/website/individual-page +--- diff --git a/ai-agents/apis/scrape-website.mdx b/ai-agents/apis/scrape-website.mdx new file mode 100644 index 00000000..4e87ff06 --- /dev/null +++ b/ai-agents/apis/scrape-website.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/knowledge-base/website/scrape +--- diff --git a/ai-agents/apis/search-agent-tools.mdx b/ai-agents/apis/search-agent-tools.mdx new file mode 100644 index 00000000..268a6a95 --- /dev/null +++ b/ai-agents/apis/search-agent-tools.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agent-builder/agents/{agentId}/tools/search +--- diff --git a/ai-agents/apis/sync-discovered-urls.mdx b/ai-agents/apis/sync-discovered-urls.mdx new file mode 100644 index 00000000..91f50ab3 --- /dev/null +++ b/ai-agents/apis/sync-discovered-urls.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/sync +--- diff --git a/ai-agents/apis/test-api-tool-variables.mdx b/ai-agents/apis/test-api-tool-variables.mdx new file mode 100644 index 00000000..2ffc6b3d --- /dev/null +++ b/ai-agents/apis/test-api-tool-variables.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/agents/{agentId}/api-tools/{slug}/test-variables +--- diff --git a/ai-agents/apis/test-third-party-agent.mdx b/ai-agents/apis/test-third-party-agent.mdx new file mode 100644 index 00000000..dd2390d0 --- /dev/null +++ b/ai-agents/apis/test-third-party-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agents/test +--- diff --git a/ai-agents/apis/test-variable-resolution.mdx b/ai-agents/apis/test-variable-resolution.mdx new file mode 100644 index 00000000..3c2af5af --- /dev/null +++ b/ai-agents/apis/test-variable-resolution.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agent-builder/agents/{agentId}/variables/test +--- diff --git a/ai-agents/apis/update-agent.mdx b/ai-agents/apis/update-agent.mdx new file mode 100644 index 00000000..d9ab3815 --- /dev/null +++ b/ai-agents/apis/update-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/{id} +--- diff --git a/ai-agents/apis/update-api-tool.mdx b/ai-agents/apis/update-api-tool.mdx new file mode 100644 index 00000000..5ce342ff --- /dev/null +++ b/ai-agents/apis/update-api-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/api-tools/{slug} +--- diff --git a/ai-agents/apis/update-custom-variable.mdx b/ai-agents/apis/update-custom-variable.mdx new file mode 100644 index 00000000..7a2c2b0e --- /dev/null +++ b/ai-agents/apis/update-custom-variable.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/agents/variables/custom/{variableId} +--- diff --git a/ai-agents/apis/update-frontend-action.mdx b/ai-agents/apis/update-frontend-action.mdx new file mode 100644 index 00000000..2b97786b --- /dev/null +++ b/ai-agents/apis/update-frontend-action.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/frontend-actions/{id} +--- diff --git a/ai-agents/apis/update-integration.mdx b/ai-agents/apis/update-integration.mdx new file mode 100644 index 00000000..423e86ac --- /dev/null +++ b/ai-agents/apis/update-integration.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/integrations/{id} +--- diff --git a/ai-agents/apis/update-mcp-server.mdx b/ai-agents/apis/update-mcp-server.mdx new file mode 100644 index 00000000..425a8ca6 --- /dev/null +++ b/ai-agents/apis/update-mcp-server.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/mcp-servers/{slug} +--- diff --git a/ai-agents/apis/update-tag.mdx b/ai-agents/apis/update-tag.mdx new file mode 100644 index 00000000..3424307a --- /dev/null +++ b/ai-agents/apis/update-tag.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/tags/{id} +--- diff --git a/ai-agents/apis/update-text-detail.mdx b/ai-agents/apis/update-text-detail.mdx new file mode 100644 index 00000000..28dfd41a --- /dev/null +++ b/ai-agents/apis/update-text-detail.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agent-builder/knowledge-base/text/{uniqueId} +--- diff --git a/ai-agents/apis/update-third-party-agent.mdx b/ai-agents/apis/update-third-party-agent.mdx new file mode 100644 index 00000000..19b40375 --- /dev/null +++ b/ai-agents/apis/update-third-party-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agents/{id} +--- diff --git a/ai-agents/apis/update-tool.mdx b/ai-agents/apis/update-tool.mdx new file mode 100644 index 00000000..55184438 --- /dev/null +++ b/ai-agents/apis/update-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /ai-agents/tools/{name} +--- From 337c4957be65c90b0a537b6321e94e1981c03ae8 Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Wed, 4 Mar 2026 18:09:02 +0530 Subject: [PATCH 03/13] feat: add overview pages for BYO Agent and Agent Builder API sections --- ai-agents/api-explorer.mdx | 50 +++++++++++----------------------- ai-agents/byo-api-explorer.mdx | 23 ++++++++++++++++ docs.json | 1 + 3 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 ai-agents/byo-api-explorer.mdx diff --git a/ai-agents/api-explorer.mdx b/ai-agents/api-explorer.mdx index 6023b985..741ba6ee 100644 --- a/ai-agents/api-explorer.mdx +++ b/ai-agents/api-explorer.mdx @@ -1,45 +1,27 @@ --- -title: "AI Agents APIs" +title: "Agent Builder APIs" sidebarTitle: "Overview" --- -The AI Agents API provides endpoints for creating, configuring, and managing AI-powered agents within your CometChat application. This API enables you to build agents that leverage third-party frameworks (OpenAI, AG2, CrewAI, LangGraph, etc.) or CometChat's native agent builder with tools, MCP servers, API tools, frontend actions, and RAG-based knowledge bases. +The Agent Builder APIs provide endpoints for creating and managing AI agents using CometChat's native agent builder. These APIs enable you to configure agents with tools, MCP servers, custom API tools, frontend actions, and RAG-based knowledge bases — all without writing your own agent orchestration logic. -Below is an overview of the key functionalities provided by the AI Agents API: +Below is an overview of the key functionalities provided by the Agent Builder APIs: -1. The Third-Party Agents endpoints allow you to create and manage agents that delegate to external AI frameworks. -2. The CometChat Agents endpoints allow you to create, configure, and manage native CometChat agents with full tool and knowledge base support. -3. The Tool Management endpoints allow you to add, remove, and configure ready-to-use Composio tools, MCP servers, API tools, and frontend actions for your agents. -4. The Variable Management endpoints allow you to manage predefined and custom variables used in agent configurations. -5. The Knowledge Base endpoints allow you to manage file uploads, text details, and website crawling sources for RAG-based agent responses. -6. The Integrations endpoints allow you to manage available AI framework integrations. -7. The Forms endpoints provide dynamic form configurations for agent and tool creation workflows. +1. The Agents endpoints allow you to create, configure, and manage native CometChat agents with full tool and knowledge base support. +2. The Tools endpoints allow you to browse, add, remove, and configure ready-to-use Composio tools and manage tool actions for your agents. +3. The Custom API Tools endpoints allow you to create and manage custom API-based tools that can be attached to agents. +4. The Frontend Actions endpoints allow you to define and manage UI-triggered actions that agents can perform. +5. The MCP Servers endpoints allow you to create and manage Model Context Protocol servers for your agents. +6. The Knowledge Base endpoints allow you to manage file uploads, text content, website crawling, and RAG sources for agent responses. +7. The Variables endpoints allow you to manage predefined and custom variables used in agent configurations. --- -## API Constraints +## Authentication - -All endpoints require Basic authentication via the `appid` header unless explicitly marked as public. A few endpoints (such as OAuth callbacks) are public and do not require authentication. - +All Agent Builder API endpoints require authentication via an API key passed in the request header. - - - | Property | Details | - |----------|---------| - | **Type** | Basic authentication | - | **Header** | `appid` | - | **Requirement** | Required on all endpoints unless marked as `@Public` | - | **Admin endpoints** | Some endpoints (integrations, forms management) require admin-level authentication via `AdminAuthGuard` | - - - Many list endpoints support cursor-based pagination with the following parameters: - - | Parameter | Description | - |-----------|-------------| - | **`limit`** | Number of records per page | - | **`affix`** | Direction: `append` (next/older) or `prepend` (previous/newer) | - | **`cursor`** | Pagination cursor for fetching the next or previous page | - | **`search`** | Search filter (where applicable) | - - +| Property | Details | +|----------|---------| +| **Header** | `apikey` | +| **Requirement** | Required on all endpoints | diff --git a/ai-agents/byo-api-explorer.mdx b/ai-agents/byo-api-explorer.mdx new file mode 100644 index 00000000..25720512 --- /dev/null +++ b/ai-agents/byo-api-explorer.mdx @@ -0,0 +1,23 @@ +--- +title: "BYO Agent APIs" +sidebarTitle: "Overview" +--- + +The BYO (Bring Your Own) Agent APIs provide endpoints for creating and managing AI agents that integrate with third-party frameworks such as Vercel AI SDK, LangGraph, CrewAI, Mastra, AG2, Agno, and AG-UI. These APIs allow you to register external agents, manage custom tools and actions, and configure available integrations. + +Below is an overview of the key functionalities provided by the BYO Agent APIs: + +1. The Third-Party Agents endpoints allow you to list, update, and delete agents that delegate to external AI frameworks. +2. The Tools endpoints allow you to create, update, and manage custom tools that your BYO agents can use. +3. The Integrations endpoint allows you to retrieve available AI framework integrations supported by CometChat. + +--- + +## Authentication + +All BYO Agent API endpoints require authentication via an API key passed in the request header. + +| Property | Details | +|----------|---------| +| **Header** | `apikey` | +| **Requirement** | Required on all endpoints | diff --git a/docs.json b/docs.json index dcab2ec3..16a0d11e 100644 --- a/docs.json +++ b/docs.json @@ -5107,6 +5107,7 @@ { "tab": "BYO Agent APIs", "pages": [ + "ai-agents/byo-api-explorer", { "group": "Third-Party Agents", "pages": [ From bb2f7e47a4eb5ca79fd4a5953b18d57b1046e787 Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Wed, 4 Mar 2026 22:10:30 +0530 Subject: [PATCH 04/13] feat: enrich AI Agents OpenAPI spec with response schemas, descriptions, and error responses --- ai-agent-service.json | 7479 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 6612 insertions(+), 867 deletions(-) diff --git a/ai-agent-service.json b/ai-agent-service.json index 91e275ee..4a7ed55e 100644 --- a/ai-agent-service.json +++ b/ai-agent-service.json @@ -17,7 +17,122 @@ }, "responses": { "200": { - "description": "" + "description": "Agent created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "agent": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "550e8400-e29b-41d4-a716-446655440000" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "My Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "integrateWith": { + "type": "string", + "example": "openai" + }, + "integrationType": { + "type": "string", + "example": "agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "tool1" + ] + }, + "actions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "action1" + ] + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "integrationMeta": { + "type": "object", + "example": {} + }, + "metaData": { + "type": "object", + "example": {} + }, + "deletedAt": { + "type": "number", + "nullable": true, + "example": null + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or referenced tools/actions not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -27,7 +142,9 @@ ], "tags": [ "Agents" - ] + ], + "description": "Creates a new BYO (bring-your-own) agent that delegates to an external AI framework. Validates that referenced tools and actions exist before creation. Side effects: creates a corresponding bot in CometChat and caches the agent. If the CometChat bot creation fails, the agent record is rolled back.", + "summary": "Create a new third-party integration agent" }, "get": { "operationId": "AgentsController_getAgents", @@ -82,7 +199,54 @@ }, "responses": { "200": { - "description": "Agent updated successfully" + "description": "Agent updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessBooleanResponse" + } + } + } + }, + "400": { + "description": "Bad Request — validation error or referenced tools/actions not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -92,7 +256,9 @@ ], "tags": [ "Agents" - ] + ], + "description": "Updates an existing BYO agent by UID. Validates referenced tools and actions if provided. Runs within a database transaction — if the CometChat bot update fails, changes are rolled back. Side effects: updates the corresponding CometChat bot (name, icon, metaData) and refreshes the cache.", + "summary": "Update a third-party integration agent" }, "delete": { "operationId": "AgentsController_deleteAgent", @@ -108,7 +274,54 @@ ], "responses": { "200": { - "description": "Agent deleted successfully" + "description": "Agent deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "400": { + "description": "Bad Request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -118,7 +331,9 @@ ], "tags": [ "Agents" - ] + ], + "description": "Deletes a BYO agent by UID. Side effects: deletes the corresponding CometChat bot and removes the agent from cache. If the CometChat bot deletion fails, the agent is still deleted from the database. Requires appid header.", + "summary": "Delete a third-party integration agent" } }, "/ai-agents/tools": { @@ -137,7 +352,107 @@ }, "responses": { "200": { - "description": "" + "description": "Tool created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_myTool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "myTool" + }, + "type": { + "type": "string", + "enum": [ + "action", + "tool" + ], + "example": "action" + }, + "displayName": { + "type": "string", + "example": "My Tool" + }, + "executionText": { + "type": "string", + "example": "Running my tool..." + }, + "doNotExecute": { + "type": "boolean", + "example": false + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "myTool" + }, + "description": { + "type": "string", + "example": "A helpful tool" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate tool name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -147,7 +462,9 @@ ], "tags": [ "Tools" - ] + ], + "description": "Creates a new tool or action for the application. The tool name must be unique per application — duplicate names return a 400 error. The type field is auto-assigned: \"tool\" when doNotExecute is true, \"action\" otherwise. Side effects: caches the created tool and invalidates the all-tools cache for the application.", + "summary": "Create a new tool" }, "get": { "operationId": "ToolsController_getAllTools", @@ -168,48 +485,117 @@ ], "responses": { "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Tools" - ] - } - }, - "/ai-agents/tools/{name}": { - "get": { - "operationId": "ToolsController_getToolByName", - "parameters": [ - { - "name": "name", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "security": [ + "description": "List of tools", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_myTool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "myTool" + }, + "type": { + "type": "string", + "enum": [ + "action", + "tool" + ], + "example": "action" + }, + "displayName": { + "type": "string", + "example": "My Tool" + }, + "executionText": { + "type": "string", + "example": "Running my tool..." + }, + "doNotExecute": { + "type": "boolean", + "example": false + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "myTool" + }, + "description": { + "type": "string", + "example": "A helpful tool" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ { "apiKey": [] } ], "tags": [ "Tools" - ] - }, - "put": { - "operationId": "ToolsController_updateTool", + ], + "description": "Retrieves all tools for the application. Optionally filter by type (\"action\" or \"tool\") using the type query parameter. Results are cached per application — subsequent requests are served from cache until invalidated. Requires appid header.", + "summary": "List all tools" + } + }, + "/ai-agents/tools/{name}": { + "get": { + "operationId": "ToolsController_getToolByName", "parameters": [ { "name": "name", @@ -220,19 +606,119 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolDto" - } - } - } - }, "responses": { "200": { - "description": "" + "description": "Tool details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_myTool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "myTool" + }, + "type": { + "type": "string", + "enum": [ + "action", + "tool" + ], + "example": "action" + }, + "displayName": { + "type": "string", + "example": "My Tool" + }, + "executionText": { + "type": "string", + "example": "Running my tool..." + }, + "doNotExecute": { + "type": "boolean", + "example": false + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "myTool" + }, + "description": { + "type": "string", + "example": "A helpful tool" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid tool name parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — tool with the given name does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -242,10 +728,12 @@ ], "tags": [ "Tools" - ] + ], + "description": "Retrieves a single tool by its unique name within the application. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no tool with the given name exists. Requires appid header.", + "summary": "Get a tool by name" }, - "delete": { - "operationId": "ToolsController_deleteTool", + "put": { + "operationId": "ToolsController_updateTool", "parameters": [ { "name": "name", @@ -256,38 +744,129 @@ } } ], - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Tools" - ] - } - }, - "/ai-agents/integrations": { - "post": { - "operationId": "IntegrationsController_createIntegration", - "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateIntegrationDto" + "$ref": "#/components/schemas/ToolDto" } } } }, "responses": { "200": { - "description": "" + "description": "Tool updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_myTool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "myTool" + }, + "type": { + "type": "string", + "enum": [ + "action", + "tool" + ], + "example": "action" + }, + "displayName": { + "type": "string", + "example": "My Tool" + }, + "executionText": { + "type": "string", + "example": "Running my tool..." + }, + "doNotExecute": { + "type": "boolean", + "example": false + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "myTool" + }, + "description": { + "type": "string", + "example": "A helpful tool" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or attempt to change tool name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — tool with the given name does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -296,23 +875,168 @@ } ], "tags": [ - "Integrations" - ] + "Tools" + ], + "description": "Updates an existing tool by its unique name. The tool name cannot be changed — attempting to update the name field to a different value returns a 400 error. Merges the update with existing tool data for the nested tool object (name, description, parameters). Side effects: updates the tool cache and invalidates the all-tools cache for the application. Returns 404 if no tool with the given name exists. Requires appid header.", + "summary": "Update a tool by name" }, - "get": { - "operationId": "IntegrationsController_getIntegrations", + "delete": { + "operationId": "ToolsController_deleteTool", "parameters": [ { - "name": "type", - "required": false, - "in": "query", - "description": "Optional integration type", + "name": "name", + "required": true, + "in": "path", "schema": { "type": "string" } - }, - { - "name": "isActive", + } + ], + "responses": { + "200": { + "description": "Tool deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletedResponse" + } + } + } + }, + "400": { + "description": "Bad Request — invalid tool name parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — tool with the given name does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ], + "description": "Deletes a tool by its unique name within the application. Side effects: removes the tool from cache and invalidates the all-tools cache for the application. Returns 404 if no tool with the given name exists. Requires appid header.", + "summary": "Delete a tool by name" + } + }, + "/ai-agents/integrations": { + "post": { + "operationId": "IntegrationsController_createIntegration", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationDto" + } + } + } + }, + "responses": { + "200": { + "description": "Integration created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessBooleanResponse" + } + } + } + }, + "400": { + "description": "Bad Request — validation error or invalid integration data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid admin API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Integrations" + ], + "description": "Registers a new AI framework integration (e.g., OpenAI, CrewAI, LangGraph). This endpoint is admin-only and uses AdminAuthGuard instead of the standard auth guard. Side effects: caches the newly created integration record. Requires admin API key authentication.", + "summary": "Create a new AI framework integration" + }, + "get": { + "operationId": "IntegrationsController_getIntegrations", + "parameters": [ + { + "name": "type", + "required": false, + "in": "query", + "description": "Optional integration type", + "schema": { + "type": "string" + } + }, + { + "name": "isActive", "required": false, "in": "query", "description": "Optional active status", @@ -323,7 +1047,88 @@ ], "responses": { "200": { - "description": "" + "description": "List of integrations matching the filter criteria", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "openai" + }, + "name": { + "type": "string", + "example": "OpenAI" + }, + "icon": { + "type": "string", + "example": "https://example.com/openai-icon.png" + }, + "type": { + "type": "string", + "enum": [ + "agent", + "llm" + ], + "example": "agent" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + }, + "metaData": { + "type": "object", + "example": {} + }, + "appId": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -333,7 +1138,9 @@ ], "tags": [ "Integrations" - ] + ], + "description": "Retrieves all available AI framework integrations, optionally filtered by type and active status. Results include populated tag objects via a database lookup. When an appid header is provided, results are scoped to integrations available for that app. Requires appid header for app-scoped filtering.", + "summary": "List available AI framework integrations" } }, "/ai-agents/agent-builder/agents/available-models": { @@ -342,7 +1149,55 @@ "parameters": [], "responses": { "200": { - "description": "" + "description": "List of available AI models", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "provider": { + "type": "string", + "example": "openai" + }, + "settings": { + "type": "object", + "example": {} + }, + "default": { + "type": "boolean", + "example": false + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -353,7 +1208,8 @@ "summary": "Get available models", "tags": [ "Agent Builder" - ] + ], + "description": "Retrieves the list of AI models available for CometChat native agents. Each model includes its provider, configuration settings, and whether it is the default model. The default model is used when no model is explicitly specified during agent creation. Requires appid header." } }, "/ai-agents/agent-builder/agents/variables/all": { @@ -372,7 +1228,80 @@ ], "responses": { "200": { - "description": "" + "description": "List of variables (flat array or grouped by category)", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "sourceType": { + "type": "string" + }, + "category": { + "type": "string" + }, + "usageCount": { + "type": "number" + }, + "usedByAgents": { + "type": "array", + "items": { + "type": "object" + } + }, + "usedByTools": { + "type": "object" + } + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object" + } + }, + "example": { + "auth": [], + "custom": [] + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -383,7 +1312,8 @@ "summary": "Get all available variables for an app", "tags": [ "Agent Builder" - ] + ], + "description": "Retrieves all enabled variables (predefined + custom) for the application. Each variable includes usage information: which agents reference it in their instructions and which API tools use it. When groupByCategory is true, results are grouped by category (e.g., auth, custom) as an object; otherwise returned as a flat array. Requires appid header." } }, "/ai-agents/agent-builder/agents/{agentId}/tools/search": { @@ -420,8 +1350,68 @@ ], "responses": { "200": { - "description": "" - } + "description": "Aggregated search results from all tool sources", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "results": { + "type": "array", + "items": { + "type": "object" + }, + "example": [] + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid search parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } }, "security": [ { @@ -431,7 +1421,8 @@ "summary": "Search across ready to use tool actions, api tools and mcp for an agent", "tags": [ "Agent Builder" - ] + ], + "description": "Searches across all tool types enabled for an agent: Composio ready-to-use tool actions, custom API tools, and MCP servers. Results are aggregated from all three sources into a single results array. Use the key parameter to filter by name, description, or slug, and the slug parameter to filter by a specific integration." } }, "/ai-agents/agent-builder/agents/{agentUid}/enabled-items": { @@ -508,7 +1499,207 @@ ], "responses": { "200": { - "description": "" + "description": "Categorized enabled items for the agent", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "tools": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + } + } + }, + "frontendActions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "triggerFunction": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + }, + "apiTools": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "method": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + }, + "mcpServers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid query parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -519,7 +1710,8 @@ "summary": "Get enabled items (tools, frontend actions, API tools, MCP servers) for an agent", "tags": [ "Agent Builder" - ] + ], + "description": "Retrieves all enabled items for a specific agent, categorized by type: Composio tools (with their actions), frontend actions, API tools, and MCP servers. Each category can be individually toggled via query parameters. Use the key parameter to filter results by name or description across all categories. Returns 404 if the agent does not exist. Requires appid header." } }, "/ai-agents/agent-builder/agents": { @@ -538,7 +1730,168 @@ }, "responses": { "200": { - "description": "" + "description": "Agent created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "agent": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -549,7 +1902,8 @@ "summary": "Create a new agent", "tags": [ "Agent Builder" - ] + ], + "description": "Creates a new CometChat native agent with optional tools, API tools, MCP servers, and frontend actions. Validates that all referenced tools, API tools, and MCP servers exist before creation. Side effects: creates a corresponding bot in CometChat and caches the agent. If the CometChat bot creation fails, the agent record is rolled back. The default AI model is assigned if none is specified." }, "get": { "operationId": "AgentBuilderController_findAll", @@ -594,10 +1948,204 @@ ], "responses": { "200": { - "description": "" - } - }, - "security": [ + "description": "Paginated list of agents", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "count": { + "type": "number" + } + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ { "apiKey": [] } @@ -605,7 +2153,8 @@ "summary": "Get all agents for an app", "tags": [ "Agent Builder" - ] + ], + "description": "Retrieves a paginated list of CometChat native agents for the application. Supports cursor-based pagination using createdAt timestamps with prepend/append navigation. Use the search parameter to filter agents by name, description, or UID. Results are sorted by creation date in descending order. The appId field is excluded from the response for brevity." } }, "/ai-agents/agent-builder/agents/{id}": { @@ -624,7 +2173,163 @@ ], "responses": { "200": { - "description": "" + "description": "Agent details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -635,7 +2340,8 @@ "summary": "Get an agent by UID", "tags": [ "Agent Builder" - ] + ], + "description": "Retrieves a single CometChat native agent by its unique identifier. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no agent with the given UID exists." }, "patch": { "operationId": "AgentBuilderController_update", @@ -662,7 +2368,54 @@ }, "responses": { "200": { - "description": "" + "description": "Agent updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessBooleanResponse" + } + } + } + }, + "400": { + "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -673,7 +2426,8 @@ "summary": "Update an agent by UID", "tags": [ "Agent Builder" - ] + ], + "description": "Updates an existing CometChat native agent by UID. Validates referenced tools, API tools, and MCP servers if provided. Runs within a database transaction — if the CometChat bot update fails, changes are rolled back. Side effects: updates the corresponding CometChat bot (name, icon, metaData), refreshes the cache, and recalculates formattedInstruction if instruction changes." }, "delete": { "operationId": "AgentBuilderController_remove", @@ -690,9 +2444,46 @@ ], "responses": { "200": { - "description": "" - } - }, + "description": "Agent deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, "security": [ { "apiKey": [] @@ -701,7 +2492,8 @@ "summary": "Delete an agent by UID", "tags": [ "Agent Builder" - ] + ], + "description": "Deletes a CometChat native agent by UID. Side effects: deletes the corresponding CometChat bot and removes the agent from cache. If the CometChat bot deletion fails, the agent is still deleted from the database." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/add": { @@ -730,87 +2522,182 @@ }, "responses": { "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add tools to an agent", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/remove": { - "patch": { - "operationId": "AgentBuilderController_removeToolsFromAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" + "description": "Tools successfully added to the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentToolsDto" + }, + "400": { + "description": "Bad Request — invalid tool slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } - } - }, - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove tools from an agent", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/mcp/add": { - "patch": { - "operationId": "AgentBuilderController_addMcpServersToAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentMcpDto" + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } - } - }, - "responses": { - "200": { - "description": "" } }, "security": [ @@ -818,15 +2705,16 @@ "apiKey": [] } ], - "summary": "Add MCP servers to an agent", + "summary": "Add tools to an agent", "tags": [ "Agent Builder" - ] + ], + "description": "Adds one or more Composio tools to the specified CometChat native agent by UID. The tools array in the request body contains tool slug identifiers. Invalidates the cached agent data after a successful update. Returns the updated agent object." } }, - "/ai-agents/agent-builder/agents/{agentUid}/mcp/remove": { + "/ai-agents/agent-builder/agents/{agentUid}/tools/remove": { "patch": { - "operationId": "AgentBuilderController_removeMcpServersFromAgent", + "operationId": "AgentBuilderController_removeToolsFromAgent", "parameters": [ { "name": "agentUid", @@ -843,208 +2731,215 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ManageAgentMcpDto" + "$ref": "#/components/schemas/ManageAgentToolsDto" } } } }, "responses": { "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove MCP servers from an agent", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/api-tools/add": { - "patch": { - "operationId": "AgentBuilderController_addApiToolsToAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentApiToolsDto" + "description": "Tools successfully removed from the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } } } - } - }, - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add API tools to an agent", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/api-tools/remove": { - "patch": { - "operationId": "AgentBuilderController_removeApiToolsFromAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentApiToolsDto" + }, + "400": { + "description": "Bad Request — invalid tool slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } - } - }, - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove API tools from an agent", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/add": { - "patch": { - "operationId": "AgentBuilderController_addFrontendActionsToAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } - } - }, - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add frontend actions to an agent", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/remove": { - "patch": { - "operationId": "AgentBuilderController_removeFrontendActionsFromAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } } }, - "responses": { - "200": { - "description": "" - } - }, "security": [ { "apiKey": [] } ], - "summary": "Remove frontend actions from an agent", + "summary": "Remove tools from an agent", "tags": [ "Agent Builder" - ] + ], + "description": "Removes one or more Composio tools from the specified CometChat native agent by UID. The tools array in the request body contains tool slug identifiers to remove. Invalidates the cached agent data after a successful update. Returns the updated agent object." } }, - "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/add": { + "/ai-agents/agent-builder/agents/{agentUid}/mcp/add": { "patch": { - "operationId": "AgentBuilderController_addFilesToKnowledgeBase", + "operationId": "AgentBuilderController_addMcpServersToAgent", "parameters": [ { - "name": "agentId", + "name": "agentUid", "required": true, "in": "path", "description": "Unique identifier of the agent", "schema": { "type": "string" } - }, - { - "name": "sourceType", - "required": true, - "in": "path", - "description": "Source type (uploads, knowledge-base, etc.)", - "schema": { - "type": "string" - } } ], "requestBody": { @@ -1052,121 +2947,189 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" + "$ref": "#/components/schemas/ManageAgentMcpDto" } } } }, "responses": { "200": { - "description": "Files added to knowledge base successfully" - }, - "400": { - "description": "Bad request - validation error" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add files to agent knowledge base", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/remove": { - "patch": { - "operationId": "AgentBuilderController_removeFilesFromKnowledgeBase", - "parameters": [ - { - "name": "agentId", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - }, - { - "name": "sourceType", - "required": true, - "in": "path", - "description": "Source type (uploads, knowledge-base, etc.)", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" + "description": "MCP servers successfully added to the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } } } - } - }, - "responses": { - "200": { - "description": "Files removed from knowledge base successfully" }, "400": { - "description": "Bad request - validation error" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove files from agent knowledge base", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/add": { - "patch": { - "operationId": "AgentBuilderController_addActionsToTool", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" + "description": "Bad Request — invalid MCP server slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, - { - "name": "slug", - "required": true, - "in": "path", - "description": "Tool slug (e.g., gmail, googlesheets)", - "schema": { - "type": "string" + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageActionsDto" + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } - } - }, - "responses": { - "200": { - "description": "Actions added successfully" }, - "400": { - "description": "Bad request - validation error" + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -1174,30 +3137,22 @@ "apiKey": [] } ], - "summary": "Enable actions for a tool", + "summary": "Add MCP servers to an agent", "tags": [ "Agent Builder" - ] + ], + "description": "Adds one or more MCP (Model Context Protocol) servers to the specified CometChat native agent by UID. The mcps array in the request body contains MCP server slug identifiers. Invalidates the cached agent data after a successful update. Returns the updated agent object. Requires appid header." } }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/remove": { + "/ai-agents/agent-builder/agents/{agentUid}/mcp/remove": { "patch": { - "operationId": "AgentBuilderController_removeActionsFromTool", + "operationId": "AgentBuilderController_removeMcpServersFromAgent", "parameters": [ { "name": "agentUid", "required": true, "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": true, - "in": "path", - "description": "Tool slug (e.g., gmail, googlesheets)", + "description": "Unique identifier of the agent", "schema": { "type": "string" } @@ -1208,65 +3163,2463 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ManageActionsDto" + "$ref": "#/components/schemas/ManageAgentMcpDto" } } } }, "responses": { "200": { - "description": "Actions removed successfully" - }, - "400": { - "description": "Bad request - validation error" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove actions for a tool", - "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/variables/custom": { - "get": { - "operationId": "AgentBuilderController_getAllCustomVariables", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], + "description": "MCP servers successfully removed from the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid MCP server slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove MCP servers from an agent", + "tags": [ + "Agent Builder" + ], + "description": "Removes one or more MCP (Model Context Protocol) servers from the specified CometChat native agent by UID. The mcps array in the request body contains MCP server slug identifiers to remove. Invalidates the cached agent data after a successful update. Returns the updated agent object. Requires appid header." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/api-tools/add": { + "patch": { + "operationId": "AgentBuilderController_addApiToolsToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentApiToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "API tools successfully added to the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid API tool slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add API tools to an agent", + "tags": [ + "Agent Builder" + ], + "description": "Adds one or more custom API tools to the specified CometChat native agent by UID. The apiTools array in the request body contains API tool slug identifiers. Invalidates the cached agent data after a successful update. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/api-tools/remove": { + "patch": { + "operationId": "AgentBuilderController_removeApiToolsFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentApiToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "API tools successfully removed from the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid API tool slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove API tools from an agent", + "tags": [ + "Agent Builder" + ], + "description": "Removes one or more custom API tools from the specified CometChat native agent by UID. The apiTools array in the request body contains API tool slug identifiers to remove. Invalidates the cached agent data after a successful update. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/add": { + "patch": { + "operationId": "AgentBuilderController_addFrontendActionsToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Frontend actions successfully added to the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid frontend action identifiers or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add frontend actions to an agent", + "tags": [ + "Agent Builder" + ], + "description": "Adds one or more frontend actions to the specified CometChat native agent by UID. The frontendActions array in the request body contains frontend action identifiers. Frontend actions allow agents to trigger client-side UI operations. Invalidates the cached agent data after a successful update. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/remove": { + "patch": { + "operationId": "AgentBuilderController_removeFrontendActionsFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Frontend actions successfully removed from the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid frontend action identifiers or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove frontend actions from an agent", + "tags": [ + "Agent Builder" + ], + "description": "Removes one or more frontend actions from the specified CometChat native agent by UID. The frontendActions array in the request body contains frontend action identifiers to remove. Invalidates the cached agent data after a successful update. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/add": { + "patch": { + "operationId": "AgentBuilderController_addFilesToKnowledgeBase", + "parameters": [ + { + "name": "agentId", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + }, + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" + } + } + } + }, + "responses": { + "200": { + "description": "Files added to knowledge base successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add files to agent knowledge base", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/remove": { + "patch": { + "operationId": "AgentBuilderController_removeFilesFromKnowledgeBase", + "parameters": [ + { + "name": "agentId", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + }, + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" + } + } + } + }, + "responses": { + "200": { + "description": "Files removed from knowledge base successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove files from agent knowledge base", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/add": { + "patch": { + "operationId": "AgentBuilderController_addActionsToTool", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Tool slug (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Actions added successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Enable actions for a tool", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/remove": { + "patch": { + "operationId": "AgentBuilderController_removeActionsFromTool", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Tool slug (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Actions removed successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove actions for a tool", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/variables/custom": { + "get": { + "operationId": "AgentBuilderController_getAllCustomVariables", + "parameters": [], + "responses": { + "200": { + "description": "List of custom variables", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "507f1f77bcf86cd799439011" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "user.plan" + }, + "description": { + "type": "string", + "example": "The user subscription plan" + }, + "sourceType": { + "type": "string", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" + }, + "sourcePath": { + "type": "string", + "example": "metadata.plan" + }, + "constantValue": { + "type": "string", + "example": "" + }, + "defaultValue": { + "type": "string", + "example": "free" + }, + "category": { + "type": "string", + "enum": [ + "custom" + ], + "example": "custom" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], "summary": "Get all custom variables for the app", "tags": [ - "Agent Builder" - ] + "Agent Builder" + ], + "description": "Retrieves all custom variables defined for the application. Custom variables allow dynamic value injection into agent instructions using metadata from messages, users, or constant values. Each variable includes its source type, resolution path, and default value. Requires appid header." + }, + "post": { + "operationId": "AgentBuilderController_createCustomVariable", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCustomVariableDto" + } + } + } + }, + "responses": { + "201": { + "description": "Custom variable created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "507f1f77bcf86cd799439011" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "user.plan" + }, + "description": { + "type": "string", + "example": "The user subscription plan" + }, + "sourceType": { + "type": "string", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" + }, + "sourcePath": { + "type": "string", + "example": "metadata.plan" + }, + "constantValue": { + "type": "string", + "example": "" + }, + "defaultValue": { + "type": "string", + "example": "free" + }, + "category": { + "type": "string", + "enum": [ + "custom" + ], + "example": "custom" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate variable name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create a new custom variable", + "tags": [ + "Agent Builder" + ], + "description": "Creates a new custom variable for the application. Custom variables can source their values from message metadata, user metadata, or a constant value. Variable names must be unique within the app and follow the pattern [a-zA-Z][a-zA-Z0-9_.]*. Requires appid header." + } + }, + "/ai-agents/agent-builder/agents/variables/custom/{variableId}": { + "patch": { + "operationId": "AgentBuilderController_updateCustomVariable", + "parameters": [ + { + "name": "variableId", + "required": true, + "in": "path", + "description": "Variable ID to update", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCustomVariableDto" + } + } + } + }, + "responses": { + "200": { + "description": "Custom variable updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "507f1f77bcf86cd799439011" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "user.plan" + }, + "description": { + "type": "string", + "example": "The user subscription plan" + }, + "sourceType": { + "type": "string", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" + }, + "sourcePath": { + "type": "string", + "example": "metadata.plan" + }, + "constantValue": { + "type": "string", + "example": "" + }, + "defaultValue": { + "type": "string", + "example": "free" + }, + "category": { + "type": "string", + "enum": [ + "custom" + ], + "example": "custom" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — custom variable with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update a custom variable", + "tags": [ + "Agent Builder" + ], + "description": "Updates an existing custom variable by its ID. Only the provided fields are updated; omitted fields remain unchanged. The variable name cannot be changed after creation. Requires appid header." + }, + "delete": { + "operationId": "AgentBuilderController_deleteCustomVariable", + "parameters": [ + { + "name": "variableId", + "required": true, + "in": "path", + "description": "Variable ID to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Custom variable deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — custom variable with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete a custom variable", + "tags": [ + "Agent Builder" + ], + "description": "Deletes a custom variable by its ID. Once deleted, any agent instructions referencing this variable will no longer resolve its value. Requires appid header." + } + }, + "/ai-agents/agent-builder/api-tools": { + "get": { + "operationId": "ApiToolsController_getAllApiTools", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Paginated list of API tools", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-api-tool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-api-tool" + }, + "name": { + "type": "string", + "example": "My API Tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "endpoint": { + "type": "string", + "example": "https://api.example.com/search" + }, + "method": { + "type": "string", + "example": "GET" + }, + "enableBasicAuth": { + "type": "boolean", + "example": false + }, + "headers": { + "type": "string", + "nullable": true, + "example": "{\"Content-Type\":\"application/json\"}" + }, + "bodyTemplate": { + "type": "string", + "nullable": true, + "example": "{\"query\":\"{{query}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "example": false + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "query" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The search query" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "my-api-tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "example": { + "limit": 10, + "count": 5 + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all api-tools for an app", + "tags": [ + "Agent Builder API Tools" + ], + "description": "Retrieves a paginated list of API tools for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend to fetch the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page. Requires appid header." + }, + "post": { + "operationId": "ApiToolsController_createApiTool", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "API tool created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-api-tool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-api-tool" + }, + "name": { + "type": "string", + "example": "My API Tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "endpoint": { + "type": "string", + "example": "https://api.example.com/search" + }, + "method": { + "type": "string", + "example": "GET" + }, + "enableBasicAuth": { + "type": "boolean", + "example": false + }, + "headers": { + "type": "string", + "nullable": true, + "example": "{\"Content-Type\":\"application/json\"}" + }, + "bodyTemplate": { + "type": "string", + "nullable": true, + "example": "{\"query\":\"{{query}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "example": false + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "query" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The search query" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "my-api-tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate slug.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ], + "description": "Creates a new API tool configuration for the application. The slug must be unique per application — duplicate slugs return a 400 error. A tool object is auto-generated from the provided parameters, description, and slug via a pre-save hook. Side effects: caches the created API tool and invalidates the all-api-tools cache for the application. Requires appid header.", + "summary": "Create a new API tool" + } + }, + "/ai-agents/agent-builder/api-tools/{slug}": { + "get": { + "operationId": "ApiToolsController_getApiToolBySlug", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "API tool details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-api-tool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-api-tool" + }, + "name": { + "type": "string", + "example": "My API Tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "endpoint": { + "type": "string", + "example": "https://api.example.com/search" + }, + "method": { + "type": "string", + "example": "GET" + }, + "enableBasicAuth": { + "type": "boolean", + "example": false + }, + "headers": { + "type": "string", + "nullable": true, + "example": "{\"Content-Type\":\"application/json\"}" + }, + "bodyTemplate": { + "type": "string", + "nullable": true, + "example": "{\"query\":\"{{query}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "example": false + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "query" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The search query" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "my-api-tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid slug parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — API tool with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ], + "description": "Retrieves a single API tool by its unique slug within the application. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no API tool with the given slug exists. Requires appid header.", + "summary": "Get an API tool by slug" }, - "post": { - "operationId": "AgentBuilderController_createCustomVariable", - "parameters": [], + "patch": { + "operationId": "ApiToolsController_updateApiTool", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateCustomVariableDto" + "$ref": "#/components/schemas/UpdateApiToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "API tool updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-api-tool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-api-tool" + }, + "name": { + "type": "string", + "example": "My API Tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "endpoint": { + "type": "string", + "example": "https://api.example.com/search" + }, + "method": { + "type": "string", + "example": "GET" + }, + "enableBasicAuth": { + "type": "boolean", + "example": false + }, + "headers": { + "type": "string", + "nullable": true, + "example": "{\"Content-Type\":\"application/json\"}" + }, + "bodyTemplate": { + "type": "string", + "nullable": true, + "example": "{\"query\":\"{{query}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "example": false + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "query" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The search query" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "my-api-tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — API tool with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } - } - }, - "responses": { - "201": { - "description": "" } }, "security": [ @@ -1274,39 +5627,74 @@ "apiKey": [] } ], - "summary": "Create a new custom variable", "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/agents/variables/custom/{variableId}": { - "patch": { - "operationId": "AgentBuilderController_updateCustomVariable", + "Agent Builder API Tools" + ], + "description": "Updates an existing API tool by its unique slug. The tool object is automatically regenerated from the updated parameters and description via a pre-update hook. Side effects: updates the API tool cache and invalidates the all-api-tools cache for the application. Returns 404 if no API tool with the given slug exists. Requires appid header.", + "summary": "Update an API tool by slug" + }, + "delete": { + "operationId": "ApiToolsController_deleteApiTool", "parameters": [ { - "name": "variableId", + "name": "slug", "required": true, "in": "path", - "description": "Variable ID to update", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateCustomVariableDto" - } - } - } - }, "responses": { "200": { - "description": "" + "description": "API tool deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "400": { + "description": "Bad Request — invalid slug parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — API tool with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -1314,27 +5702,105 @@ "apiKey": [] } ], - "summary": "Update a custom variable", "tags": [ - "Agent Builder" - ] - }, - "delete": { - "operationId": "AgentBuilderController_deleteCustomVariable", - "parameters": [ - { - "name": "variableId", - "required": true, - "in": "path", - "description": "Variable ID to delete", - "schema": { - "type": "string" + "Agent Builder API Tools" + ], + "description": "Deletes an API tool by its unique slug within the application. Side effects: removes the API tool from cache and invalidates the all-api-tools cache for the application. Returns 404 if no API tool with the given slug exists. Requires appid header.", + "summary": "Delete an API tool by slug" + } + }, + "/ai-agents/agent-builder/mcp-servers": { + "post": { + "operationId": "McpServersController_createMcpServer", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMcpServerDto" + } } } - ], + }, "responses": { "200": { - "description": "" + "description": "MCP server created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-mcp-server" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-mcp-server" + }, + "name": { + "type": "string", + "example": "My MCP Server" + }, + "description": { + "type": "string", + "example": "A Model Context Protocol server" + }, + "url": { + "type": "string", + "example": "https://mcp.example.com/sse" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate slug.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -1342,15 +5808,14 @@ "apiKey": [] } ], - "summary": "Delete a custom variable", "tags": [ - "Agent Builder" - ] - } - }, - "/ai-agents/agent-builder/api-tools": { + "Agent Builder MCP Servers" + ], + "description": "Creates a new Model Context Protocol server configuration for the application. The slug must be unique per application — duplicate slugs return a 400 error. Side effects: caches the created MCP server and invalidates the all-mcp-servers cache for the application. Requires appid header.", + "summary": "Create a new MCP server" + }, "get": { - "operationId": "ApiToolsController_getAllApiTools", + "operationId": "McpServersController_getAllMcpServers", "parameters": [ { "name": "limit", @@ -1379,54 +5844,137 @@ "schema": { "type": "number" } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get all api-tools for an app", - "tags": [ - "Agent Builder API Tools" - ] - }, - "post": { - "operationId": "ApiToolsController_createApiTool", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateApiToolDto" + } + ], + "responses": { + "200": { + "description": "Paginated list of MCP servers", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-mcp-server" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-mcp-server" + }, + "name": { + "type": "string", + "example": "My MCP Server" + }, + "description": { + "type": "string", + "example": "A Model Context Protocol server" + }, + "url": { + "type": "string", + "example": "https://mcp.example.com/sse" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "example": { + "limit": 10, + "count": 5 + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } } }, - "responses": { - "200": { - "description": "" - } - }, "security": [ { "apiKey": [] } ], "tags": [ - "Agent Builder API Tools" - ] + "Agent Builder MCP Servers" + ], + "description": "Retrieves a paginated list of MCP servers for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend to fetch the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page. Requires appid header.", + "summary": "Get all MCP servers for an app" } }, - "/ai-agents/agent-builder/api-tools/{slug}": { + "/ai-agents/agent-builder/mcp-servers/{slug}": { "get": { - "operationId": "ApiToolsController_getApiToolBySlug", + "operationId": "McpServersController_getMcpServerBySlug", "parameters": [ { "name": "slug", @@ -1439,7 +5987,92 @@ ], "responses": { "200": { - "description": "" + "description": "MCP server details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-mcp-server" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-mcp-server" + }, + "name": { + "type": "string", + "example": "My MCP Server" + }, + "description": { + "type": "string", + "example": "A Model Context Protocol server" + }, + "url": { + "type": "string", + "example": "https://mcp.example.com/sse" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid slug parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — MCP server with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -1448,11 +6081,13 @@ } ], "tags": [ - "Agent Builder API Tools" - ] + "Agent Builder MCP Servers" + ], + "description": "Retrieves a single MCP server by its unique slug within the application. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no MCP server with the given slug exists. Requires appid header.", + "summary": "Get an MCP server by slug" }, "patch": { - "operationId": "ApiToolsController_updateApiTool", + "operationId": "McpServersController_updateMcpServer", "parameters": [ { "name": "slug", @@ -1468,14 +6103,99 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateApiToolDto" + "$ref": "#/components/schemas/UpdateMcpServerDto" } } } }, "responses": { "200": { - "description": "" + "description": "MCP server updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-mcp-server" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-mcp-server" + }, + "name": { + "type": "string", + "example": "My MCP Server" + }, + "description": { + "type": "string", + "example": "A Model Context Protocol server" + }, + "url": { + "type": "string", + "example": "https://mcp.example.com/sse" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — MCP server with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -1484,11 +6204,13 @@ } ], "tags": [ - "Agent Builder API Tools" - ] + "Agent Builder MCP Servers" + ], + "description": "Updates an existing MCP server by its unique slug. Side effects: updates the MCP server cache and invalidates the all-mcp-servers cache for the application. Returns 404 if no MCP server with the given slug exists. Requires appid header.", + "summary": "Update an MCP server by slug" }, "delete": { - "operationId": "ApiToolsController_deleteApiTool", + "operationId": "McpServersController_deleteMcpServer", "parameters": [ { "name": "slug", @@ -1501,36 +6223,54 @@ ], "responses": { "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder API Tools" - ] - } - }, - "/ai-agents/agent-builder/mcp-servers": { - "post": { - "operationId": "McpServersController_createMcpServer", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateMcpServerDto" + "description": "MCP server deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "400": { + "description": "Bad Request — invalid slug parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — MCP server with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } - } - }, - "responses": { - "200": { - "description": "" } }, "security": [ @@ -1540,11 +6280,33 @@ ], "tags": [ "Agent Builder MCP Servers" - ] - }, + ], + "description": "Deletes an MCP server by its unique slug within the application. Side effects: removes the MCP server from cache and invalidates the all-mcp-servers cache for the application. Returns 404 if no MCP server with the given slug exists. Requires appid header.", + "summary": "Delete an MCP server by slug" + } + }, + "/ai-agents/agent-builder/tools/agent/{agentUid}": { "get": { - "operationId": "McpServersController_getAllMcpServers", + "operationId": "ComposioController_getAvailableIntegration", "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": false, + "in": "query", + "description": "Optional slug to filter integration (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + }, { "name": "limit", "required": false, @@ -1572,11 +6334,115 @@ "schema": { "type": "number" } + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "Search term for tool name or slug", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "" + "description": "Available Composio tools retrieved successfully from integrations", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "example": "gmail" + }, + "name": { + "type": "string", + "example": "Gmail" + }, + "icon": { + "type": "string", + "example": "https://example.com/gmail-icon.png" + }, + "description": { + "type": "string", + "example": "Gmail integration for sending and managing emails" + }, + "actions": { + "type": "array", + "items": { + "type": "object" + }, + "example": [ + { + "name": "GMAIL_SEND_EMAIL", + "displayName": "Send Email" + } + ] + }, + "isAuthenticated": { + "type": "boolean", + "example": false + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "example": { + "limit": 10, + "count": 5 + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -1584,19 +6450,31 @@ "apiKey": [] } ], + "summary": "Get Ready To Use Tools", "tags": [ - "Agent Builder MCP Servers" - ] + "Agent Builder Ready to Use Tools" + ], + "description": "Retrieves a paginated list of ready-to-use tool integrations available for the specified agent. Each tool integration includes its slug, name, icon, description, available actions, and authentication status. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend to fetch the previous page. Optionally filter by slug or search by tool name/slug. Requires appid header." } }, - "/ai-agents/agent-builder/mcp-servers/{slug}": { + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions": { "get": { - "operationId": "McpServersController_getMcpServerBySlug", + "operationId": "ComposioController_getAvailableComposioToolsForAgent", "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, { "name": "slug", "required": true, "in": "path", + "description": "Get actions available within a tool (e.g., send-email, draft-email)", "schema": { "type": "string" } @@ -1604,7 +6482,7 @@ ], "responses": { "200": { - "description": "" + "description": "Available Composio tools retrieved successfully from integrations" } }, "security": [ @@ -1612,17 +6490,30 @@ "apiKey": [] } ], + "summary": "Get actions available within a tool for agent", "tags": [ - "Agent Builder MCP Servers" + "Agent Builder Ready to Use Tools" ] - }, - "patch": { - "operationId": "McpServersController_updateMcpServer", + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/authenticate": { + "post": { + "operationId": "ComposioController_authenticateTool", "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, { "name": "slug", "required": true, "in": "path", + "description": "Tool slug to authenticate (e.g., gmail, googlesheets)", "schema": { "type": "string" } @@ -1633,40 +6524,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateMcpServerDto" + "$ref": "#/components/schemas/AuthenticateToolDto" } } } }, "responses": { "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder MCP Servers" - ] - }, - "delete": { - "operationId": "McpServersController_deleteMcpServer", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" + "description": "OAuth authentication initiated successfully with redirect URL" } }, "security": [ @@ -1674,33 +6539,16 @@ "apiKey": [] } ], + "summary": "Authenticate a Composio tool with OAuth", "tags": [ - "Agent Builder MCP Servers" + "Agent Builder Ready to Use Tools" ] } }, - "/ai-agents/agent-builder/tools/agent/{agentUid}": { + "/ai-agents/agent-builder/frontend-actions": { "get": { - "operationId": "ComposioController_getAvailableIntegration", + "operationId": "FrontendActionsController_getAllFrontendActions", "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": false, - "in": "query", - "description": "Optional slug to filter integration (e.g., gmail, googlesheets)", - "schema": { - "type": "string" - } - }, { "name": "limit", "required": false, @@ -1728,59 +6576,161 @@ "schema": { "type": "number" } - }, - { - "name": "search", - "required": false, - "in": "query", - "description": "Search term for tool name or slug", - "schema": { - "type": "string" - } } ], "responses": { "200": { - "description": "Available Composio tools retrieved successfully from integrations" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get Ready To Use Tools", - "tags": [ - "Agent Builder Ready to Use Tools" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions": { - "get": { - "operationId": "ComposioController_getAvailableComposioToolsForAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" + "description": "Paginated list of frontend actions", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_onUserClick" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "User Click Action" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "triggerFunction": { + "type": "string", + "example": "onUserClick" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "userId" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The user identifier" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "onUserClick" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "example": { + "limit": 10, + "count": 5 + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } } }, - { - "name": "slug", - "required": true, - "in": "path", - "description": "Get actions available within a tool (e.g., send-email, draft-email)", - "schema": { - "type": "string" + "400": { + "description": "Bad Request — invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - } - ], - "responses": { - "200": { - "description": "Available Composio tools retrieved successfully from integrations" } }, "security": [ @@ -1788,48 +6738,144 @@ "apiKey": [] } ], - "summary": "Get actions available within a tool for agent", + "summary": "Get all frontend actions for an app", "tags": [ - "Agent Builder Ready to Use Tools" - ] - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/authenticate": { - "post": { - "operationId": "ComposioController_authenticateTool", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": true, - "in": "path", - "description": "Tool slug to authenticate (e.g., gmail, googlesheets)", - "schema": { - "type": "string" - } - } + "Agent Builder Frontend Actions" ], + "description": "Retrieves a paginated list of frontend actions for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend to fetch the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page. Requires appid header." + }, + "post": { + "operationId": "FrontendActionsController_createFrontendAction", + "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthenticateToolDto" + "$ref": "#/components/schemas/CreateFrontendActionDto" } } } }, "responses": { "200": { - "description": "OAuth authentication initiated successfully with redirect URL" + "description": "Frontend action created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_onUserClick" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "User Click Action" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "triggerFunction": { + "type": "string", + "example": "onUserClick" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "userId" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The user identifier" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "onUserClick" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate trigger function.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -1837,106 +6883,156 @@ "apiKey": [] } ], - "summary": "Authenticate a Composio tool with OAuth", + "summary": "Create a frontend action", "tags": [ - "Agent Builder Ready to Use Tools" - ] + "Agent Builder Frontend Actions" + ], + "description": "Creates a new frontend action for the application. The _id is auto-generated as {appId}_{triggerFunction} — duplicate trigger functions return a 400 error. A tool object is auto-generated from the provided parameters, description, and trigger function via a pre-save hook. Side effects: caches the created frontend action and invalidates the all-frontend-actions cache for the application. Requires appid header." } }, - "/ai-agents/agent-builder/frontend-actions": { + "/ai-agents/agent-builder/frontend-actions/{id}": { "get": { - "operationId": "FrontendActionsController_getAllFrontendActions", + "operationId": "FrontendActionsController_getFrontendActionById", "parameters": [ { - "name": "limit", - "required": false, - "in": "query", + "name": "id", + "required": true, + "in": "path", "schema": { - "type": "number" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Frontend action details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_onUserClick" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "User Click Action" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "triggerFunction": { + "type": "string", + "example": "onUserClick" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "userId" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The user identifier" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "onUserClick" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } } }, - { - "name": "affix", - "required": false, - "in": "query", - "schema": { - "enum": [ - "prepend", - "append" - ], - "type": "string" + "400": { + "description": "Bad Request — invalid ID parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, - { - "name": "createdAt", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get all frontend actions for an app", - "tags": [ - "Agent Builder Frontend Actions" - ] - }, - "post": { - "operationId": "FrontendActionsController_createFrontendAction", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFrontendActionDto" + "404": { + "description": "Not Found — frontend action with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } } - } - }, - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Create a frontend action", - "tags": [ - "Agent Builder Frontend Actions" - ] - } - }, - "/ai-agents/agent-builder/frontend-actions/{id}": { - "get": { - "operationId": "FrontendActionsController_getFrontendActionById", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } - ], - "responses": { - "200": { - "description": "" - } }, "security": [ { @@ -1946,7 +7042,8 @@ "summary": "Get a frontend action by id", "tags": [ "Agent Builder Frontend Actions" - ] + ], + "description": "Retrieves a single frontend action by its unique ID within the application. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no frontend action with the given ID exists. Requires appid header." }, "patch": { "operationId": "FrontendActionsController_updateFrontendAction", @@ -1972,7 +7069,133 @@ }, "responses": { "200": { - "description": "" + "description": "Frontend action updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_onUserClick" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "User Click Action" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "triggerFunction": { + "type": "string", + "example": "onUserClick" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "userId" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The user identifier" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "onUserClick" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — frontend action with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -1983,7 +7206,8 @@ "summary": "Update a frontend action", "tags": [ "Agent Builder Frontend Actions" - ] + ], + "description": "Updates an existing frontend action by its unique ID. The tool object is automatically regenerated from the updated parameters and description via a pre-update hook. Side effects: updates the frontend action cache and invalidates the all-frontend-actions cache for the application. Returns 404 if no frontend action with the given ID exists. Requires appid header." }, "delete": { "operationId": "FrontendActionsController_deleteFrontendAction", @@ -1999,7 +7223,54 @@ ], "responses": { "200": { - "description": "" + "description": "Frontend action deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "400": { + "description": "Bad Request — invalid ID parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — frontend action with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -2010,7 +7281,8 @@ "summary": "Delete a frontend action", "tags": [ "Agent Builder Frontend Actions" - ] + ], + "description": "Deletes a frontend action by its unique ID within the application. Side effects: removes the frontend action from cache and invalidates the all-frontend-actions cache for the application. Returns 404 if no frontend action with the given ID exists. Requires appid header." } }, "/ai-agents/agent-builder/knowledge-base/uploads/initiate": { @@ -2049,7 +7321,78 @@ }, "responses": { "200": { - "description": "" + "description": "Presigned URLs generated and upload records created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uploads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uploadId": { + "type": "string", + "description": "Unique upload session ID" + }, + "fileName": { + "type": "string", + "description": "Original file name" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the file" + }, + "fileSize": { + "type": "number", + "description": "File size in bytes" + }, + "s3Key": { + "type": "string", + "description": "S3 object key for the upload" + }, + "presignedUrl": { + "type": "string", + "description": "Presigned URL for direct S3 upload" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — missing appId header or invalid file metadata.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -2089,7 +7432,80 @@ }, "responses": { "200": { - "description": "" + "description": "Text detail created and uploaded to S3 successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Text detail created and uploaded successfully" + }, + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string", + "description": "Unique identifier for the text detail" + }, + "title": { + "type": "string", + "description": "Title of the text detail" + }, + "fileName": { + "type": "string", + "description": "Generated .md file name" + }, + "s3Key": { + "type": "string", + "description": "S3 object key for the uploaded file" + }, + "status": { + "type": "string", + "description": "Current processing status", + "example": "indexing" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — missing appId header or invalid text detail data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -2315,7 +7731,93 @@ ], "responses": { "200": { - "description": "" + "description": "Text detail and all associated data deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Text detail and all associated data deleted successfully" + }, + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string", + "description": "Unique identifier of the deleted text detail" + }, + "fileName": { + "type": "string", + "description": "Name of the deleted file" + }, + "uniqueFileId": { + "type": "string", + "description": "Unique file identifier" + }, + "deletedFromAgents": { + "type": "boolean", + "description": "Whether the file reference was removed from agents" + }, + "vectorsDeleted": { + "type": "boolean", + "description": "Whether associated vector embeddings were deleted" + }, + "s3FileDeleted": { + "type": "boolean", + "description": "Whether the S3 file was deleted" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — missing appId header or uniqueId parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — text detail with the given uniqueId does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } }, "security": [ @@ -3830,7 +9332,47 @@ }, "ToolDto": { "type": "object", - "properties": {} + "properties": { + "displayName": { + "type": "string", + "description": "Display name shown in the UI for this tool", + "example": "Get Weather" + }, + "description": { + "type": "string", + "description": "Description of what the tool does. Required when doNotExecute is false.", + "example": "Fetches current weather data for a given location" + }, + "executionText": { + "type": "string", + "description": "Text displayed while the tool is executing", + "example": "Fetching weather data..." + }, + "name": { + "type": "string", + "description": "Unique function name for the tool. Must start with a letter, underscore, or dollar sign, followed by alphanumeric characters, underscores, dollar signs, or hyphens.", + "pattern": "^[a-zA-Z_$][a-zA-Z0-9_$-]*$", + "example": "get_weather" + }, + "doNotExecute": { + "type": "boolean", + "description": "When true, the tool will not be executed locally and parameters/description become optional", + "default": false + }, + "parameters": { + "description": "Tool parameter definitions. Required when doNotExecute is false, but can be an empty object. Must be empty or omitted when doNotExecute is true.", + "allOf": [ + { + "$ref": "#/components/schemas/ParametersDto" + } + ] + } + }, + "required": [ + "displayName", + "executionText", + "name" + ] }, "MessageEventDTO": { "type": "object", @@ -4172,11 +9714,92 @@ }, "CreateCustomVariableDto": { "type": "object", - "properties": {} + "properties": { + "name": { + "type": "string", + "description": "Unique variable name. Must start with a letter and contain only alphanumeric characters, underscores, and dots.", + "maxLength": 50, + "pattern": "^[a-zA-Z][a-zA-Z0-9_.]*$", + "example": "user.preferred_language" + }, + "description": { + "type": "string", + "description": "Human-readable description of the variable", + "maxLength": 200, + "example": "The preferred language of the user" + }, + "sourceType": { + "type": "string", + "description": "Source from which the variable value is resolved", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" + }, + "sourcePath": { + "type": "string", + "description": "Dot-notation path to extract the value from the source metadata", + "maxLength": 100, + "example": "language" + }, + "constantValue": { + "type": "string", + "description": "Fixed value used when sourceType is constant", + "maxLength": 500, + "example": "en" + }, + "defaultValue": { + "type": "string", + "description": "Fallback value used when the source path does not resolve", + "maxLength": 200, + "example": "en" + } + }, + "required": [ + "name", + "sourceType" + ] }, "UpdateCustomVariableDto": { "type": "object", - "properties": {} + "properties": { + "description": { + "type": "string", + "description": "Human-readable description of the variable", + "maxLength": 200, + "example": "The preferred language of the user" + }, + "sourceType": { + "type": "string", + "description": "Source from which the variable value is resolved", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" + }, + "sourcePath": { + "type": "string", + "description": "Dot-notation path to extract the value from the source metadata", + "maxLength": 100, + "example": "language" + }, + "constantValue": { + "type": "string", + "description": "Fixed value used when sourceType is constant", + "maxLength": 500, + "example": "en" + }, + "defaultValue": { + "type": "string", + "description": "Fallback value used when the source path does not resolve", + "maxLength": 200, + "example": "en" + } + } }, "TestVariableResolutionDto": { "type": "object", @@ -5042,6 +10665,128 @@ "description": "Form version" } } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 400, + "description": "HTTP status code" + }, + "message": { + "type": "string", + "example": "Validation failed", + "description": "Error message" + }, + "error": { + "type": "string", + "example": "Bad Request", + "description": "Error type" + } + }, + "required": [ + "statusCode", + "message", + "error" + ] + }, + "SuccessBooleanResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates whether the operation was successful" + } + }, + "required": [ + "success" + ] + }, + "SuccessMessageResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates whether the operation was successful" + }, + "message": { + "type": "string", + "example": "Operation completed successfully", + "description": "Human-readable result message" + } + }, + "required": [ + "success", + "message" + ] + }, + "ParametersDto": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "object" + ], + "description": "The type of the parameters object", + "example": "object" + }, + "properties": { + "type": "object", + "description": "Map of parameter property names to their definitions (type and description)", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "description" + ] + }, + "example": { + "username": { + "type": "string", + "description": "The username" + } + } + }, + "required": { + "description": "List of required parameter property names", + "example": [ + "username" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "properties" + ] + }, + "DeletedResponse": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean", + "example": true, + "description": "Indicates whether the resource was deleted" + } + }, + "required": [ + "deleted" + ] } } } From 50a1671e0dcb10e701a40aa0cd95be59495007cd Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Thu, 5 Mar 2026 13:17:52 +0530 Subject: [PATCH 05/13] rewrite AI agents API descriptions to match moderation pattern --- ai-agent-service.json | 148 ++++++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 70 deletions(-) diff --git a/ai-agent-service.json b/ai-agent-service.json index 4a7ed55e..cee7ec96 100644 --- a/ai-agent-service.json +++ b/ai-agent-service.json @@ -143,7 +143,7 @@ "tags": [ "Agents" ], - "description": "Creates a new BYO (bring-your-own) agent that delegates to an external AI framework. Validates that referenced tools and actions exist before creation. Side effects: creates a corresponding bot in CometChat and caches the agent. If the CometChat bot creation fails, the agent record is rolled back.", + "description": "Create a new third-party agent that connects to an external AI framework.", "summary": "Create a new third-party integration agent" }, "get": { @@ -171,7 +171,8 @@ ], "tags": [ "Agents" - ] + ], + "description": "Retrieve a list of all third-party agents." } }, "/ai-agents/agents/{id}": { @@ -257,7 +258,7 @@ "tags": [ "Agents" ], - "description": "Updates an existing BYO agent by UID. Validates referenced tools and actions if provided. Runs within a database transaction — if the CometChat bot update fails, changes are rolled back. Side effects: updates the corresponding CometChat bot (name, icon, metaData) and refreshes the cache.", + "description": "Update an existing third-party agent by its UID.", "summary": "Update a third-party integration agent" }, "delete": { @@ -332,7 +333,7 @@ "tags": [ "Agents" ], - "description": "Deletes a BYO agent by UID. Side effects: deletes the corresponding CometChat bot and removes the agent from cache. If the CometChat bot deletion fails, the agent is still deleted from the database. Requires appid header.", + "description": "Delete a third-party agent by its UID.", "summary": "Delete a third-party integration agent" } }, @@ -463,7 +464,7 @@ "tags": [ "Tools" ], - "description": "Creates a new tool or action for the application. The tool name must be unique per application — duplicate names return a 400 error. The type field is auto-assigned: \"tool\" when doNotExecute is true, \"action\" otherwise. Side effects: caches the created tool and invalidates the all-tools cache for the application.", + "description": "Create a new tool or action for the application.", "summary": "Create a new tool" }, "get": { @@ -589,7 +590,7 @@ "tags": [ "Tools" ], - "description": "Retrieves all tools for the application. Optionally filter by type (\"action\" or \"tool\") using the type query parameter. Results are cached per application — subsequent requests are served from cache until invalidated. Requires appid header.", + "description": "Retrieve a list of all tools for the application, optionally filtered by type.", "summary": "List all tools" } }, @@ -729,7 +730,7 @@ "tags": [ "Tools" ], - "description": "Retrieves a single tool by its unique name within the application. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no tool with the given name exists. Requires appid header.", + "description": "Retrieve a specific tool by its unique name.", "summary": "Get a tool by name" }, "put": { @@ -877,7 +878,7 @@ "tags": [ "Tools" ], - "description": "Updates an existing tool by its unique name. The tool name cannot be changed — attempting to update the name field to a different value returns a 400 error. Merges the update with existing tool data for the nested tool object (name, description, parameters). Side effects: updates the tool cache and invalidates the all-tools cache for the application. Returns 404 if no tool with the given name exists. Requires appid header.", + "description": "Update an existing tool by its unique name.", "summary": "Update a tool by name" }, "delete": { @@ -952,7 +953,7 @@ "tags": [ "Tools" ], - "description": "Deletes a tool by its unique name within the application. Side effects: removes the tool from cache and invalidates the all-tools cache for the application. Returns 404 if no tool with the given name exists. Requires appid header.", + "description": "Delete a specific tool by its unique name.", "summary": "Delete a tool by name" } }, @@ -1020,7 +1021,7 @@ "tags": [ "Integrations" ], - "description": "Registers a new AI framework integration (e.g., OpenAI, CrewAI, LangGraph). This endpoint is admin-only and uses AdminAuthGuard instead of the standard auth guard. Side effects: caches the newly created integration record. Requires admin API key authentication.", + "description": "Register a new AI framework integration.", "summary": "Create a new AI framework integration" }, "get": { @@ -1139,7 +1140,7 @@ "tags": [ "Integrations" ], - "description": "Retrieves all available AI framework integrations, optionally filtered by type and active status. Results include populated tag objects via a database lookup. When an appid header is provided, results are scoped to integrations available for that app. Requires appid header for app-scoped filtering.", + "description": "Retrieve a list of available AI framework integrations, optionally filtered by type and active status.", "summary": "List available AI framework integrations" } }, @@ -1209,7 +1210,7 @@ "tags": [ "Agent Builder" ], - "description": "Retrieves the list of AI models available for CometChat native agents. Each model includes its provider, configuration settings, and whether it is the default model. The default model is used when no model is explicitly specified during agent creation. Requires appid header." + "description": "Retrieve the list of AI models available for agents." } }, "/ai-agents/agent-builder/agents/variables/all": { @@ -1313,7 +1314,7 @@ "tags": [ "Agent Builder" ], - "description": "Retrieves all enabled variables (predefined + custom) for the application. Each variable includes usage information: which agents reference it in their instructions and which API tools use it. When groupByCategory is true, results are grouped by category (e.g., auth, custom) as an object; otherwise returned as a flat array. Requires appid header." + "description": "Retrieve all available variables for the application, optionally grouped by category." } }, "/ai-agents/agent-builder/agents/{agentId}/tools/search": { @@ -1422,7 +1423,7 @@ "tags": [ "Agent Builder" ], - "description": "Searches across all tool types enabled for an agent: Composio ready-to-use tool actions, custom API tools, and MCP servers. Results are aggregated from all three sources into a single results array. Use the key parameter to filter by name, description, or slug, and the slug parameter to filter by a specific integration." + "description": "Search across all tool types available for an agent, including ready-to-use tool actions, API tools, and MCP servers." } }, "/ai-agents/agent-builder/agents/{agentUid}/enabled-items": { @@ -1711,7 +1712,7 @@ "tags": [ "Agent Builder" ], - "description": "Retrieves all enabled items for a specific agent, categorized by type: Composio tools (with their actions), frontend actions, API tools, and MCP servers. Each category can be individually toggled via query parameters. Use the key parameter to filter results by name or description across all categories. Returns 404 if the agent does not exist. Requires appid header." + "description": "Retrieve all enabled items for a specific agent, categorized by type: tools, frontend actions, API tools, and MCP servers." } }, "/ai-agents/agent-builder/agents": { @@ -1903,7 +1904,7 @@ "tags": [ "Agent Builder" ], - "description": "Creates a new CometChat native agent with optional tools, API tools, MCP servers, and frontend actions. Validates that all referenced tools, API tools, and MCP servers exist before creation. Side effects: creates a corresponding bot in CometChat and caches the agent. If the CometChat bot creation fails, the agent record is rolled back. The default AI model is assigned if none is specified." + "description": "Create a new agent with optional tools, API tools, MCP servers, and frontend actions." }, "get": { "operationId": "AgentBuilderController_findAll", @@ -2154,7 +2155,7 @@ "tags": [ "Agent Builder" ], - "description": "Retrieves a paginated list of CometChat native agents for the application. Supports cursor-based pagination using createdAt timestamps with prepend/append navigation. Use the search parameter to filter agents by name, description, or UID. Results are sorted by creation date in descending order. The appId field is excluded from the response for brevity." + "description": "Retrieve a paginated list of agents for the application." } }, "/ai-agents/agent-builder/agents/{id}": { @@ -2341,7 +2342,7 @@ "tags": [ "Agent Builder" ], - "description": "Retrieves a single CometChat native agent by its unique identifier. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no agent with the given UID exists." + "description": "Retrieve a specific agent by its UID." }, "patch": { "operationId": "AgentBuilderController_update", @@ -2427,7 +2428,7 @@ "tags": [ "Agent Builder" ], - "description": "Updates an existing CometChat native agent by UID. Validates referenced tools, API tools, and MCP servers if provided. Runs within a database transaction — if the CometChat bot update fails, changes are rolled back. Side effects: updates the corresponding CometChat bot (name, icon, metaData), refreshes the cache, and recalculates formattedInstruction if instruction changes." + "description": "Update an existing agent by its UID." }, "delete": { "operationId": "AgentBuilderController_remove", @@ -2493,7 +2494,7 @@ "tags": [ "Agent Builder" ], - "description": "Deletes a CometChat native agent by UID. Side effects: deletes the corresponding CometChat bot and removes the agent from cache. If the CometChat bot deletion fails, the agent is still deleted from the database." + "description": "Delete a specific agent by its UID." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/add": { @@ -2709,7 +2710,7 @@ "tags": [ "Agent Builder" ], - "description": "Adds one or more Composio tools to the specified CometChat native agent by UID. The tools array in the request body contains tool slug identifiers. Invalidates the cached agent data after a successful update. Returns the updated agent object." + "description": "Add one or more tools to a specific agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/remove": { @@ -2925,7 +2926,7 @@ "tags": [ "Agent Builder" ], - "description": "Removes one or more Composio tools from the specified CometChat native agent by UID. The tools array in the request body contains tool slug identifiers to remove. Invalidates the cached agent data after a successful update. Returns the updated agent object." + "description": "Remove one or more tools from a specific agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/mcp/add": { @@ -3141,7 +3142,7 @@ "tags": [ "Agent Builder" ], - "description": "Adds one or more MCP (Model Context Protocol) servers to the specified CometChat native agent by UID. The mcps array in the request body contains MCP server slug identifiers. Invalidates the cached agent data after a successful update. Returns the updated agent object. Requires appid header." + "description": "Add one or more MCP servers to a specific agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/mcp/remove": { @@ -3357,7 +3358,7 @@ "tags": [ "Agent Builder" ], - "description": "Removes one or more MCP (Model Context Protocol) servers from the specified CometChat native agent by UID. The mcps array in the request body contains MCP server slug identifiers to remove. Invalidates the cached agent data after a successful update. Returns the updated agent object. Requires appid header." + "description": "Remove one or more MCP servers from a specific agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/api-tools/add": { @@ -3573,7 +3574,7 @@ "tags": [ "Agent Builder" ], - "description": "Adds one or more custom API tools to the specified CometChat native agent by UID. The apiTools array in the request body contains API tool slug identifiers. Invalidates the cached agent data after a successful update. Returns the updated agent object." + "description": "Add one or more API tools to a specific agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/api-tools/remove": { @@ -3789,7 +3790,7 @@ "tags": [ "Agent Builder" ], - "description": "Removes one or more custom API tools from the specified CometChat native agent by UID. The apiTools array in the request body contains API tool slug identifiers to remove. Invalidates the cached agent data after a successful update. Returns the updated agent object." + "description": "Remove one or more API tools from a specific agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/add": { @@ -4005,7 +4006,7 @@ "tags": [ "Agent Builder" ], - "description": "Adds one or more frontend actions to the specified CometChat native agent by UID. The frontendActions array in the request body contains frontend action identifiers. Frontend actions allow agents to trigger client-side UI operations. Invalidates the cached agent data after a successful update. Returns the updated agent object." + "description": "Add one or more frontend actions to a specific agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/remove": { @@ -4221,7 +4222,7 @@ "tags": [ "Agent Builder" ], - "description": "Removes one or more frontend actions from the specified CometChat native agent by UID. The frontendActions array in the request body contains frontend action identifiers to remove. Invalidates the cached agent data after a successful update. Returns the updated agent object." + "description": "Remove one or more frontend actions from a specific agent." } }, "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/add": { @@ -4273,7 +4274,8 @@ "summary": "Add files to agent knowledge base", "tags": [ "Agent Builder" - ] + ], + "description": "Add files to an agent's knowledge base by source type." } }, "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/remove": { @@ -4325,7 +4327,8 @@ "summary": "Remove files from agent knowledge base", "tags": [ "Agent Builder" - ] + ], + "description": "Remove files from an agent's knowledge base by source type." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/add": { @@ -4377,7 +4380,8 @@ "summary": "Enable actions for a tool", "tags": [ "Agent Builder" - ] + ], + "description": "Enable specific actions for a tool on an agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/remove": { @@ -4429,7 +4433,8 @@ "summary": "Remove actions for a tool", "tags": [ "Agent Builder" - ] + ], + "description": "Disable specific actions for a tool on an agent." } }, "/ai-agents/agent-builder/agents/variables/custom": { @@ -4534,7 +4539,7 @@ "tags": [ "Agent Builder" ], - "description": "Retrieves all custom variables defined for the application. Custom variables allow dynamic value injection into agent instructions using metadata from messages, users, or constant values. Each variable includes its source type, resolution path, and default value. Requires appid header." + "description": "Retrieve all custom variables defined for the application." }, "post": { "operationId": "AgentBuilderController_createCustomVariable", @@ -4654,7 +4659,7 @@ "tags": [ "Agent Builder" ], - "description": "Creates a new custom variable for the application. Custom variables can source their values from message metadata, user metadata, or a constant value. Variable names must be unique within the app and follow the pattern [a-zA-Z][a-zA-Z0-9_.]*. Requires appid header." + "description": "Create a new custom variable for dynamic value injection into agent instructions." } }, "/ai-agents/agent-builder/agents/variables/custom/{variableId}": { @@ -4796,7 +4801,7 @@ "tags": [ "Agent Builder" ], - "description": "Updates an existing custom variable by its ID. Only the provided fields are updated; omitted fields remain unchanged. The variable name cannot be changed after creation. Requires appid header." + "description": "Update an existing custom variable by its ID." }, "delete": { "operationId": "AgentBuilderController_deleteCustomVariable", @@ -4862,7 +4867,7 @@ "tags": [ "Agent Builder" ], - "description": "Deletes a custom variable by its ID. Once deleted, any agent instructions referencing this variable will no longer resolve its value. Requires appid header." + "description": "Delete a custom variable by its ID." } }, "/ai-agents/agent-builder/api-tools": { @@ -5088,7 +5093,7 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Retrieves a paginated list of API tools for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend to fetch the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page. Requires appid header." + "description": "Retrieve a paginated list of API tools for the application." }, "post": { "operationId": "ApiToolsController_createApiTool", @@ -5258,7 +5263,7 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Creates a new API tool configuration for the application. The slug must be unique per application — duplicate slugs return a 400 error. A tool object is auto-generated from the provided parameters, description, and slug via a pre-save hook. Side effects: caches the created API tool and invalidates the all-api-tools cache for the application. Requires appid header.", + "description": "Create a new API tool configuration for the application.", "summary": "Create a new API tool" } }, @@ -5440,7 +5445,7 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Retrieves a single API tool by its unique slug within the application. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no API tool with the given slug exists. Requires appid header.", + "description": "Retrieve a specific API tool by its unique slug.", "summary": "Get an API tool by slug" }, "patch": { @@ -5630,7 +5635,7 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Updates an existing API tool by its unique slug. The tool object is automatically regenerated from the updated parameters and description via a pre-update hook. Side effects: updates the API tool cache and invalidates the all-api-tools cache for the application. Returns 404 if no API tool with the given slug exists. Requires appid header.", + "description": "Update an existing API tool by its unique slug.", "summary": "Update an API tool by slug" }, "delete": { @@ -5705,7 +5710,7 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Deletes an API tool by its unique slug within the application. Side effects: removes the API tool from cache and invalidates the all-api-tools cache for the application. Returns 404 if no API tool with the given slug exists. Requires appid header.", + "description": "Delete a specific API tool by its unique slug.", "summary": "Delete an API tool by slug" } }, @@ -5811,7 +5816,7 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Creates a new Model Context Protocol server configuration for the application. The slug must be unique per application — duplicate slugs return a 400 error. Side effects: caches the created MCP server and invalidates the all-mcp-servers cache for the application. Requires appid header.", + "description": "Create a new MCP server configuration for the application.", "summary": "Create a new MCP server" }, "get": { @@ -5968,7 +5973,7 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Retrieves a paginated list of MCP servers for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend to fetch the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page. Requires appid header.", + "description": "Retrieve a paginated list of MCP servers for the application.", "summary": "Get all MCP servers for an app" } }, @@ -6083,7 +6088,7 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Retrieves a single MCP server by its unique slug within the application. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no MCP server with the given slug exists. Requires appid header.", + "description": "Retrieve a specific MCP server by its unique slug.", "summary": "Get an MCP server by slug" }, "patch": { @@ -6206,7 +6211,7 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Updates an existing MCP server by its unique slug. Side effects: updates the MCP server cache and invalidates the all-mcp-servers cache for the application. Returns 404 if no MCP server with the given slug exists. Requires appid header.", + "description": "Update an existing MCP server by its unique slug.", "summary": "Update an MCP server by slug" }, "delete": { @@ -6281,7 +6286,7 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Deletes an MCP server by its unique slug within the application. Side effects: removes the MCP server from cache and invalidates the all-mcp-servers cache for the application. Returns 404 if no MCP server with the given slug exists. Requires appid header.", + "description": "Delete a specific MCP server by its unique slug.", "summary": "Delete an MCP server by slug" } }, @@ -6454,7 +6459,7 @@ "tags": [ "Agent Builder Ready to Use Tools" ], - "description": "Retrieves a paginated list of ready-to-use tool integrations available for the specified agent. Each tool integration includes its slug, name, icon, description, available actions, and authentication status. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend to fetch the previous page. Optionally filter by slug or search by tool name/slug. Requires appid header." + "description": "Retrieve a paginated list of ready-to-use tool integrations available for an agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions": { @@ -6493,7 +6498,8 @@ "summary": "Get actions available within a tool for agent", "tags": [ "Agent Builder Ready to Use Tools" - ] + ], + "description": "Retrieve the actions available within a specific tool for an agent." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/authenticate": { @@ -6542,7 +6548,8 @@ "summary": "Authenticate a Composio tool with OAuth", "tags": [ "Agent Builder Ready to Use Tools" - ] + ], + "description": "Initiate OAuth authentication for a specific tool on an agent." } }, "/ai-agents/agent-builder/frontend-actions": { @@ -6742,7 +6749,7 @@ "tags": [ "Agent Builder Frontend Actions" ], - "description": "Retrieves a paginated list of frontend actions for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend to fetch the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page. Requires appid header." + "description": "Retrieve a paginated list of frontend actions for the application." }, "post": { "operationId": "FrontendActionsController_createFrontendAction", @@ -6887,7 +6894,7 @@ "tags": [ "Agent Builder Frontend Actions" ], - "description": "Creates a new frontend action for the application. The _id is auto-generated as {appId}_{triggerFunction} — duplicate trigger functions return a 400 error. A tool object is auto-generated from the provided parameters, description, and trigger function via a pre-save hook. Side effects: caches the created frontend action and invalidates the all-frontend-actions cache for the application. Requires appid header." + "description": "Create a new frontend action for the application." } }, "/ai-agents/agent-builder/frontend-actions/{id}": { @@ -7043,7 +7050,7 @@ "tags": [ "Agent Builder Frontend Actions" ], - "description": "Retrieves a single frontend action by its unique ID within the application. Returns a cached version if available, otherwise fetches from the database and caches the result. Returns 404 if no frontend action with the given ID exists. Requires appid header." + "description": "Retrieve a specific frontend action by its ID." }, "patch": { "operationId": "FrontendActionsController_updateFrontendAction", @@ -7207,7 +7214,7 @@ "tags": [ "Agent Builder Frontend Actions" ], - "description": "Updates an existing frontend action by its unique ID. The tool object is automatically regenerated from the updated parameters and description via a pre-update hook. Side effects: updates the frontend action cache and invalidates the all-frontend-actions cache for the application. Returns 404 if no frontend action with the given ID exists. Requires appid header." + "description": "Update an existing frontend action by its ID." }, "delete": { "operationId": "FrontendActionsController_deleteFrontendAction", @@ -7282,12 +7289,12 @@ "tags": [ "Agent Builder Frontend Actions" ], - "description": "Deletes a frontend action by its unique ID within the application. Side effects: removes the frontend action from cache and invalidates the all-frontend-actions cache for the application. Returns 404 if no frontend action with the given ID exists. Requires appid header." + "description": "Delete a specific frontend action by its ID." } }, "/ai-agents/agent-builder/knowledge-base/uploads/initiate": { "post": { - "description": "Generate presigned URLs and create upload records for multiple files", + "description": "Generate presigned URLs to initiate file uploads to the knowledge base.", "operationId": "RagController_initiateUpload", "parameters": [], "requestBody": { @@ -7408,7 +7415,7 @@ }, "/ai-agents/agent-builder/knowledge-base/text": { "post": { - "description": "Accepts title and text content, converts to .md file, uploads to S3, and adds to knowledge base", + "description": "Create a new text knowledge base entry with a title and content.", "operationId": "RagController_createTextDetail", "parameters": [], "requestBody": { @@ -7519,7 +7526,7 @@ ] }, "get": { - "description": "Retrieves all text details records for a given app. Requires the appId header.", + "description": "Retrieve all text knowledge base entries for the application.", "operationId": "RagController_getTextDetails", "parameters": [], "responses": { @@ -7555,7 +7562,7 @@ }, "/ai-agents/agent-builder/knowledge-base/text/{uniqueId}": { "get": { - "description": "Retrieves a specific text detail record by its uniqueId. Requires the appId header.", + "description": "Retrieve a specific text knowledge base entry by its unique ID.", "operationId": "RagController_getTextDetailById", "parameters": [ { @@ -7629,7 +7636,7 @@ ] }, "patch": { - "description": "Updates a specific text detail record by its uniqueId. Updates S3 content and resets status to indexing. Requires the appId header.", + "description": "Update a specific text knowledge base entry by its unique ID.", "operationId": "RagController_updateTextDetail", "parameters": [ { @@ -7716,7 +7723,7 @@ ] }, "delete": { - "description": "Removes text detail record, deletes upload record, vector data, and S3 file", + "description": "Delete a specific text knowledge base entry and all its associated data.", "operationId": "RagController_deleteTextDetail", "parameters": [ { @@ -7833,7 +7840,7 @@ }, "/ai-agents/agent-builder/knowledge-base": { "get": { - "description": "Retrieve knowledge base records for an app using efficient cursor-based pagination. Records are returned in descending order (newest first). Supports bidirectional navigation using cursor and affix parameters.", + "description": "Retrieve knowledge base records with cursor-based pagination.", "operationId": "RagController_getKnowledgeBase", "parameters": [ { @@ -8033,7 +8040,7 @@ }, "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/pages": { "get": { - "description": "Retrieves paginated pages for a given source file. Requires appId header. Supports limit, page, and affix for pagination.", + "description": "Retrieve paginated pages for a specific knowledge base source.", "operationId": "RagController_getSourcePages", "parameters": [ { @@ -8122,7 +8129,7 @@ }, "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/sync": { "patch": { - "description": "Triggers revectorization for a source by type and unique ID. Requires appId header.", + "description": "Trigger a resync for a specific knowledge base source.", "operationId": "RagController_revectorizeSource", "parameters": [ { @@ -8211,12 +8218,13 @@ "summary": "Get status for multiple unique IDs", "tags": [ "knowledge-base" - ] + ], + "description": "Retrieve the processing status for multiple knowledge base entries." } }, "/ai-agents/agent-builder/knowledge-base/website/scrape": { "post": { - "description": "Scrape a website to fetch links and then batch scrape them with configuration options for filtering and depth control", + "description": "Scrape a website and fetch its sitemap for use as agent knowledge.", "operationId": "CrawlWebPagesController_crawlWebsite", "parameters": [], "requestBody": { @@ -8374,7 +8382,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/individual-page": { "post": { - "description": "Scrapes a single webpage to extract title, description, and full content using the specified scraper", + "description": "Scrape a single webpage to extract its title, description, and content.", "operationId": "CrawlWebPagesController_scrapePage", "parameters": [], "requestBody": { @@ -8539,7 +8547,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls": { "get": { - "description": "Retrieves all URLs discovered during a website crawl or single page scrape with cursor-based pagination", + "description": "Retrieve URLs discovered during a website crawl with cursor-based pagination.", "operationId": "CrawlWebPagesController_getDiscoveredUrls", "parameters": [ { @@ -8789,7 +8797,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process": { "post": { - "description": "Mark discovered URLs for exclusion and initiate batch crawling with FireCrawl webhook callback", + "description": "Process discovered URLs by marking exclusions and initiating batch crawling.", "operationId": "CrawlWebPagesController_processDiscoveredUrls", "parameters": [ { @@ -8890,7 +8898,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/status/poll": { "post": { - "description": "Retrieves status information for discovered URLs by their unique IDs within a parent website crawl. Only returns existing records, omitting non-existing uniqueIds from the response.", + "description": "Retrieve the processing status for multiple discovered URLs.", "operationId": "CrawlWebPagesController_getDiscoveredUrlsStatus", "parameters": [ { @@ -8964,7 +8972,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/sync": { "patch": { - "description": "Selectively process only the specified discovered URLs that are not excluded (excludeFlag !== true). This endpoint allows you to sync specific URLs within a parent website crawl without processing all discovered URLs.", + "description": "Resync specific discovered URLs within a parent website crawl.", "operationId": "CrawlWebPagesController_syncDiscoveredUrls", "parameters": [ { From f5dc9fee156f1691f4f15d0c772d267acfed787b Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Thu, 5 Mar 2026 16:25:14 +0530 Subject: [PATCH 06/13] rewrite API descriptions: keep client-facing detail, remove internal implementation notes --- ai-agent-service.json | 20948 ++++++++++++++++++++-------------------- 1 file changed, 10470 insertions(+), 10478 deletions(-) diff --git a/ai-agent-service.json b/ai-agent-service.json index cee7ec96..ea17dd4a 100644 --- a/ai-agent-service.json +++ b/ai-agent-service.json @@ -1,10801 +1,10793 @@ { - "openapi": "3.0.0", - "paths": { - "/ai-agents/agents": { - "post": { - "operationId": "AgentsController_createAgent", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentDTO" - } - } - } - }, - "responses": { - "200": { - "description": "Agent created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "agent": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "550e8400-e29b-41d4-a716-446655440000" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "My Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "integrateWith": { - "type": "string", - "example": "openai" - }, - "integrationType": { - "type": "string", - "example": "agent" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "tool1" - ] - }, - "actions": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "action1" - ] - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "integrationMeta": { - "type": "object", - "example": {} - }, - "metaData": { - "type": "object", - "example": {} - }, - "deletedAt": { - "type": "number", - "nullable": true, - "example": null - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" + "openapi": "3.0.0", + "paths": { + "/ai-agents/agents": { + "post": { + "operationId": "AgentsController_createAgent", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentDTO" + } } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error or referenced tools/actions not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agents" - ], - "description": "Create a new third-party agent that connects to an external AI framework.", - "summary": "Create a new third-party integration agent" - }, - "get": { - "operationId": "AgentsController_getAgents", - "parameters": [], - "responses": { - "200": { - "description": "List of agents", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetAgentDetailDto" - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agents" - ], - "description": "Retrieve a list of all third-party agents." - } - }, - "/ai-agents/agents/{id}": { - "patch": { - "operationId": "AgentsController_updateAgent", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAgentDTO" - } - } - } - }, - "responses": { - "200": { - "description": "Agent updated successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessBooleanResponse" - } - } - } - }, - "400": { - "description": "Bad Request — validation error or referenced tools/actions not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agents" - ], - "description": "Update an existing third-party agent by its UID.", - "summary": "Update a third-party integration agent" - }, - "delete": { - "operationId": "AgentsController_deleteAgent", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Agent deleted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessMessageResponse" - } - } - } - }, - "400": { - "description": "Bad Request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agents" - ], - "description": "Delete a third-party agent by its UID.", - "summary": "Delete a third-party integration agent" - } - }, - "/ai-agents/tools": { - "post": { - "operationId": "ToolsController_createTool", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolDto" - } - } - } - }, - "responses": { - "200": { - "description": "Tool created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_myTool" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "myTool" - }, - "type": { - "type": "string", - "enum": [ - "action", - "tool" - ], - "example": "action" - }, - "displayName": { - "type": "string", - "example": "My Tool" - }, - "executionText": { - "type": "string", - "example": "Running my tool..." + }, + "responses": { + "200": { + "description": "Agent created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "agent": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "550e8400-e29b-41d4-a716-446655440000" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "My Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "integrateWith": { + "type": "string", + "example": "openai" + }, + "integrationType": { + "type": "string", + "example": "agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "tool1" + ] + }, + "actions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "action1" + ] + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "integrationMeta": { + "type": "object", + "example": {} + }, + "metaData": { + "type": "object", + "example": {} + }, + "deletedAt": { + "type": "number", + "nullable": true, + "example": null + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } }, - "doNotExecute": { - "type": "boolean", - "example": false - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "myTool" - }, - "description": { - "type": "string", - "example": "A helpful tool" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } + "400": { + "description": "Bad Request — validation error or referenced tools/actions not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - } }, - "createdAt": { - "type": "string", - "format": "date-time" + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "updatedAt": { - "type": "string", - "format": "date-time" + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error or duplicate tool name.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Tools" - ], - "description": "Create a new tool or action for the application.", - "summary": "Create a new tool" - }, - "get": { - "operationId": "ToolsController_getAllTools", - "parameters": [ - { - "name": "type", - "required": false, - "in": "query", - "description": "Filter tools by type", - "schema": { - "enum": [ - "action", - "tool" - ], - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "List of tools", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_myTool" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "myTool" - }, - "type": { - "type": "string", - "enum": [ - "action", - "tool" - ], - "example": "action" - }, - "displayName": { - "type": "string", - "example": "My Tool" - }, - "executionText": { - "type": "string", - "example": "Running my tool..." - }, - "doNotExecute": { - "type": "boolean", - "example": false - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "myTool" - }, - "description": { - "type": "string", - "example": "A helpful tool" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agents" + ], + "description": "Create a new third-party agent that delegates to an external AI framework. All referenced tools and actions are validated before the agent is created.", + "summary": "Create a new third-party integration agent" + }, + "get": { + "operationId": "AgentsController_getAgents", + "parameters": [], + "responses": { + "200": { + "description": "List of agents", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetAgentDetailDto" + } + } } - } } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } } - } - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agents" + ] } - } }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Tools" - ], - "description": "Retrieve a list of all tools for the application, optionally filtered by type.", - "summary": "List all tools" - } - }, - "/ai-agents/tools/{name}": { - "get": { - "operationId": "ToolsController_getToolByName", - "parameters": [ - { - "name": "name", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Tool details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_myTool" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "myTool" - }, - "type": { - "type": "string", - "enum": [ - "action", - "tool" - ], - "example": "action" - }, - "displayName": { - "type": "string", - "example": "My Tool" + "/ai-agents/agents/{id}": { + "patch": { + "operationId": "AgentsController_updateAgent", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAgentDTO" + } + } + } + }, + "responses": { + "200": { + "description": "Agent updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessBooleanResponse" + } + } + } }, - "executionText": { - "type": "string", - "example": "Running my tool..." + "400": { + "description": "Bad Request — validation error or referenced tools/actions not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "doNotExecute": { - "type": "boolean", - "example": false - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "myTool" - }, - "description": { - "type": "string", - "example": "A helpful tool" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - } }, - "createdAt": { - "type": "string", - "format": "date-time" + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "updatedAt": { - "type": "string", - "format": "date-time" + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid tool name parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — tool with the given name does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Tools" - ], - "description": "Retrieve a specific tool by its unique name.", - "summary": "Get a tool by name" - }, - "put": { - "operationId": "ToolsController_updateTool", - "parameters": [ - { - "name": "name", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolDto" - } - } - } - }, - "responses": { - "200": { - "description": "Tool updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_myTool" - }, - "appId": { - "type": "string", - "example": "my-app-id" + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agents" + ], + "description": "Update an existing third-party agent by its UID. Referenced tools and actions are validated if provided.", + "summary": "Update a third-party integration agent" + }, + "delete": { + "operationId": "AgentsController_deleteAgent", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Agent deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } }, - "name": { - "type": "string", - "example": "myTool" + "400": { + "description": "Bad Request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "type": { - "type": "string", - "enum": [ - "action", - "tool" - ], - "example": "action" + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "displayName": { - "type": "string", - "example": "My Tool" + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "executionText": { - "type": "string", - "example": "Running my tool..." + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agents" + ], + "description": "Delete a third-party agent by its UID.", + "summary": "Delete a third-party integration agent" + } + }, + "/ai-agents/tools": { + "post": { + "operationId": "ToolsController_createTool", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "Tool created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_myTool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "myTool" + }, + "type": { + "type": "string", + "enum": [ + "action", + "tool" + ], + "example": "action" + }, + "displayName": { + "type": "string", + "example": "My Tool" + }, + "executionText": { + "type": "string", + "example": "Running my tool..." + }, + "doNotExecute": { + "type": "boolean", + "example": false + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "myTool" + }, + "description": { + "type": "string", + "example": "A helpful tool" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } }, - "doNotExecute": { - "type": "boolean", - "example": false - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "myTool" - }, - "description": { - "type": "string", - "example": "A helpful tool" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } + "400": { + "description": "Bad Request — validation error or duplicate tool name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - } }, - "createdAt": { - "type": "string", - "format": "date-time" + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "updatedAt": { - "type": "string", - "format": "date-time" + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error or attempt to change tool name.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — tool with the given name does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Tools" - ], - "description": "Update an existing tool by its unique name.", - "summary": "Update a tool by name" - }, - "delete": { - "operationId": "ToolsController_deleteTool", - "parameters": [ - { - "name": "name", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Tool deleted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeletedResponse" - } - } - } - }, - "400": { - "description": "Bad Request — invalid tool name parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — tool with the given name does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Tools" - ], - "description": "Delete a specific tool by its unique name.", - "summary": "Delete a tool by name" - } - }, - "/ai-agents/integrations": { - "post": { - "operationId": "IntegrationsController_createIntegration", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateIntegrationDto" - } - } - } - }, - "responses": { - "200": { - "description": "Integration created successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessBooleanResponse" - } - } - } - }, - "400": { - "description": "Bad Request — validation error or invalid integration data.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid admin API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Integrations" - ], - "description": "Register a new AI framework integration.", - "summary": "Create a new AI framework integration" - }, - "get": { - "operationId": "IntegrationsController_getIntegrations", - "parameters": [ - { - "name": "type", - "required": false, - "in": "query", - "description": "Optional integration type", - "schema": { - "type": "string" - } - }, - { - "name": "isActive", - "required": false, - "in": "query", - "description": "Optional active status", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "List of integrations matching the filter criteria", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "openai" - }, - "name": { - "type": "string", - "example": "OpenAI" - }, - "icon": { - "type": "string", - "example": "https://example.com/openai-icon.png" - }, - "type": { - "type": "string", - "enum": [ - "agent", - "llm" - ], - "example": "agent" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "tags": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "name": { - "type": "string" + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ], + "description": "Create a new tool or action for the application. The tool name must be unique per application. The type is automatically assigned based on the doNotExecute flag: set to \"tool\" when true, \"action\" otherwise.", + "summary": "Create a new tool" + }, + "get": { + "operationId": "ToolsController_getAllTools", + "parameters": [ + { + "name": "type", + "required": false, + "in": "query", + "description": "Filter tools by type", + "schema": { + "enum": [ + "action", + "tool" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "List of tools", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_myTool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "myTool" + }, + "type": { + "type": "string", + "enum": [ + "action", + "tool" + ], + "example": "action" + }, + "displayName": { + "type": "string", + "example": "My Tool" + }, + "executionText": { + "type": "string", + "example": "Running my tool..." + }, + "doNotExecute": { + "type": "boolean", + "example": false + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "myTool" + }, + "description": { + "type": "string", + "example": "A helpful tool" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } } - } } - }, - "metaData": { - "type": "object", - "example": {} - }, - "appId": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - } } - } - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Integrations" - ], - "description": "Retrieve a list of available AI framework integrations, optionally filtered by type and active status.", - "summary": "List available AI framework integrations" - } - }, - "/ai-agents/agent-builder/agents/available-models": { - "get": { - "operationId": "AgentBuilderController_getAvailableModels", - "parameters": [], - "responses": { - "200": { - "description": "List of available AI models", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "provider": { - "type": "string", - "example": "openai" - }, - "settings": { - "type": "object", - "example": {} - }, - "default": { - "type": "boolean", - "example": false - } + }, + "security": [ + { + "apiKey": [] } - } - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get available models", - "tags": [ - "Agent Builder" - ], - "description": "Retrieve the list of AI models available for agents." - } - }, - "/ai-agents/agent-builder/agents/variables/all": { - "get": { - "operationId": "AgentBuilderController_getAvailableVariables", - "parameters": [ - { - "name": "groupByCategory", - "required": false, - "in": "query", - "description": "Group variables by category", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "description": "List of variables (flat array or grouped by category)", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "sourceType": { - "type": "string" - }, - "category": { + ], + "tags": [ + "Tools" + ], + "description": "Retrieve all tools for the application. Optionally filter by type (\"action\" or \"tool\") using the type query parameter.", + "summary": "List all tools" + } + }, + "/ai-agents/tools/{name}": { + "get": { + "operationId": "ToolsController_getToolByName", + "parameters": [ + { + "name": "name", + "required": true, + "in": "path", + "schema": { "type": "string" - }, - "usageCount": { - "type": "number" - }, - "usedByAgents": { - "type": "array", - "items": { - "type": "object" + } + } + ], + "responses": { + "200": { + "description": "Tool details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_myTool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "myTool" + }, + "type": { + "type": "string", + "enum": [ + "action", + "tool" + ], + "example": "action" + }, + "displayName": { + "type": "string", + "example": "My Tool" + }, + "executionText": { + "type": "string", + "example": "Running my tool..." + }, + "doNotExecute": { + "type": "boolean", + "example": false + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "myTool" + }, + "description": { + "type": "string", + "example": "A helpful tool" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } } - }, - "usedByTools": { - "type": "object" - } } - } }, - { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "object" + "400": { + "description": "Bad Request — invalid tool name parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - }, - "example": { - "auth": [], - "custom": [] - } - } - ] - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get all available variables for an app", - "tags": [ - "Agent Builder" - ], - "description": "Retrieve all available variables for the application, optionally grouped by category." - } - }, - "/ai-agents/agent-builder/agents/{agentId}/tools/search": { - "get": { - "operationId": "AgentBuilderController_searchAllTools", - "parameters": [ - { - "name": "agentId", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - }, - { - "name": "key", - "required": false, - "in": "query", - "description": "Search term to filter actions by name, description, or slug", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": false, - "in": "query", - "description": "Filter by specific integration slug", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Aggregated search results from all tool sources", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true }, - "results": { - "type": "array", - "items": { - "type": "object" - }, - "example": [] - } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid search parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given ID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Search across ready to use tool actions, api tools and mcp for an agent", - "tags": [ - "Agent Builder" - ], - "description": "Search across all tool types available for an agent, including ready-to-use tool actions, API tools, and MCP servers." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/enabled-items": { - "get": { - "operationId": "AgentBuilderController_getEnabledItems", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - }, - { - "name": "tools", - "required": false, - "in": "query", - "description": "Include enabled tools (default: true)", - "schema": { - "default": true, - "type": "boolean" - } - }, - { - "name": "frontendActions", - "required": false, - "in": "query", - "description": "Include enabled frontend actions (default: true)", - "schema": { - "default": true, - "type": "boolean" - } - }, - { - "name": "apiTools", - "required": false, - "in": "query", - "description": "Include enabled API tools (default: true)", - "schema": { - "default": true, - "type": "boolean" - } - }, - { - "name": "mcpServers", - "required": false, - "in": "query", - "description": "Include enabled MCP servers (default: true)", - "schema": { - "default": true, - "type": "boolean" - } - }, - { - "name": "key", - "required": false, - "in": "query", - "description": "Search term to filter by name/description", - "schema": { - "type": "string" - } - }, - { - "name": "_", - "required": false, - "in": "query", - "description": "Cache-busting timestamp (ignored by server)", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Categorized enabled items for the agent", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "tools": { - "type": "array", - "items": { - "type": "object", - "properties": { - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "actions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - } + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } - } } - } - }, - "frontendActions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "triggerFunction": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "type": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - } - } + } + }, + "404": { + "description": "Not Found — tool with the given name does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } - } } - } - }, - "apiTools": { - "type": "array", - "items": { - "type": "object", - "properties": { - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "endpoint": { - "type": "string" - }, - "method": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "type": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean" - } - } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" } - } } - } - }, - "mcpServers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "slug": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "url": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid query parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get enabled items (tools, frontend actions, API tools, MCP servers) for an agent", - "tags": [ - "Agent Builder" - ], - "description": "Retrieve all enabled items for a specific agent, categorized by type: tools, frontend actions, API tools, and MCP servers." - } - }, - "/ai-agents/agent-builder/agents": { - "post": { - "operationId": "AgentBuilderController_create", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateCometChatAgentDto" - } - } - } - }, - "responses": { - "200": { - "description": "Agent created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "agent": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ], + "description": "Retrieve a specific tool by its unique name. Returns 404 if no tool with the given name exists.", + "summary": "Get a tool by name" + }, + "put": { + "operationId": "ToolsController_updateTool", + "parameters": [ + { + "name": "name", + "required": true, + "in": "path", + "schema": { "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Create a new agent", - "tags": [ - "Agent Builder" - ], - "description": "Create a new agent with optional tools, API tools, MCP servers, and frontend actions." - }, - "get": { - "operationId": "AgentBuilderController_findAll", - "parameters": [ - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "affix", - "required": false, - "in": "query", - "schema": { - "enum": [ - "prepend", - "append" - ], - "type": "string" - } - }, - { - "name": "createdAt", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "search", - "required": false, - "in": "query", - "description": "Search term to filter agents by name, description, or other fields", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Paginated list of agents", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - }, - "meta": { - "type": "object", - "properties": { - "previous": { - "type": "object", - "example": { - "affix": "prepend", - "createdAt": 1700000000000 - } - }, - "current": { - "type": "object", - "properties": { - "limit": { - "type": "number" - }, - "count": { - "type": "number" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolDto" } - } - }, - "next": { - "type": "object", - "example": { - "affix": "append", - "createdAt": 1700000000000 - } } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid pagination parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get all agents for an app", - "tags": [ - "Agent Builder" - ], - "description": "Retrieve a paginated list of agents for the application." - } - }, - "/ai-agents/agent-builder/agents/{id}": { - "get": { - "operationId": "AgentBuilderController_findOne", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Agent details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" + }, + "responses": { + "200": { + "description": "Tool updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_myTool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "myTool" + }, + "type": { + "type": "string", + "enum": [ + "action", + "tool" + ], + "example": "action" + }, + "displayName": { + "type": "string", + "example": "My Tool" + }, + "executionText": { + "type": "string", + "example": "Running my tool..." + }, + "doNotExecute": { + "type": "boolean", + "example": false + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "myTool" + }, + "description": { + "type": "string", + "example": "A helpful tool" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + } + } + } }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" + "400": { + "description": "Bad Request — validation error or attempt to change tool name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "isActive": { - "type": "boolean", - "example": true + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "description": { - "type": "string", - "example": "A helpful support agent" + "404": { + "description": "Not Found — tool with the given name does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "gmail", - "slack" - ] + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ], + "description": "Update an existing tool by its unique name. The tool name cannot be changed after creation. The update is merged with existing tool data for the nested tool object (name, description, parameters). Returns 404 if no tool with the given name exists.", + "summary": "Update a tool by name" + }, + "delete": { + "operationId": "ToolsController_deleteTool", + "parameters": [ + { + "name": "name", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Tool deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletedResponse" + } + } + } }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] + "400": { + "description": "Bad Request — invalid tool name parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "websites": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "otherKbIntegrations": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] + "404": { + "description": "Not Found — tool with the given name does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "apiTools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ], + "description": "Delete a tool by its unique name. Returns 404 if no tool with the given name exists.", + "summary": "Delete a tool by name" + } + }, + "/ai-agents/integrations": { + "post": { + "operationId": "IntegrationsController_createIntegration", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationDto" + } + } + } + }, + "responses": { + "200": { + "description": "Integration created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessBooleanResponse" + } + } + } }, - "mcpServers": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] + "400": { + "description": "Bad Request — validation error or invalid integration data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "frontendActions": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 + "401": { + "description": "Unauthorized — missing or invalid admin API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Integrations" + ], + "description": "Register a new AI framework integration (e.g., OpenAI, CrewAI, LangGraph).", + "summary": "Create a new AI framework integration" + }, + "get": { + "operationId": "IntegrationsController_getIntegrations", + "parameters": [ + { + "name": "type", + "required": false, + "in": "query", + "description": "Optional integration type", + "schema": { + "type": "string" + } }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" + { + "name": "isActive", + "required": false, + "in": "query", + "description": "Optional active status", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "List of integrations matching the filter criteria", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "openai" + }, + "name": { + "type": "string", + "example": "OpenAI" + }, + "icon": { + "type": "string", + "example": "https://example.com/openai-icon.png" + }, + "type": { + "type": "string", + "enum": [ + "agent", + "llm" + ], + "example": "agent" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + }, + "metaData": { + "type": "object", + "example": {} + }, + "appId": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + } + } + } + } + } + } }, - "metaData": { - "type": "object", - "example": {} + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "model": { - "type": "string", - "example": "gpt-4o-mini" + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Integrations" + ], + "description": "Retrieve a list of available AI framework integrations, optionally filtered by type and active status. Results include populated tag objects. When an appid header is provided, results are scoped to integrations available for that app.", + "summary": "List available AI framework integrations" + } + }, + "/ai-agents/agent-builder/agents/available-models": { + "get": { + "operationId": "AgentBuilderController_getAvailableModels", + "parameters": [], + "responses": { + "200": { + "description": "List of available AI models", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "provider": { + "type": "string", + "example": "openai" + }, + "settings": { + "type": "object", + "example": {} + }, + "default": { + "type": "boolean", + "example": false + } + } + } + } + } + } }, - "modelMetaData": { - "type": "object", - "example": {} + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get available models", + "tags": [ + "Agent Builder" + ], + "description": "Retrieve the list of AI models available for agents. Each model includes its provider, configuration settings, and whether it is the default. The default model is used when no model is explicitly specified during agent creation." + } + }, + "/ai-agents/agent-builder/agents/variables/all": { + "get": { + "operationId": "AgentBuilderController_getAvailableVariables", + "parameters": [ + { + "name": "groupByCategory", + "required": false, + "in": "query", + "description": "Group variables by category", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "List of variables (flat array or grouped by category)", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "sourceType": { + "type": "string" + }, + "category": { + "type": "string" + }, + "usageCount": { + "type": "number" + }, + "usedByAgents": { + "type": "array", + "items": { + "type": "object" + } + }, + "usedByTools": { + "type": "object" + } + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object" + } + }, + "example": { + "auth": [], + "custom": [] + } + } + ] + } + } + } }, - "createdAt": { - "type": "number", - "example": 1700000000000 + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } }, - "updatedAt": { - "type": "number", - "example": 1700000000000 + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } } - } - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get an agent by UID", - "tags": [ - "Agent Builder" - ], - "description": "Retrieve a specific agent by its UID." - }, - "patch": { - "operationId": "AgentBuilderController_update", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateCometChatAgentDto" - } - } - } - }, - "responses": { - "200": { - "description": "Agent updated successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessBooleanResponse" - } - } - } - }, - "400": { - "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Update an agent by UID", - "tags": [ - "Agent Builder" - ], - "description": "Update an existing agent by its UID." - }, - "delete": { - "operationId": "AgentBuilderController_remove", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Agent deleted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessMessageResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Delete an agent by UID", - "tags": [ - "Agent Builder" - ], - "description": "Delete a specific agent by its UID." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/add": { - "patch": { - "operationId": "AgentBuilderController_addToolsToAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentToolsDto" - } - } - } - }, - "responses": { - "200": { - "description": "Tools successfully added to the agent.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "data": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all available variables for an app", + "tags": [ + "Agent Builder" + ], + "description": "Retrieve all enabled variables (predefined and custom) for the application. Each variable includes usage information showing which agents reference it in their instructions and which API tools use it. Set groupByCategory to true to group results by category (e.g., auth, custom); otherwise results are returned as a flat array." + } + }, + "/ai-agents/agent-builder/agents/{agentId}/tools/search": { + "get": { + "operationId": "AgentBuilderController_searchAllTools", + "parameters": [ + { + "name": "agentId", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { + } + }, + { + "name": "key", + "required": false, + "in": "query", + "description": "Search term to filter actions by name, description, or slug", + "schema": { "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { + } + }, + { + "name": "slug", + "required": false, + "in": "query", + "description": "Filter by specific integration slug", + "schema": { "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid tool slugs or malformed request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add tools to an agent", - "tags": [ - "Agent Builder" - ], - "description": "Add one or more tools to a specific agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/remove": { - "patch": { - "operationId": "AgentBuilderController_removeToolsFromAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentToolsDto" - } - } - } - }, - "responses": { - "200": { - "description": "Tools successfully removed from the agent.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "data": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 + ], + "responses": { + "200": { + "description": "Aggregated search results from all tool sources", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "results": { + "type": "array", + "items": { + "type": "object" + }, + "example": [] + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid search parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid tool slugs or malformed request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove tools from an agent", - "tags": [ - "Agent Builder" - ], - "description": "Remove one or more tools from a specific agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/mcp/add": { - "patch": { - "operationId": "AgentBuilderController_addMcpServersToAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentMcpDto" - } - } - } - }, - "responses": { - "200": { - "description": "MCP servers successfully added to the agent.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "data": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Search across ready to use tool actions, api tools and mcp for an agent", + "tags": [ + "Agent Builder" + ], + "description": "Search across all tool types available for an agent, including ready-to-use tool actions, API tools, and MCP servers. Results are aggregated into a single array. Use the key parameter to filter by name, description, or slug, and the slug parameter to filter by a specific integration." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/enabled-items": { + "get": { + "operationId": "AgentBuilderController_getEnabledItems", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { + } + }, + { + "name": "tools", + "required": false, + "in": "query", + "description": "Include enabled tools (default: true)", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "name": "frontendActions", + "required": false, + "in": "query", + "description": "Include enabled frontend actions (default: true)", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "name": "apiTools", + "required": false, + "in": "query", + "description": "Include enabled API tools (default: true)", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "name": "mcpServers", + "required": false, + "in": "query", + "description": "Include enabled MCP servers (default: true)", + "schema": { + "default": true, + "type": "boolean" + } + }, + { + "name": "key", + "required": false, + "in": "query", + "description": "Search term to filter by name/description", + "schema": { "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { + } + }, + { + "name": "_", + "required": false, + "in": "query", + "description": "Cache-busting timestamp (ignored by server)", + "schema": { "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid MCP server slugs or malformed request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add MCP servers to an agent", - "tags": [ - "Agent Builder" - ], - "description": "Add one or more MCP servers to a specific agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/mcp/remove": { - "patch": { - "operationId": "AgentBuilderController_removeMcpServersFromAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentMcpDto" - } - } - } - }, - "responses": { - "200": { - "description": "MCP servers successfully removed from the agent.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "data": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { + ], + "responses": { + "200": { + "description": "Categorized enabled items for the agent", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "tools": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + } + } + }, + "frontendActions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "triggerFunction": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + }, + "apiTools": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "method": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + }, + "mcpServers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "url": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid query parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get enabled items (tools, frontend actions, API tools, MCP servers) for an agent", + "tags": [ + "Agent Builder" + ], + "description": "Retrieve all enabled items for a specific agent, categorized by type: tools (with their actions), frontend actions, API tools, and MCP servers. Each category can be individually toggled via query parameters. Use the key parameter to filter results by name or description across all categories. Returns 404 if the agent does not exist." + } + }, + "/ai-agents/agent-builder/agents": { + "post": { + "operationId": "AgentBuilderController_create", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCometChatAgentDto" + } + } + } + }, + "responses": { + "200": { + "description": "Agent created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "agent": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create a new agent", + "tags": [ + "Agent Builder" + ], + "description": "Create a new agent with optional tools, API tools, MCP servers, and frontend actions. All referenced tools, API tools, and MCP servers are validated before creation. The default AI model is assigned if none is specified." + }, + "get": { + "operationId": "AgentBuilderController_findAll", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "Search term to filter agents by name, description, or other fields", + "schema": { "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { + } + } + ], + "responses": { + "200": { + "description": "Paginated list of agents", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "count": { + "type": "number" + } + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all agents for an app", + "tags": [ + "Agent Builder" + ], + "description": "Retrieve a paginated list of agents for the application. Supports cursor-based pagination using createdAt timestamps with prepend/append navigation. Use the search parameter to filter agents by name, description, or UID. Results are sorted by creation date in descending order." + } + }, + "/ai-agents/agent-builder/agents/{id}": { + "get": { + "operationId": "AgentBuilderController_findOne", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid MCP server slugs or malformed request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } + ], + "responses": { + "200": { + "description": "Agent details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get an agent by UID", + "tags": [ + "Agent Builder" + ], + "description": "Retrieve a specific agent by its unique identifier. Returns 404 if no agent with the given UID exists." + }, + "patch": { + "operationId": "AgentBuilderController_update", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCometChatAgentDto" + } + } + } + }, + "responses": { + "200": { + "description": "Agent updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessBooleanResponse" + } + } + } + }, + "400": { + "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update an agent by UID", + "tags": [ + "Agent Builder" + ], + "description": "Update an existing agent by its UID. Referenced tools, API tools, and MCP servers are validated if provided." + }, + "delete": { + "operationId": "AgentBuilderController_remove", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Agent deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete an agent by UID", + "tags": [ + "Agent Builder" + ], + "description": "Delete an agent by its UID." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/add": { + "patch": { + "operationId": "AgentBuilderController_addToolsToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Tools successfully added to the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid tool slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add tools to an agent", + "tags": [ + "Agent Builder" + ], + "description": "Add one or more tools to a specific agent. The tools array in the request body contains tool slug identifiers. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/remove": { + "patch": { + "operationId": "AgentBuilderController_removeToolsFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Tools successfully removed from the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid tool slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove tools from an agent", + "tags": [ + "Agent Builder" + ], + "description": "Remove one or more tools from a specific agent. The tools array in the request body contains tool slug identifiers to remove. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/mcp/add": { + "patch": { + "operationId": "AgentBuilderController_addMcpServersToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentMcpDto" + } + } + } + }, + "responses": { + "200": { + "description": "MCP servers successfully added to the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid MCP server slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add MCP servers to an agent", + "tags": [ + "Agent Builder" + ], + "description": "Add one or more MCP servers to a specific agent. The mcps array in the request body contains MCP server slug identifiers. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/mcp/remove": { + "patch": { + "operationId": "AgentBuilderController_removeMcpServersFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentMcpDto" + } + } + } + }, + "responses": { + "200": { + "description": "MCP servers successfully removed from the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid MCP server slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove MCP servers from an agent", + "tags": [ + "Agent Builder" + ], + "description": "Remove one or more MCP servers from a specific agent. The mcps array in the request body contains MCP server slug identifiers to remove. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/api-tools/add": { + "patch": { + "operationId": "AgentBuilderController_addApiToolsToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentApiToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "API tools successfully added to the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid API tool slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add API tools to an agent", + "tags": [ + "Agent Builder" + ], + "description": "Add one or more API tools to a specific agent. The apiTools array in the request body contains API tool slug identifiers. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/api-tools/remove": { + "patch": { + "operationId": "AgentBuilderController_removeApiToolsFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentApiToolsDto" + } + } + } + }, + "responses": { + "200": { + "description": "API tools successfully removed from the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid API tool slugs or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove API tools from an agent", + "tags": [ + "Agent Builder" + ], + "description": "Remove one or more API tools from a specific agent. The apiTools array in the request body contains API tool slug identifiers to remove. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/add": { + "patch": { + "operationId": "AgentBuilderController_addFrontendActionsToAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Frontend actions successfully added to the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid frontend action identifiers or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add frontend actions to an agent", + "tags": [ + "Agent Builder" + ], + "description": "Add one or more frontend actions to a specific agent. Frontend actions allow agents to trigger client-side UI operations. The frontendActions array in the request body contains frontend action identifiers. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/remove": { + "patch": { + "operationId": "AgentBuilderController_removeFrontendActionsFromAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Frontend actions successfully removed from the agent.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "agent-uuid-1234" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "Support Agent" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "isActive": { + "type": "boolean", + "example": true + }, + "description": { + "type": "string", + "example": "A helpful support agent" + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "gmail", + "slack" + ] + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "websites": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "otherKbIntegrations": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "apiTools": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "frontendActions": { + "type": "array", + "items": { + "type": "string" + }, + "example": [] + }, + "ragVersion": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "example": "v2" + }, + "lastMessageAt": { + "type": "number", + "nullable": true, + "example": 1700000000000 + }, + "instruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "formattedInstruction": { + "type": "string", + "example": "You are a helpful assistant" + }, + "metaData": { + "type": "object", + "example": {} + }, + "model": { + "type": "string", + "example": "gpt-4o-mini" + }, + "modelMetaData": { + "type": "object", + "example": {} + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid frontend action identifiers or malformed request body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — agent with the given UID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove frontend actions from an agent", + "tags": [ + "Agent Builder" + ], + "description": "Remove one or more frontend actions from a specific agent. The frontendActions array in the request body contains frontend action identifiers to remove. Returns the updated agent object." + } + }, + "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/add": { + "patch": { + "operationId": "AgentBuilderController_addFilesToKnowledgeBase", + "parameters": [ + { + "name": "agentId", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + }, + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" + } + } + } + }, + "responses": { + "200": { + "description": "Files added to knowledge base successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Add files to agent knowledge base", + "tags": [ + "Agent Builder" + ] } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } + }, + "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/remove": { + "patch": { + "operationId": "AgentBuilderController_removeFilesFromKnowledgeBase", + "parameters": [ + { + "name": "agentId", + "required": true, + "in": "path", + "description": "Unique identifier of the agent", + "schema": { + "type": "string" + } + }, + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" + } + } + } + }, + "responses": { + "200": { + "description": "Files removed from knowledge base successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove files from agent knowledge base", + "tags": [ + "Agent Builder" + ] } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/add": { + "patch": { + "operationId": "AgentBuilderController_addActionsToTool", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Tool slug (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Actions added successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Enable actions for a tool", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/remove": { + "patch": { + "operationId": "AgentBuilderController_removeActionsFromTool", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Tool slug (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ManageActionsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Actions removed successfully" + }, + "400": { + "description": "Bad request - validation error" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Remove actions for a tool", + "tags": [ + "Agent Builder" + ] + } + }, + "/ai-agents/agent-builder/agents/variables/custom": { + "get": { + "operationId": "AgentBuilderController_getAllCustomVariables", + "parameters": [], + "responses": { + "200": { + "description": "List of custom variables", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "507f1f77bcf86cd799439011" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "user.plan" + }, + "description": { + "type": "string", + "example": "The user subscription plan" + }, + "sourceType": { + "type": "string", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" + }, + "sourcePath": { + "type": "string", + "example": "metadata.plan" + }, + "constantValue": { + "type": "string", + "example": "" + }, + "defaultValue": { + "type": "string", + "example": "free" + }, + "category": { + "type": "string", + "enum": [ + "custom" + ], + "example": "custom" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all custom variables for the app", + "tags": [ + "Agent Builder" + ], + "description": "Retrieve all custom variables defined for the application. Custom variables allow dynamic value injection into agent instructions using metadata from messages, users, or constant values. Each variable includes its source type, resolution path, and default value." + }, + "post": { + "operationId": "AgentBuilderController_createCustomVariable", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCustomVariableDto" + } + } + } + }, + "responses": { + "201": { + "description": "Custom variable created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "507f1f77bcf86cd799439011" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "user.plan" + }, + "description": { + "type": "string", + "example": "The user subscription plan" + }, + "sourceType": { + "type": "string", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" + }, + "sourcePath": { + "type": "string", + "example": "metadata.plan" + }, + "constantValue": { + "type": "string", + "example": "" + }, + "defaultValue": { + "type": "string", + "example": "free" + }, + "category": { + "type": "string", + "enum": [ + "custom" + ], + "example": "custom" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate variable name.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create a new custom variable", + "tags": [ + "Agent Builder" + ], + "description": "Create a new custom variable for the application. Custom variables can source their values from message metadata, user metadata, or a constant value. Variable names must be unique within the app and follow the pattern [a-zA-Z][a-zA-Z0-9_.]*." + } + }, + "/ai-agents/agent-builder/agents/variables/custom/{variableId}": { + "patch": { + "operationId": "AgentBuilderController_updateCustomVariable", + "parameters": [ + { + "name": "variableId", + "required": true, + "in": "path", + "description": "Variable ID to update", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCustomVariableDto" + } + } + } + }, + "responses": { + "200": { + "description": "Custom variable updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "507f1f77bcf86cd799439011" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "user.plan" + }, + "description": { + "type": "string", + "example": "The user subscription plan" + }, + "sourceType": { + "type": "string", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" + }, + "sourcePath": { + "type": "string", + "example": "metadata.plan" + }, + "constantValue": { + "type": "string", + "example": "" + }, + "defaultValue": { + "type": "string", + "example": "free" + }, + "category": { + "type": "string", + "enum": [ + "custom" + ], + "example": "custom" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — custom variable with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update a custom variable", + "tags": [ + "Agent Builder" + ], + "description": "Update an existing custom variable by its ID. Only the provided fields are updated; omitted fields remain unchanged. The variable name cannot be changed after creation." + }, + "delete": { + "operationId": "AgentBuilderController_deleteCustomVariable", + "parameters": [ + { + "name": "variableId", + "required": true, + "in": "path", + "description": "Variable ID to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Custom variable deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — custom variable with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete a custom variable", + "tags": [ + "Agent Builder" + ], + "description": "Delete a custom variable by its ID. Any agent instructions referencing this variable will no longer resolve its value." + } + }, + "/ai-agents/agent-builder/api-tools": { + "get": { + "operationId": "ApiToolsController_getAllApiTools", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Paginated list of API tools", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-api-tool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-api-tool" + }, + "name": { + "type": "string", + "example": "My API Tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "endpoint": { + "type": "string", + "example": "https://api.example.com/search" + }, + "method": { + "type": "string", + "example": "GET" + }, + "enableBasicAuth": { + "type": "boolean", + "example": false + }, + "headers": { + "type": "string", + "nullable": true, + "example": "{\"Content-Type\":\"application/json\"}" + }, + "bodyTemplate": { + "type": "string", + "nullable": true, + "example": "{\"query\":\"{{query}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "example": false + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "query" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The search query" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "my-api-tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "example": { + "limit": 10, + "count": 5 + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all api-tools for an app", + "tags": [ + "Agent Builder API Tools" + ], + "description": "Retrieve a paginated list of API tools for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page." + }, + "post": { + "operationId": "ApiToolsController_createApiTool", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "API tool created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-api-tool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-api-tool" + }, + "name": { + "type": "string", + "example": "My API Tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "endpoint": { + "type": "string", + "example": "https://api.example.com/search" + }, + "method": { + "type": "string", + "example": "GET" + }, + "enableBasicAuth": { + "type": "boolean", + "example": false + }, + "headers": { + "type": "string", + "nullable": true, + "example": "{\"Content-Type\":\"application/json\"}" + }, + "bodyTemplate": { + "type": "string", + "nullable": true, + "example": "{\"query\":\"{{query}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "example": false + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "query" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The search query" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "my-api-tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate slug.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ], + "description": "Create a new API tool for the application. The slug must be unique per application. A tool object is automatically generated from the provided parameters, description, and slug.", + "summary": "Create a new API tool" + } + }, + "/ai-agents/agent-builder/api-tools/{slug}": { + "get": { + "operationId": "ApiToolsController_getApiToolBySlug", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "API tool details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-api-tool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-api-tool" + }, + "name": { + "type": "string", + "example": "My API Tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "endpoint": { + "type": "string", + "example": "https://api.example.com/search" + }, + "method": { + "type": "string", + "example": "GET" + }, + "enableBasicAuth": { + "type": "boolean", + "example": false + }, + "headers": { + "type": "string", + "nullable": true, + "example": "{\"Content-Type\":\"application/json\"}" + }, + "bodyTemplate": { + "type": "string", + "nullable": true, + "example": "{\"query\":\"{{query}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "example": false + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "query" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The search query" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "my-api-tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid slug parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — API tool with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ], + "description": "Retrieve a specific API tool by its unique slug. Returns 404 if no API tool with the given slug exists.", + "summary": "Get an API tool by slug" + }, + "patch": { + "operationId": "ApiToolsController_updateApiTool", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateApiToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "API tool updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-api-tool" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-api-tool" + }, + "name": { + "type": "string", + "example": "My API Tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "endpoint": { + "type": "string", + "example": "https://api.example.com/search" + }, + "method": { + "type": "string", + "example": "GET" + }, + "enableBasicAuth": { + "type": "boolean", + "example": false + }, + "headers": { + "type": "string", + "nullable": true, + "example": "{\"Content-Type\":\"application/json\"}" + }, + "bodyTemplate": { + "type": "string", + "nullable": true, + "example": "{\"query\":\"{{query}}\"}" + }, + "allowAdditionalProperties": { + "type": "boolean", + "example": false + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "query" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The search query" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "my-api-tool" + }, + "description": { + "type": "string", + "example": "Calls an external API" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — API tool with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ], + "description": "Update an existing API tool by its unique slug. The tool object is automatically regenerated from the updated parameters and description. Returns 404 if no API tool with the given slug exists.", + "summary": "Update an API tool by slug" + }, + "delete": { + "operationId": "ApiToolsController_deleteApiTool", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "API tool deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "400": { + "description": "Bad Request — invalid slug parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — API tool with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder API Tools" + ], + "description": "Delete an API tool by its unique slug. Returns 404 if no API tool with the given slug exists.", + "summary": "Delete an API tool by slug" + } + }, + "/ai-agents/agent-builder/mcp-servers": { + "post": { + "operationId": "McpServersController_createMcpServer", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMcpServerDto" + } + } + } + }, + "responses": { + "200": { + "description": "MCP server created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-mcp-server" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-mcp-server" + }, + "name": { + "type": "string", + "example": "My MCP Server" + }, + "description": { + "type": "string", + "example": "A Model Context Protocol server" + }, + "url": { + "type": "string", + "example": "https://mcp.example.com/sse" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate slug.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ], + "description": "Create a new MCP server configuration for the application. The slug must be unique per application.", + "summary": "Create a new MCP server" + }, + "get": { + "operationId": "McpServersController_getAllMcpServers", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Paginated list of MCP servers", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-mcp-server" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-mcp-server" + }, + "name": { + "type": "string", + "example": "My MCP Server" + }, + "description": { + "type": "string", + "example": "A Model Context Protocol server" + }, + "url": { + "type": "string", + "example": "https://mcp.example.com/sse" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "example": { + "limit": 10, + "count": 5 + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ], + "description": "Retrieve a paginated list of MCP servers for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page.", + "summary": "Get all MCP servers for an app" + } + }, + "/ai-agents/agent-builder/mcp-servers/{slug}": { + "get": { + "operationId": "McpServersController_getMcpServerBySlug", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "MCP server details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-mcp-server" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-mcp-server" + }, + "name": { + "type": "string", + "example": "My MCP Server" + }, + "description": { + "type": "string", + "example": "A Model Context Protocol server" + }, + "url": { + "type": "string", + "example": "https://mcp.example.com/sse" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid slug parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — MCP server with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ], + "description": "Retrieve a specific MCP server by its unique slug. Returns 404 if no MCP server with the given slug exists.", + "summary": "Get an MCP server by slug" + }, + "patch": { + "operationId": "McpServersController_updateMcpServer", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMcpServerDto" + } + } + } + }, + "responses": { + "200": { + "description": "MCP server updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_my-mcp-server" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "slug": { + "type": "string", + "example": "my-mcp-server" + }, + "name": { + "type": "string", + "example": "My MCP Server" + }, + "description": { + "type": "string", + "example": "A Model Context Protocol server" + }, + "url": { + "type": "string", + "example": "https://mcp.example.com/sse" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — MCP server with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ], + "description": "Update an existing MCP server by its unique slug. Returns 404 if no MCP server with the given slug exists.", + "summary": "Update an MCP server by slug" + }, + "delete": { + "operationId": "McpServersController_deleteMcpServer", + "parameters": [ + { + "name": "slug", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "MCP server deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "400": { + "description": "Bad Request — invalid slug parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — MCP server with the given slug does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "Agent Builder MCP Servers" + ], + "description": "Delete an MCP server by its unique slug. Returns 404 if no MCP server with the given slug exists.", + "summary": "Delete an MCP server by slug" + } + }, + "/ai-agents/agent-builder/tools/agent/{agentUid}": { + "get": { + "operationId": "ComposioController_getAvailableIntegration", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": false, + "in": "query", + "description": "Optional slug to filter integration (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], + "type": "string" + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "Search term for tool name or slug", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Available Composio tools retrieved successfully from integrations", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "example": "gmail" + }, + "name": { + "type": "string", + "example": "Gmail" + }, + "icon": { + "type": "string", + "example": "https://example.com/gmail-icon.png" + }, + "description": { + "type": "string", + "example": "Gmail integration for sending and managing emails" + }, + "actions": { + "type": "array", + "items": { + "type": "object" + }, + "example": [ + { + "name": "GMAIL_SEND_EMAIL", + "displayName": "Send Email" + } + ] + }, + "isAuthenticated": { + "type": "boolean", + "example": false + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "example": { + "limit": 10, + "count": 5 + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get Ready To Use Tools", + "tags": [ + "Agent Builder Ready to Use Tools" + ], + "description": "Retrieve a paginated list of ready-to-use tool integrations available for the specified agent. Each tool includes its slug, name, icon, description, available actions, and authentication status. Supports cursor-based pagination using the affix and createdAt query parameters. Optionally filter by slug or search by tool name." + } + }, + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions": { + "get": { + "operationId": "ComposioController_getAvailableComposioToolsForAgent", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Get actions available within a tool (e.g., send-email, draft-email)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Available Composio tools retrieved successfully from integrations" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get actions available within a tool for agent", + "tags": [ + "Agent Builder Ready to Use Tools" + ] } - } }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove MCP servers from an agent", - "tags": [ - "Agent Builder" - ], - "description": "Remove one or more MCP servers from a specific agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/api-tools/add": { - "patch": { - "operationId": "AgentBuilderController_addApiToolsToAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentApiToolsDto" - } + "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/authenticate": { + "post": { + "operationId": "ComposioController_authenticateTool", + "parameters": [ + { + "name": "agentUid", + "required": true, + "in": "path", + "description": "AI Agent UID", + "schema": { + "type": "string" + } + }, + { + "name": "slug", + "required": true, + "in": "path", + "description": "Tool slug to authenticate (e.g., gmail, googlesheets)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticateToolDto" + } + } + } + }, + "responses": { + "200": { + "description": "OAuth authentication initiated successfully with redirect URL" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Authenticate a Composio tool with OAuth", + "tags": [ + "Agent Builder Ready to Use Tools" + ] } - } }, - "responses": { - "200": { - "description": "API tools successfully added to the agent.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "data": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { + "/ai-agents/agent-builder/frontend-actions": { + "get": { + "operationId": "FrontendActionsController_getAllFrontendActions", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "schema": { + "enum": [ + "prepend", + "append" + ], "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { + } + }, + { + "name": "createdAt", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Paginated list of frontend actions", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_onUserClick" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "User Click Action" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "triggerFunction": { + "type": "string", + "example": "onUserClick" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "userId" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The user identifier" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "onUserClick" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + }, + "meta": { + "type": "object", + "properties": { + "previous": { + "type": "object", + "example": { + "affix": "prepend", + "createdAt": 1700000000000 + } + }, + "current": { + "type": "object", + "example": { + "limit": 10, + "count": 5 + } + }, + "next": { + "type": "object", + "example": { + "affix": "append", + "createdAt": 1700000000000 + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid pagination parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all frontend actions for an app", + "tags": [ + "Agent Builder Frontend Actions" + ], + "description": "Retrieve a paginated list of frontend actions for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page." + }, + "post": { + "operationId": "FrontendActionsController_createFrontendAction", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFrontendActionDto" + } + } + } + }, + "responses": { + "200": { + "description": "Frontend action created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_onUserClick" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "User Click Action" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "triggerFunction": { + "type": "string", + "example": "onUserClick" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "userId" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The user identifier" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "onUserClick" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error or duplicate trigger function.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create a frontend action", + "tags": [ + "Agent Builder Frontend Actions" + ], + "description": "Create a new frontend action for the application. The trigger function must be unique per application. A tool object is automatically generated from the provided parameters, description, and trigger function." + } + }, + "/ai-agents/agent-builder/frontend-actions/{id}": { + "get": { + "operationId": "FrontendActionsController_getFrontendActionById", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { + } + } + ], + "responses": { + "200": { + "description": "Frontend action details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_onUserClick" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "User Click Action" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "triggerFunction": { + "type": "string", + "example": "onUserClick" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "userId" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The user identifier" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "onUserClick" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — invalid ID parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — frontend action with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get a frontend action by id", + "tags": [ + "Agent Builder Frontend Actions" + ], + "description": "Retrieve a specific frontend action by its unique ID. Returns 404 if no frontend action with the given ID exists." + }, + "patch": { + "operationId": "FrontendActionsController_updateFrontendAction", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFrontendActionDto" + } + } + } + }, + "responses": { + "200": { + "description": "Frontend action updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "example": "myapp_onUserClick" + }, + "appId": { + "type": "string", + "example": "my-app-id" + }, + "name": { + "type": "string", + "example": "User Click Action" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "triggerFunction": { + "type": "string", + "example": "onUserClick" + }, + "icon": { + "type": "string", + "example": "https://example.com/icon.png" + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "userId" + }, + "type": { + "type": "string", + "example": "string" + }, + "description": { + "type": "string", + "example": "The user identifier" + }, + "required": { + "type": "boolean", + "example": true + } + } + } + }, + "tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "onUserClick" + }, + "description": { + "type": "string", + "example": "Triggered when a user clicks a button" + }, + "parameters": { + "type": "object", + "example": { + "type": "object", + "properties": {}, + "required": [] + } + } + } + }, + "createdAt": { + "type": "number", + "example": 1700000000000 + }, + "updatedAt": { + "type": "number", + "example": 1700000000000 + } + } + } + } + } + }, + "400": { + "description": "Bad Request — validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — frontend action with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update a frontend action", + "tags": [ + "Agent Builder Frontend Actions" + ], + "description": "Update an existing frontend action by its unique ID. The tool object is automatically regenerated from the updated parameters and description. Returns 404 if no frontend action with the given ID exists." + }, + "delete": { + "operationId": "FrontendActionsController_deleteFrontendAction", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { + } + } + ], + "responses": { + "200": { + "description": "Frontend action deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessMessageResponse" + } + } + } + }, + "400": { + "description": "Bad Request — invalid ID parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — frontend action with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete a frontend action", + "tags": [ + "Agent Builder Frontend Actions" + ], + "description": "Delete a frontend action by its unique ID. Returns 404 if no frontend action with the given ID exists." + } + }, + "/ai-agents/agent-builder/knowledge-base/uploads/initiate": { + "post": { + "description": "Generate presigned URLs and create upload records for one or more files to be added to the knowledge base.", + "operationId": "RagController_initiateUpload", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InitiateUploadDto" + }, + "examples": { + "example1": { + "summary": "Upload multiple files", + "value": { + "files": [ + { + "fileName": "document.pdf", + "mimeType": "application/pdf", + "fileSize": 1024000 + }, + { + "fileName": "document_2.pdf", + "mimeType": "application/pdf", + "fileSize": 512000 + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Presigned URLs generated and upload records created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uploads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uploadId": { + "type": "string", + "description": "Unique upload session ID" + }, + "fileName": { + "type": "string", + "description": "Original file name" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the file" + }, + "fileSize": { + "type": "number", + "description": "File size in bytes" + }, + "s3Key": { + "type": "string", + "description": "S3 object key for the upload" + }, + "presignedUrl": { + "type": "string", + "description": "Presigned URL for direct S3 upload" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — missing appId header or invalid file metadata.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Initiate file uploads", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/text": { + "post": { + "description": "Create a new text-based knowledge base entry. Accepts a title and text content, converts it to a Markdown file, and adds it to the knowledge base.", + "operationId": "RagController_createTextDetail", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTextDetailDto" + }, + "examples": { + "example1": { + "summary": "Create a text detail", + "value": { + "title": "Company Policy Document", + "text": "This document outlines the company policies and procedures for remote work, including communication guidelines, working hours expectations, and performance metrics." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Text detail created and uploaded to S3 successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Text detail created and uploaded successfully" + }, + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string", + "description": "Unique identifier for the text detail" + }, + "title": { + "type": "string", + "description": "Title of the text detail" + }, + "fileName": { + "type": "string", + "description": "Generated .md file name" + }, + "s3Key": { + "type": "string", + "description": "S3 object key for the uploaded file" + }, + "status": { + "type": "string", + "description": "Current processing status", + "example": "indexing" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — missing appId header or invalid text detail data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Create text detail and upload to knowledge base", + "tags": [ + "knowledge-base" + ] + }, + "get": { + "description": "Retrieve all text-based knowledge base entries for the application.", + "operationId": "RagController_getTextDetails", + "parameters": [], + "responses": { + "200": { + "description": "Text details retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get all text details for an app", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/text/{uniqueId}": { + "get": { + "description": "Retrieve a specific text-based knowledge base entry by its unique ID.", + "operationId": "RagController_getTextDetailById", + "parameters": [ + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique text detail ID", + "schema": { + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { + } + } + ], + "responses": { + "200": { + "description": "Text detail retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "text": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "s3Key": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vectorizationStatus": { + "type": "string" + }, + "createdAt": { + "type": "number" + }, + "updatedAt": { + "type": "number" + }, + "isActive": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get a specific text detail by uniqueId", + "tags": [ + "knowledge-base" + ] + }, + "patch": { + "description": "Update a specific text-based knowledge base entry by its unique ID. The content is re-uploaded and the entry status is reset to indexing.", + "operationId": "RagController_updateTextDetail", + "parameters": [ + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique text detail ID", + "schema": { + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTextDetailDto" + }, + "examples": { + "example1": { + "summary": "Update text detail", + "value": { + "title": "Updated Company Policy Document", + "text": "This is the updated document content with new policies and procedures..." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Text detail updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string" + }, + "title": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "s3Key": { + "type": "string" + }, + "status": { + "type": "string" + }, + "vectorizationStatus": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Update a specific text detail by uniqueId", + "tags": [ + "knowledge-base" + ] + }, + "delete": { + "description": "Delete a text-based knowledge base entry by its unique ID, including its associated upload record and stored content.", + "operationId": "RagController_deleteTextDetail", + "parameters": [ + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique text detail ID to delete", + "schema": { "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid API tool slugs or malformed request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add API tools to an agent", - "tags": [ - "Agent Builder" - ], - "description": "Add one or more API tools to a specific agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/api-tools/remove": { - "patch": { - "operationId": "AgentBuilderController_removeApiToolsFromAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentApiToolsDto" - } - } - } - }, - "responses": { - "200": { - "description": "API tools successfully removed from the agent.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "data": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { + ], + "responses": { + "200": { + "description": "Text detail and all associated data deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Text detail and all associated data deleted successfully" + }, + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string", + "description": "Unique identifier of the deleted text detail" + }, + "fileName": { + "type": "string", + "description": "Name of the deleted file" + }, + "uniqueFileId": { + "type": "string", + "description": "Unique file identifier" + }, + "deletedFromAgents": { + "type": "boolean", + "description": "Whether the file reference was removed from agents" + }, + "vectorsDeleted": { + "type": "boolean", + "description": "Whether associated vector embeddings were deleted" + }, + "s3FileDeleted": { + "type": "boolean", + "description": "Whether the S3 file was deleted" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request — missing appId header or uniqueId parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — text detail with the given uniqueId does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete text detail and all associated data", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base": { + "get": { + "description": "Retrieve knowledge base records for the application using cursor-based pagination. Records are returned in descending order (newest first). Supports bidirectional navigation using cursor and affix parameters.", + "operationId": "RagController_getKnowledgeBase", + "parameters": [ + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor (paginationKey from previous response meta). Used to fetch records relative to a specific position.", + "schema": { + "example": "1732492800000.12345", "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "Number of records per page (default: 10, maximum: 100)", + "schema": { + "example": 20, + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "description": "Navigation direction: \"append\" for next/older records, \"prepend\" for previous/newer records", + "schema": { + "enum": [ + "append", + "prepend" + ], "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { + } + }, + { + "name": "start", + "required": true, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "endTime", + "required": false, + "in": "query", + "description": "End timestamp (Unix timestamp in milliseconds) to filter records created before this time", + "schema": { + "example": 1732579200000, + "type": "number" + } + }, + { + "name": "startTime", + "required": false, + "in": "query", + "description": "Start timestamp (Unix timestamp in milliseconds) to filter records created after this time", + "schema": { + "example": 1732492800000, + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Knowledge base records retrieved successfully with pagination metadata", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Array of knowledge base records (excludes _id, __v, paginationKey)", + "items": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string", + "description": "Unique identifier for the record" + }, + "appId": { + "type": "string", + "description": "Application ID" + }, + "sourceName": { + "type": "string", + "description": "Name of the source file or text detail" + }, + "type": { + "type": "string", + "description": "Type of source (uploads, text-details)" + }, + "status": { + "type": "string", + "description": "Current status (inSync, indexing, indexed, failed)" + }, + "lastSynced": { + "type": "number", + "description": "Timestamp of last synchronization" + }, + "createdAt": { + "type": "number", + "description": "Creation timestamp" + }, + "updatedAt": { + "type": "number", + "description": "Last update timestamp" + } + } + } + }, + "meta": { + "type": "object", + "description": "Pagination metadata for navigation", + "properties": { + "current": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Requested page limit" + }, + "count": { + "type": "number", + "description": "Actual number of records returned" + } + } + }, + "previous": { + "type": "object", + "description": "Previous page navigation (only present if previous page exists)", + "properties": { + "affix": { + "type": "string", + "enum": [ + "prepend" + ], + "description": "Direction for previous page" + }, + "cursor": { + "type": "string", + "description": "Cursor for previous page" + } + } + }, + "next": { + "type": "object", + "description": "Next page navigation (only present if next page exists)", + "properties": { + "affix": { + "type": "string", + "enum": [ + "append" + ], + "description": "Direction for next page" + }, + "cursor": { + "type": "string", + "description": "Cursor for next page" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Missing appId header or invalid parameters" + }, + "500": { + "description": "Internal Server Error - Failed to retrieve knowledge base records" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get knowledge base records with cursor-based pagination", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/pages": { + "get": { + "description": "Retrieve paginated pages for a specific knowledge base source file. Supports limit, page, and affix parameters for pagination.", + "operationId": "RagController_getSourcePages", + "parameters": [ + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { + } + }, + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique file ID to fetch pages for", + "schema": { "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "Number of pages to return (default 1)", + "schema": { + "type": "number" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "Cursor page number for pagination", + "schema": { + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "description": "append or prepend", + "schema": { + "enum": [ + "prepend", + "append" + ], "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { + } + } + ], + "responses": { + "200": { + "description": "Source pages retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object" + } + }, + "meta": { + "type": "object" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get paginated source pages", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/sync": { + "patch": { + "description": "Trigger re-indexing for a specific knowledge base source by its type and unique ID.", + "operationId": "RagController_revectorizeSource", + "parameters": [ + { + "name": "sourceType", + "required": true, + "in": "path", + "description": "Source type (uploads, knowledge-base, etc.)", + "schema": { "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { + } + }, + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique source ID to revectorize", + "schema": { "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid API tool slugs or malformed request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove API tools from an agent", - "tags": [ - "Agent Builder" - ], - "description": "Remove one or more API tools from a specific agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/add": { - "patch": { - "operationId": "AgentBuilderController_addFrontendActionsToAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" - } - } - } - }, - "responses": { - "200": { - "description": "Frontend actions successfully added to the agent.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "data": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { + ], + "responses": { + "200": { + "description": "Revectorization triggered successfully." + }, + "400": { + "description": "Bad Request." + }, + "404": { + "description": "Source not found." + }, + "500": { + "description": "Internal Server Error." + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Resync/Revectorize source", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/status/poll": { + "post": { + "operationId": "RagController_getBatchStatus", + "parameters": [], + "requestBody": { + "required": true, + "description": "Array of unique IDs to query", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusQueryDto" + } + } + } + }, + "responses": { + "200": { + "description": "Status for requested unique IDs", + "content": { + "application/json": { + "schema": { + "type": "object", + "example": { + "success": true, + "data": { + "id1": "indexing", + "id2": "indexed" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get status for multiple unique IDs", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/scrape": { + "post": { + "description": "Scrape a website to discover and crawl its pages. Supports configuration options for URL filtering and crawl depth control.", + "operationId": "CrawlWebPagesController_crawlWebsite", + "parameters": [], + "requestBody": { + "required": true, + "description": "Website crawling configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrapePagesDto" + }, + "examples": { + "basic": { + "summary": "Website sitemap scrape", + "description": "Scrape website and fetch sitemap with basic configuration", + "value": { + "url": "https://example.com", + "maxDepth": 3, + "maxPages": 5 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Website scraped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Website scrape completed successfully" + }, + "data": { + "type": "object", + "properties": { + "crawlId": { + "type": "string", + "example": "crawl-1701789123456" + }, + "crawlDuration": { + "type": "number", + "example": 120000 + }, + "status": { + "type": "string", + "example": "completed" + }, + "sitemap": { + "type": "object", + "properties": { + "found": { + "type": "boolean", + "example": true + }, + "url": { + "type": "string", + "example": "https://docs.example.com/sitemap.xml" + }, + "totalUrls": { + "type": "number", + "example": 245 + }, + "urls": { + "type": "array", + "items": { + "type": "string" + } + }, + "lastModified": { + "type": "string", + "example": "2025-12-05T10:30:00Z" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 400 + }, + "message": { + "type": "string", + "example": "Invalid URL format" + }, + "error": { + "type": "string", + "example": "Bad Request" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized - missing or invalid appId" + }, + "429": { + "description": "Too many requests - rate limit exceeded" + }, + "500": { + "description": "Internal server error during scraping", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 500 + }, + "message": { + "type": "string", + "example": "Failed to scrape website: FIRECRAWL_API_KEY not configured" + }, + "error": { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Scrape a website and fetch sitemap", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/individual-page": { + "post": { + "description": "Scrape a single webpage to extract its title, description, and full content.", + "operationId": "CrawlWebPagesController_scrapePage", + "parameters": [], + "requestBody": { + "required": true, + "description": "Single page scraping configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrapeIndividualPageDto" + }, + "examples": { + "basic": { + "summary": "Basic page scrape", + "description": "Simple page content extraction", + "value": { + "url": "https://docs.example.com/getting-started", + "timeout": 30000, + "format": "markdown" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Page scraped successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Page scraped successfully" + }, + "data": { + "type": "object", + "properties": { + "url": { + "type": "string", + "example": "https://docs.example.com/getting-started" + }, + "title": { + "type": "string", + "example": "Getting Started Guide" + }, + "description": { + "type": "string", + "example": "Learn how to get started with our platform" + }, + "content": { + "type": "string", + "example": "# Getting Started\n\nWelcome to our platform..." + }, + "metadata": { + "type": "object", + "properties": { + "og": { + "type": "object" + }, + "twitter": { + "type": "object" + }, + "canonical": { + "type": "string" + }, + "language": { + "type": "string" + } + } + }, + "scraper": { + "type": "string", + "example": "Firecrawl" + }, + "crawlDuration": { + "type": "number", + "example": 2500 + }, + "contentLength": { + "type": "number", + "example": 1024 + }, + "timestamp": { + "type": "string", + "example": "2025-12-05T17:30:00Z" + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 400 + }, + "message": { + "type": "string", + "example": "Invalid URL format" + }, + "error": { + "type": "string", + "example": "Bad Request" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized - missing or invalid appId" + }, + "500": { + "description": "Internal server error during page scraping", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 500 + }, + "message": { + "type": "string", + "example": "Failed to scrape page: Timeout exceeded" + }, + "error": { + "type": "string", + "example": "Internal Server Error" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Scrape a single page and extract content", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls": { + "get": { + "description": "Retrieve all URLs discovered during a website crawl with cursor-based pagination.", + "operationId": "CrawlWebPagesController_getDiscoveredUrls", + "parameters": [ + { + "name": "parentUniqueId", + "required": true, + "in": "path", + "schema": { "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor (timestamp from previous response meta)", + "schema": { + "example": "1701789000000", "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "Number of records per page (default: 10, maximum: 100)", + "schema": { + "example": 20, + "type": "number" + } + }, + { + "name": "affix", + "required": false, + "in": "query", + "description": "Navigation direction: \"append\" for next/older records, \"prepend\" for previous/newer records", + "schema": { + "enum": [ + "append", + "prepend" + ], "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { + } + }, + { + "name": "status", + "required": false, + "in": "query", + "description": "Filter by URL processing status", + "schema": { + "enum": [ + "discovered", + "processing", + "processed", + "failed", + "skipped" + ], "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { + } + }, + { + "name": "startTime", + "required": false, + "in": "query", + "description": "Start timestamp (Unix timestamp in milliseconds) to filter records created after this time", + "schema": { + "example": 1701780000000, + "type": "number" + } + }, + { + "name": "endTime", + "required": false, + "in": "query", + "description": "End timestamp (Unix timestamp in milliseconds) to filter records created before this time", + "schema": { + "example": 1701790000000, + "type": "number" + } + }, + { + "name": "parentId", + "required": true, + "in": "path", + "description": "Unique ID of the parent crawl (from WebPages collection)", + "schema": { + "example": "uuid-1234-5678-9abc" + } + } + ], + "responses": { + "200": { + "description": "Discovered URLs retrieved successfully with pagination metadata", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Array of discovered URL records", + "items": { + "type": "object", + "properties": { + "urlId": { + "type": "string", + "description": "Unique identifier for the discovered URL", + "example": "uuid-abcd-1234" + }, + "url": { + "type": "string", + "description": "The discovered URL", + "example": "https://docs.example.com/guide" + }, + "title": { + "type": "string", + "description": "Page title extracted from the URL", + "example": "Getting Started Guide" + }, + "description": { + "type": "string", + "description": "Page description or meta description", + "example": "Learn how to get started..." + }, + "content": { + "type": "string", + "description": "Page content preview (truncated to 500 characters)", + "example": "Page content preview..." + }, + "status": { + "type": "string", + "description": "Processing status of the URL", + "example": "processed" + }, + "lastCrawledAt": { + "type": "number", + "description": "Timestamp when URL was last crawled", + "example": 1701789123456 + }, + "retryCount": { + "type": "number", + "description": "Number of retry attempts", + "example": 0 + }, + "createdAt": { + "type": "number", + "description": "Creation timestamp", + "example": 1701789000000 + }, + "updatedAt": { + "type": "number", + "description": "Last update timestamp", + "example": 1701789123456 + }, + "vectorizationStatus": { + "type": "string", + "description": "Status of content vectorization", + "example": "completed" + }, + "chunksCreated": { + "type": "number", + "description": "Number of text chunks created", + "example": 5 + }, + "embeddingsGenerated": { + "type": "number", + "description": "Number of embeddings generated", + "example": 5 + } + } + } + }, + "meta": { + "type": "object", + "description": "Pagination metadata for navigation", + "properties": { + "current": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Records per page limit used for this request" + }, + "count": { + "type": "number", + "description": "Number of records returned in this page" + } + } + }, + "previous": { + "type": "object", + "description": "Navigation info for previous page (newer records). Present only if there are newer records available.", + "properties": { + "affix": { + "type": "string", + "enum": [ + "prepend" + ], + "description": "Use \"prepend\" to get previous/newer records" + }, + "cursor": { + "type": "string", + "description": "Cursor value to use in next request for previous page" + } + } + }, + "next": { + "type": "object", + "description": "Navigation info for next page (older records). Present only if there are older records available.", + "properties": { + "affix": { + "type": "string", + "enum": [ + "append" + ], + "description": "Use \"append\" to get next/older records" + }, + "cursor": { + "type": "string", + "description": "Cursor value to use in next request for next page" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Missing appId header or invalid parameters" + }, + "500": { + "description": "Internal Server Error - Failed to retrieve discovered URLs" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get discovered URLs for a parent crawl", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process": { + "post": { + "description": "Mark discovered URLs for exclusion and initiate batch crawling of the remaining URLs.", + "operationId": "CrawlWebPagesController_processDiscoveredUrls", + "parameters": [ + { + "name": "parentUniqueId", + "required": true, + "in": "path", + "schema": { "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { + } + } + ], + "requestBody": { + "required": true, + "description": "Discovered URLs processing configuration. App ID is taken from header, not body.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDiscoveredUrlsDto" + }, + "examples": { + "basic": { + "summary": "Process discovered URLs", + "description": "Process multiple discovered URLs for batch crawling. App ID comes from header.", + "value": { + "exclude": [ + "550e8400-e29b-41d4-a716-446655440001", + "550e8400-e29b-41d4-a716-446655440002" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Batch processing initiated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Batch processing initiated successfully" + }, + "data": { + "type": "object", + "properties": { + "batchId": { + "type": "string", + "example": "batch-1701789123456" + }, + "urlsProcessed": { + "type": "number", + "example": 2 + }, + "totalUrls": { + "type": "number", + "example": 2 + }, + "webhookUrl": { + "type": "string", + "example": "https://webhook.site/b4994000-62d9-4e17-928f-790282cb5815" + }, + "status": { + "type": "string", + "example": "processing" + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid request parameters or mismatched arrays" + }, + "404": { + "description": "No valid discovered URLs found for processing" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Process discovered URLs for batch crawling", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/status/poll": { + "post": { + "description": "Retrieve the processing status of discovered URLs by their unique IDs within a parent website crawl. Only returns records for existing unique IDs.", + "operationId": "CrawlWebPagesController_getDiscoveredUrlsStatus", + "parameters": [ + { + "name": "parentUniqueId", + "required": true, + "in": "path", + "description": "Parent website crawl unique ID", + "schema": { + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { + } + } + ], + "requestBody": { + "required": true, + "description": "Array of discovered URL unique IDs to query status for", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoveredUrlsStatusQueryDto" + }, + "examples": { + "example1": { + "summary": "Query multiple discovered URL statuses", + "value": { + "uniqueId": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Status for requested discovered URLs (omits non-existing uniqueIds)", + "content": { + "application/json": { + "schema": { + "type": "object", + "example": { + "success": true, + "data": { + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e": "processed", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1": "discovered" + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Missing appId header or invalid parameters" + }, + "500": { + "description": "Internal Server Error - Failed to retrieve discovered URLs status" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Get status for multiple discovered URLs", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/sync": { + "patch": { + "description": "Selectively re-process specific discovered URLs that are not excluded. Allows syncing individual URLs within a parent website crawl without processing all discovered URLs.", + "operationId": "CrawlWebPagesController_syncDiscoveredUrls", + "parameters": [ + { + "name": "parentUniqueId", + "required": true, + "in": "path", + "description": "Parent website crawl unique ID", + "schema": { + "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid frontend action identifiers or malformed request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } + ], + "requestBody": { + "required": true, + "description": "Array of discovered URL unique IDs to sync. Only non-excluded URLs will be processed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncDiscoveredUrlsDto" + }, + "examples": { + "sync_specific_urls": { + "summary": "Sync specific discovered URLs", + "description": "Process only the specified discovered URLs that are not excluded", + "value": { + "uniqueIds": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1", + "550e8400-e29b-41d4-a716-446655440003" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Sync processing initiated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Sync processing initiated successfully" + }, + "data": { + "type": "object", + "properties": { + "batchId": { + "type": "string", + "example": "sync-batch-1701789123456" + }, + "urlsProcessed": { + "type": "number", + "example": 2 + }, + "totalRequested": { + "type": "number", + "example": 3 + }, + "excludedUrls": { + "type": "number", + "example": 1 + }, + "webhookUrl": { + "type": "string", + "example": "https://webhook.site/b4994000-62d9-4e17-928f-790282cb5815" + }, + "status": { + "type": "string", + "example": "processing" + }, + "processedUrls": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" + ] + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Missing appId header, invalid parameters, or empty uniqueIds array" + }, + "404": { + "description": "No valid non-excluded discovered URLs found for sync processing" + }, + "500": { + "description": "Internal Server Error - Failed to sync discovered URLs" + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Sync specific discovered URLs for batch processing", + "tags": [ + "crawl-web-pages" + ] } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add frontend actions to an agent", - "tags": [ - "Agent Builder" - ], - "description": "Add one or more frontend actions to a specific agent." - } + } }, - "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/remove": { - "patch": { - "operationId": "AgentBuilderController_removeFrontendActionsFromAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageAgentFrontendActionsDto" - } + "info": { + "title": "AI Agents APIs", + "description": "API reference for CometChat AI Agents service", + "version": "1.0" + }, + "tags": [ + { + "name": "ai-agent", + "description": "" + } + ], + "servers": [ + { + "url": "https://{appid}.api-{region}.cometchat.io/v3", + "variables": { + "appid": { + "default": "appId", + "description": "(Required) App ID" + }, + "region": { + "enum": [ + "us", + "eu", + "in" + ], + "default": "us", + "description": "Select Region" + } } - } - }, - "responses": { - "200": { - "description": "Frontend actions successfully removed from the agent.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "data": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "example": "agent-uuid-1234" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "Support Agent" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "isActive": { - "type": "boolean", - "example": true - }, - "description": { - "type": "string", - "example": "A helpful support agent" - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "gmail", - "slack" - ] - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "websites": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "otherKbIntegrations": { - "type": "array", - "items": { + } + ], + "components": { + "securitySchemes": { + "apiKey": { + "type": "apiKey", + "description": "API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).", + "name": "apikey", + "in": "header" + } + }, + "schemas": { + "CreateAgentDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the agent" + }, + "icon": { + "type": "string", + "description": "URL to the icon/avatar of the agent" + }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is the agent active?" + }, + "integrateWith": { + "type": "string", + "description": "ID of the LLM or platform this agent connects to" + }, + "integrationType": { + "type": "string", + "enum": [ + "llm", + "agent" + ], + "description": "Type of connection: llm or agent" + }, + "integrationMeta": { + "type": "object", + "description": "Required if integrationType is \"agent\". URL where the agent is deployed" + }, + "actions": { + "description": "List of actions", + "type": "array", + "items": { "type": "string" - }, - "example": [] - }, - "apiTools": { - "type": "array", - "items": { + } + }, + "tools": { + "description": "List of tools", + "type": "array", + "items": { "type": "string" - }, - "example": [] - }, - "mcpServers": { - "type": "array", - "items": { + } + }, + "cometchatTools": { + "description": "List of CometChat-provided tools", + "type": "array", + "items": { "type": "string" - }, - "example": [] - }, - "frontendActions": { - "type": "array", - "items": { + } + }, + "instruction": { + "type": "string", + "description": "Instruction for the agent" + }, + "suggestions": { + "description": "Array of suggestion texts for the agent", + "type": "array", + "items": { "type": "string" - }, - "example": [] - }, - "ragVersion": { - "type": "string", - "enum": [ - "v1", - "v2" - ], - "example": "v2" - }, - "lastMessageAt": { - "type": "number", - "nullable": true, - "example": 1700000000000 - }, - "instruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "formattedInstruction": { - "type": "string", - "example": "You are a helpful assistant" - }, - "metaData": { - "type": "object", - "example": {} - }, - "model": { - "type": "string", - "example": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "example": {} - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 } - } + }, + "metaData": { + "type": "object", + "description": "Optional metadata object for the agent" } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid frontend action identifiers or malformed request body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — agent with the given UID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove frontend actions from an agent", - "tags": [ - "Agent Builder" - ], - "description": "Remove one or more frontend actions from a specific agent." - } - }, - "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/add": { - "patch": { - "operationId": "AgentBuilderController_addFilesToKnowledgeBase", - "parameters": [ - { - "name": "agentId", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - }, - { - "name": "sourceType", - "required": true, - "in": "path", - "description": "Source type (uploads, knowledge-base, etc.)", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" - } - } - } - }, - "responses": { - "200": { - "description": "Files added to knowledge base successfully" - }, - "400": { - "description": "Bad request - validation error" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Add files to agent knowledge base", - "tags": [ - "Agent Builder" - ], - "description": "Add files to an agent's knowledge base by source type." - } - }, - "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/remove": { - "patch": { - "operationId": "AgentBuilderController_removeFilesFromKnowledgeBase", - "parameters": [ - { - "name": "agentId", - "required": true, - "in": "path", - "description": "Unique identifier of the agent", - "schema": { - "type": "string" - } - }, - { - "name": "sourceType", - "required": true, - "in": "path", - "description": "Source type (uploads, knowledge-base, etc.)", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageKnowledgeBaseFilesDto" - } - } - } - }, - "responses": { - "200": { - "description": "Files removed from knowledge base successfully" - }, - "400": { - "description": "Bad request - validation error" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove files from agent knowledge base", - "tags": [ - "Agent Builder" - ], - "description": "Remove files from an agent's knowledge base by source type." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/add": { - "patch": { - "operationId": "AgentBuilderController_addActionsToTool", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": true, - "in": "path", - "description": "Tool slug (e.g., gmail, googlesheets)", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageActionsDto" - } - } - } - }, - "responses": { - "200": { - "description": "Actions added successfully" - }, - "400": { - "description": "Bad request - validation error" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Enable actions for a tool", - "tags": [ - "Agent Builder" - ], - "description": "Enable specific actions for a tool on an agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/remove": { - "patch": { - "operationId": "AgentBuilderController_removeActionsFromTool", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": true, - "in": "path", - "description": "Tool slug (e.g., gmail, googlesheets)", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ManageActionsDto" - } - } - } - }, - "responses": { - "200": { - "description": "Actions removed successfully" - }, - "400": { - "description": "Bad request - validation error" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Remove actions for a tool", - "tags": [ - "Agent Builder" - ], - "description": "Disable specific actions for a tool on an agent." - } - }, - "/ai-agents/agent-builder/agents/variables/custom": { - "get": { - "operationId": "AgentBuilderController_getAllCustomVariables", - "parameters": [], - "responses": { - "200": { - "description": "List of custom variables", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_id": { + }, + "required": [ + "name", + "isActive", + "integrateWith", + "integrationType", + "actions", + "tools" + ] + }, + "GetAgentDetailDto": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "deploymentUrl": { + "type": "string" + }, + "apiKey": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "deploymentUrl", + "apiKey" + ] + }, + "UpdateAgentDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the agent" + }, + "icon": { "type": "string", - "example": "507f1f77bcf86cd799439011" - }, - "appId": { + "description": "URL to the icon/avatar of the agent" + }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is the agent active?" + }, + "integrateWith": { "type": "string", - "example": "my-app-id" - }, - "name": { + "description": "ID of the LLM or platform this agent connects to" + }, + "integrationType": { "type": "string", - "example": "user.plan" - }, - "description": { + "enum": [ + "llm", + "agent" + ], + "description": "Type of connection: llm or agent" + }, + "integrationMeta": { + "type": "object", + "description": "Required if integrationType is \"agent\". URL where the agent is deployed" + }, + "actions": { + "description": "List of actions", + "type": "array", + "items": { + "type": "string" + } + }, + "tools": { + "description": "List of tools", + "type": "array", + "items": { + "type": "string" + } + }, + "cometchatTools": { + "description": "List of CometChat-provided tools", + "type": "array", + "items": { + "type": "string" + } + }, + "instruction": { "type": "string", - "example": "The user subscription plan" - }, - "sourceType": { + "description": "Instruction for the agent" + }, + "suggestions": { + "description": "Array of suggestion texts for the agent", + "type": "array", + "items": { + "type": "string" + } + }, + "metaData": { + "type": "object", + "description": "Optional metadata object for the agent" + } + } + }, + "CreateTagDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "style": { + "type": "object" + } + }, + "required": [ + "id", + "text", + "style" + ] + }, + "UpdateTagDto": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "style": { + "type": "object" + } + }, + "required": [ + "text", + "style" + ] + }, + "ToolDto": { + "type": "object", + "properties": { + "displayName": { "type": "string", - "enum": [ - "message_metadata", - "user_metadata", - "constant" - ], - "example": "user_metadata" - }, - "sourcePath": { + "description": "Display name shown in the UI for this tool", + "example": "Get Weather" + }, + "description": { "type": "string", - "example": "metadata.plan" - }, - "constantValue": { + "description": "Description of what the tool does. Required when doNotExecute is false.", + "example": "Fetches current weather data for a given location" + }, + "executionText": { "type": "string", - "example": "" - }, - "defaultValue": { + "description": "Text displayed while the tool is executing", + "example": "Fetching weather data..." + }, + "name": { "type": "string", - "example": "free" - }, - "category": { + "description": "Unique function name for the tool. Must start with a letter, underscore, or dollar sign, followed by alphanumeric characters, underscores, dollar signs, or hyphens.", + "pattern": "^[a-zA-Z_$][a-zA-Z0-9_$-]*$", + "example": "get_weather" + }, + "doNotExecute": { + "type": "boolean", + "description": "When true, the tool will not be executed locally and parameters/description become optional", + "default": false + }, + "parameters": { + "description": "Tool parameter definitions. Required when doNotExecute is false, but can be an empty object. Must be empty or omitted when doNotExecute is true.", + "allOf": [ + { + "$ref": "#/components/schemas/ParametersDto" + } + ] + } + }, + "required": [ + "displayName", + "executionText", + "name" + ] + }, + "MessageEventDTO": { + "type": "object", + "properties": {} + }, + "CreateIntegrationDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { "type": "string", "enum": [ - "custom" + "agent", + "llm" ], - "example": "custom" - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } + "description": "Allowed values: agent, llm" + }, + "icon": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "isActive": { + "type": "boolean", + "default": true + }, + "metaData": { + "type": "object", + "default": {} } - } - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get all custom variables for the app", - "tags": [ - "Agent Builder" - ], - "description": "Retrieve all custom variables defined for the application." - }, - "post": { - "operationId": "AgentBuilderController_createCustomVariable", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateCustomVariableDto" - } - } - } - }, - "responses": { - "201": { - "description": "Custom variable created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "507f1f77bcf86cd799439011" - }, - "appId": { - "type": "string", - "example": "my-app-id" + }, + "required": [ + "id", + "name", + "type", + "icon", + "tags", + "isActive", + "metaData" + ] + }, + "UpdateIntegrationDto": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "isActive": { + "type": "boolean", + "default": true }, + "metaData": { + "type": "object", + "default": {} + } + }, + "required": [ + "name", + "icon", + "tags", + "isActive", + "metaData" + ] + }, + "CreateCometChatAgentDto": { + "type": "object", + "properties": { "name": { - "type": "string", - "example": "user.plan" + "type": "string", + "description": "Name of the agent" + }, + "icon": { + "type": "string", + "description": "URL to the icon/avatar of the agent" }, "description": { - "type": "string", - "example": "The user subscription plan" + "type": "string", + "description": "Description of the agent" }, - "sourceType": { - "type": "string", - "enum": [ - "message_metadata", - "user_metadata", - "constant" - ], - "example": "user_metadata" + "tools": { + "description": "Array of tool names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } }, - "sourcePath": { - "type": "string", - "example": "metadata.plan" + "apiTools": { + "description": "Array of API tool names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } }, - "constantValue": { - "type": "string", - "example": "" + "mcpServers": { + "description": "Array of MCP server names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } }, - "defaultValue": { - "type": "string", - "example": "free" + "instruction": { + "type": "string", + "description": "Instructions for the agent behavior" }, - "category": { - "type": "string", - "enum": [ - "custom" - ], - "example": "custom" + "metaData": { + "type": "object", + "description": "Additional metadata for the agent" }, - "createdAt": { - "type": "number", - "example": 1700000000000 + "model": { + "type": "string", + "description": "AI model to use for this agent", + "default": "gpt-4o-mini" }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error or duplicate variable name.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Create a new custom variable", - "tags": [ - "Agent Builder" - ], - "description": "Create a new custom variable for dynamic value injection into agent instructions." - } - }, - "/ai-agents/agent-builder/agents/variables/custom/{variableId}": { - "patch": { - "operationId": "AgentBuilderController_updateCustomVariable", - "parameters": [ - { - "name": "variableId", - "required": true, - "in": "path", - "description": "Variable ID to update", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateCustomVariableDto" - } - } - } - }, - "responses": { - "200": { - "description": "Custom variable updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "507f1f77bcf86cd799439011" - }, - "appId": { - "type": "string", - "example": "my-app-id" + "modelMetaData": { + "type": "object", + "description": "Configuration metadata for the AI model" }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is the agent active?" + } + }, + "required": [ + "name", + "description", + "isActive" + ] + }, + "UpdateCometChatAgentDto": { + "type": "object", + "properties": { "name": { - "type": "string", - "example": "user.plan" + "type": "string", + "description": "Name of the agent" + }, + "icon": { + "type": "string", + "description": "URL to the icon/avatar of the agent" }, "description": { - "type": "string", - "example": "The user subscription plan" + "type": "string", + "description": "Description of the agent" }, - "sourceType": { - "type": "string", - "enum": [ - "message_metadata", - "user_metadata", - "constant" - ], - "example": "user_metadata" + "tools": { + "description": "Array of tool names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } }, - "sourcePath": { - "type": "string", - "example": "metadata.plan" + "apiTools": { + "description": "Array of API tool names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } }, - "constantValue": { - "type": "string", - "example": "" + "mcpServers": { + "description": "Array of MCP server names available to this agent", + "default": [], + "type": "array", + "items": { + "type": "string" + } }, - "defaultValue": { - "type": "string", - "example": "free" + "instruction": { + "type": "string", + "description": "Instructions for the agent behavior" }, - "category": { - "type": "string", - "enum": [ - "custom" - ], - "example": "custom" + "metaData": { + "type": "object", + "description": "Additional metadata for the agent" + }, + "model": { + "type": "string", + "description": "AI model to use for this agent", + "default": "gpt-4o-mini" }, - "createdAt": { - "type": "number", - "example": 1700000000000 + "modelMetaData": { + "type": "object", + "description": "Configuration metadata for the AI model" }, - "updatedAt": { - "type": "number", - "example": 1700000000000 + "isActive": { + "type": "boolean", + "default": true, + "description": "Is the agent active?" } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — custom variable with the given ID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Update a custom variable", - "tags": [ - "Agent Builder" - ], - "description": "Update an existing custom variable by its ID." - }, - "delete": { - "operationId": "AgentBuilderController_deleteCustomVariable", - "parameters": [ - { - "name": "variableId", - "required": true, - "in": "path", - "description": "Variable ID to delete", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Custom variable deleted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessMessageResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — custom variable with the given ID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Delete a custom variable", - "tags": [ - "Agent Builder" - ], - "description": "Delete a custom variable by its ID." - } - }, - "/ai-agents/agent-builder/api-tools": { - "get": { - "operationId": "ApiToolsController_getAllApiTools", - "parameters": [ - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "affix", - "required": false, - "in": "query", - "schema": { - "enum": [ - "prepend", - "append" - ], - "type": "string" - } - }, - { - "name": "createdAt", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "Paginated list of API tools", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_my-api-tool" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "slug": { - "type": "string", - "example": "my-api-tool" - }, - "name": { - "type": "string", - "example": "My API Tool" - }, - "description": { - "type": "string", - "example": "Calls an external API" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "endpoint": { - "type": "string", - "example": "https://api.example.com/search" - }, - "method": { - "type": "string", - "example": "GET" - }, - "enableBasicAuth": { - "type": "boolean", - "example": false - }, - "headers": { - "type": "string", - "nullable": true, - "example": "{\"Content-Type\":\"application/json\"}" - }, - "bodyTemplate": { - "type": "string", - "nullable": true, - "example": "{\"query\":\"{{query}}\"}" - }, - "allowAdditionalProperties": { - "type": "boolean", - "example": false - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "query" - }, - "type": { - "type": "string", - "example": "string" - }, - "description": { - "type": "string", - "example": "The search query" - }, - "required": { - "type": "boolean", - "example": true - } - } - } - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "my-api-tool" - }, - "description": { - "type": "string", - "example": "Calls an external API" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } - } - } - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - }, - "meta": { - "type": "object", - "properties": { - "previous": { - "type": "object", - "example": { - "affix": "prepend", - "createdAt": 1700000000000 - } - }, - "current": { - "type": "object", - "example": { - "limit": 10, - "count": 5 - } - }, - "next": { - "type": "object", - "example": { - "affix": "append", - "createdAt": 1700000000000 - } + }, + "ManageAgentToolsDto": { + "type": "object", + "properties": { + "tools": { + "description": "Array of tool names to add or remove", + "example": [ + "gmail", + "google-sheets", + "slack" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tools" + ] + }, + "ManageAgentMcpDto": { + "type": "object", + "properties": { + "mcps": { + "description": "Array of MCP server slugs to add or remove", + "example": [ + "filesystem", + "git", + "postgres" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "mcps" + ] + }, + "ManageAgentApiToolsDto": { + "type": "object", + "properties": { + "apiTools": { + "description": "Array of API tool slugs to add or remove", + "example": [ + "get_weather", + "send_email", + "create_task" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "apiTools" + ] + }, + "ManageAgentFrontendActionsDto": { + "type": "object", + "properties": { + "frontendActions": { + "description": "Array of frontend action function names to add or remove", + "example": [ + "openProduct_modal", + "showNotification" + ], + "type": "array", + "items": { + "type": "string" } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid pagination parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get all api-tools for an app", - "tags": [ - "Agent Builder API Tools" - ], - "description": "Retrieve a paginated list of API tools for the application." - }, - "post": { - "operationId": "ApiToolsController_createApiTool", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateApiToolDto" - } - } - } - }, - "responses": { - "200": { - "description": "API tool created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_my-api-tool" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "slug": { - "type": "string", - "example": "my-api-tool" + }, + "required": [ + "frontendActions" + ] + }, + "ManageKnowledgeBaseFilesDto": { + "type": "object", + "properties": { + "uniqueIds": { + "description": "Array of file IDs to be added to the knowledge base", + "example": [ + "60f7b3b3b3b3b3b3b3b3b3b3", + "60f7b3b3b3b3b3b3b3b3b3b4" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uniqueIds" + ] + }, + "ManageActionsDto": { + "type": "object", + "properties": { + "actions": { + "description": "Array of action names to add or remove", + "example": [ + "send-email", + "draft-email", + "read-emails" + ], + "type": "array", + "items": { + "type": "string" + } }, + "authMeta": { + "type": "object", + "description": "Credentials or metadata required for authenticating the tool", + "example": [ + "emailId: \"example@cometchat.com\"" + ] + } + }, + "required": [ + "actions", + "authMeta" + ] + }, + "CreateCustomVariableDto": { + "type": "object", + "properties": { "name": { - "type": "string", - "example": "My API Tool" + "type": "string", + "description": "Unique variable name. Must start with a letter and contain only alphanumeric characters, underscores, and dots.", + "maxLength": 50, + "pattern": "^[a-zA-Z][a-zA-Z0-9_.]*$", + "example": "user.preferred_language" }, "description": { - "type": "string", - "example": "Calls an external API" + "type": "string", + "description": "Human-readable description of the variable", + "maxLength": 200, + "example": "The preferred language of the user" }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" + "sourceType": { + "type": "string", + "description": "Source from which the variable value is resolved", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" }, - "endpoint": { - "type": "string", - "example": "https://api.example.com/search" + "sourcePath": { + "type": "string", + "description": "Dot-notation path to extract the value from the source metadata", + "maxLength": 100, + "example": "language" }, - "method": { - "type": "string", - "example": "GET" + "constantValue": { + "type": "string", + "description": "Fixed value used when sourceType is constant", + "maxLength": 500, + "example": "en" }, - "enableBasicAuth": { - "type": "boolean", - "example": false + "defaultValue": { + "type": "string", + "description": "Fallback value used when the source path does not resolve", + "maxLength": 200, + "example": "en" + } + }, + "required": [ + "name", + "sourceType" + ] + }, + "UpdateCustomVariableDto": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Human-readable description of the variable", + "maxLength": 200, + "example": "The preferred language of the user" }, - "headers": { - "type": "string", - "nullable": true, - "example": "{\"Content-Type\":\"application/json\"}" + "sourceType": { + "type": "string", + "description": "Source from which the variable value is resolved", + "enum": [ + "message_metadata", + "user_metadata", + "constant" + ], + "example": "user_metadata" }, - "bodyTemplate": { - "type": "string", - "nullable": true, - "example": "{\"query\":\"{{query}}\"}" + "sourcePath": { + "type": "string", + "description": "Dot-notation path to extract the value from the source metadata", + "maxLength": 100, + "example": "language" }, - "allowAdditionalProperties": { - "type": "boolean", - "example": false + "constantValue": { + "type": "string", + "description": "Fixed value used when sourceType is constant", + "maxLength": 500, + "example": "en" }, - "parameters": { - "type": "array", - "items": { + "defaultValue": { + "type": "string", + "description": "Fallback value used when the source path does not resolve", + "maxLength": 200, + "example": "en" + } + } + }, + "TestVariableResolutionDto": { + "type": "object", + "properties": {} + }, + "ApiToolSampleContextDto": { + "type": "object", + "properties": { + "senderUid": { + "type": "string", + "description": "Sender user ID", + "example": "user123" + }, + "senderRole": { + "type": "string", + "description": "Sender role", + "example": "default" + }, + "senderMetadata": { "type": "object", - "properties": { - "key": { - "type": "string", - "example": "query" - }, - "type": { - "type": "string", - "example": "string" - }, - "description": { - "type": "string", - "example": "The search query" - }, - "required": { - "type": "boolean", - "example": true - } - } - } - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "my-api-tool" - }, - "description": { - "type": "string", - "example": "Calls an external API" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } + "description": "Sender metadata object", + "example": { + "department": "engineering", + "level": "senior" } - } }, - "createdAt": { - "type": "number", - "example": 1700000000000 + "receiverUid": { + "type": "string", + "description": "Receiver user ID (defaults to agent ID)", + "example": "agent456" }, - "updatedAt": { - "type": "number", - "example": 1700000000000 + "messageMetadata": { + "type": "object", + "description": "Message metadata object", + "example": { + "priority": "high", + "source": "web" + } } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error or duplicate slug.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder API Tools" - ], - "description": "Create a new API tool configuration for the application.", - "summary": "Create a new API tool" - } - }, - "/ai-agents/agent-builder/api-tools/{slug}": { - "get": { - "operationId": "ApiToolsController_getApiToolBySlug", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "API tool details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_my-api-tool" - }, - "appId": { - "type": "string", - "example": "my-app-id" + }, + "required": [ + "senderUid" + ] + }, + "TestApiToolVariablesDto": { + "type": "object", + "properties": { + "sampleContext": { + "description": "Sample context for variable resolution", + "allOf": [ + { + "$ref": "#/components/schemas/ApiToolSampleContextDto" + } + ] }, - "slug": { - "type": "string", - "example": "my-api-tool" + "sampleQueryParams": { + "type": "object", + "description": "Sample query parameters to test resolution", + "example": { + "userId": "[{variable-auth: \"sender.uid\"}]", + "limit": "10" + } + } + }, + "required": [ + "sampleContext" + ] + }, + "ApiToolParameter": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Parameter key/name", + "example": "email" }, - "name": { - "type": "string", - "example": "My API Tool" + "type": { + "type": "string", + "description": "Parameter type", + "example": "string" }, "description": { - "type": "string", - "example": "Calls an external API" + "type": "string", + "description": "Parameter description", + "example": "Email of the lead" }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" + "required": { + "type": "boolean", + "description": "Whether the parameter is required", + "example": false + } + }, + "required": [ + "key", + "type", + "description" + ] + }, + "CreateApiToolDto": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "Slug for the API tool (unique)", + "example": "create_lead" + }, + "description": { + "type": "string", + "description": "Description of the API tool", + "example": "When to use, preconditions, what it returns" }, "endpoint": { - "type": "string", - "example": "https://api.example.com/search" + "type": "string", + "description": "API endpoint URL", + "example": "https://api.example.com/leads" }, "method": { - "type": "string", - "example": "GET" + "type": "string", + "description": "HTTP method", + "example": "POST", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] }, "enableBasicAuth": { - "type": "boolean", - "example": false + "type": "boolean", + "description": "Whether to enable basic authentication", + "example": true + }, + "basicAuthUsername": { + "type": "string", + "description": "Basic auth username (required if enableBasicAuth is true)", + "example": "username" + }, + "basicAuthPassword": { + "type": "string", + "description": "Basic auth password (required if enableBasicAuth is true)", + "example": "password" }, "headers": { - "type": "string", - "nullable": true, - "example": "{\"Content-Type\":\"application/json\"}" + "type": "string", + "description": "HTTP headers as a JSON string (e.g., '{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}')", + "example": "{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}" }, "bodyTemplate": { - "type": "string", - "nullable": true, - "example": "{\"query\":\"{{query}}\"}" + "type": "string", + "description": "Body template for the API request", + "example": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}" }, "allowAdditionalProperties": { - "type": "boolean", - "example": false + "type": "boolean", + "description": "Whether to allow additional properties", + "example": false, + "default": false }, "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "query" - }, - "type": { - "type": "string", - "example": "string" - }, - "description": { - "type": "string", - "example": "The search query" - }, - "required": { - "type": "boolean", - "example": true - } - } - } - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "my-api-tool" - }, - "description": { - "type": "string", - "example": "Calls an external API" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } + "description": "Array of parameters for the API tool", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiToolParameter" } - } }, - "createdAt": { - "type": "number", - "example": 1700000000000 + "icon": { + "type": "string", + "description": "Icon for the API Tool", + "example": "http://localhost:3001" }, - "updatedAt": { - "type": "number", - "example": 1700000000000 + "name": { + "type": "string", + "description": "Name of the API tool", + "example": "Create Lead" } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid slug parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — API tool with the given slug does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder API Tools" - ], - "description": "Retrieve a specific API tool by its unique slug.", - "summary": "Get an API tool by slug" - }, - "patch": { - "operationId": "ApiToolsController_updateApiTool", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateApiToolDto" - } - } - } - }, - "responses": { - "200": { - "description": "API tool updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_my-api-tool" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, + }, + "required": [ + "slug", + "description", + "endpoint", + "method", + "enableBasicAuth", + "name" + ] + }, + "UpdateApiToolDto": { + "type": "object", + "properties": { "slug": { - "type": "string", - "example": "my-api-tool" - }, - "name": { - "type": "string", - "example": "My API Tool" + "type": "string", + "description": "Slug for the API tool (unique)", + "example": "create_lead" }, "description": { - "type": "string", - "example": "Calls an external API" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" + "type": "string", + "description": "Description of the API tool", + "example": "When to use, preconditions, what it returns" }, "endpoint": { - "type": "string", - "example": "https://api.example.com/search" + "type": "string", + "description": "API endpoint URL", + "example": "https://api.example.com/leads" }, "method": { - "type": "string", - "example": "GET" + "type": "string", + "description": "HTTP method", + "example": "POST", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] }, "enableBasicAuth": { - "type": "boolean", - "example": false + "type": "boolean", + "description": "Whether to enable basic authentication", + "example": true + }, + "basicAuthUsername": { + "type": "string", + "description": "Basic auth username (required if enableBasicAuth is true)", + "example": "username" + }, + "basicAuthPassword": { + "type": "string", + "description": "Basic auth password (required if enableBasicAuth is true)", + "example": "password" }, "headers": { - "type": "string", - "nullable": true, - "example": "{\"Content-Type\":\"application/json\"}" + "type": "string", + "description": "HTTP headers as a JSON string (e.g., '{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}')", + "example": "{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}" }, "bodyTemplate": { - "type": "string", - "nullable": true, - "example": "{\"query\":\"{{query}}\"}" + "type": "string", + "description": "Body template for the API request", + "example": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}" }, "allowAdditionalProperties": { - "type": "boolean", - "example": false + "type": "boolean", + "description": "Whether to allow additional properties", + "example": false, + "default": false }, "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "query" - }, - "type": { - "type": "string", - "example": "string" - }, - "description": { - "type": "string", - "example": "The search query" - }, - "required": { - "type": "boolean", - "example": true - } - } - } - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "my-api-tool" - }, - "description": { - "type": "string", - "example": "Calls an external API" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } + "description": "Array of parameters for the API tool", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiToolParameter" } - } - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — API tool with the given slug does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder API Tools" - ], - "description": "Update an existing API tool by its unique slug.", - "summary": "Update an API tool by slug" - }, - "delete": { - "operationId": "ApiToolsController_deleteApiTool", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "API tool deleted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessMessageResponse" - } - } - } - }, - "400": { - "description": "Bad Request — invalid slug parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — API tool with the given slug does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder API Tools" - ], - "description": "Delete a specific API tool by its unique slug.", - "summary": "Delete an API tool by slug" - } - }, - "/ai-agents/agent-builder/mcp-servers": { - "post": { - "operationId": "McpServersController_createMcpServer", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateMcpServerDto" - } - } - } - }, - "responses": { - "200": { - "description": "MCP server created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_my-mcp-server" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "slug": { - "type": "string", - "example": "my-mcp-server" - }, - "name": { - "type": "string", - "example": "My MCP Server" - }, - "description": { - "type": "string", - "example": "A Model Context Protocol server" - }, - "url": { - "type": "string", - "example": "https://mcp.example.com/sse" }, "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error or duplicate slug.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder MCP Servers" - ], - "description": "Create a new MCP server configuration for the application.", - "summary": "Create a new MCP server" - }, - "get": { - "operationId": "McpServersController_getAllMcpServers", - "parameters": [ - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "affix", - "required": false, - "in": "query", - "schema": { - "enum": [ - "prepend", - "append" - ], - "type": "string" - } - }, - { - "name": "createdAt", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "Paginated list of MCP servers", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_my-mcp-server" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "slug": { - "type": "string", - "example": "my-mcp-server" - }, - "name": { - "type": "string", - "example": "My MCP Server" - }, - "description": { - "type": "string", - "example": "A Model Context Protocol server" - }, - "url": { - "type": "string", - "example": "https://mcp.example.com/sse" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - }, - "meta": { - "type": "object", - "properties": { - "previous": { - "type": "object", - "example": { - "affix": "prepend", - "createdAt": 1700000000000 - } - }, - "current": { - "type": "object", - "example": { - "limit": 10, - "count": 5 - } - }, - "next": { - "type": "object", - "example": { - "affix": "append", - "createdAt": 1700000000000 - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid pagination parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "type": "string", + "description": "Icon for the API Tool", + "example": "http://localhost:3001" + } } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder MCP Servers" - ], - "description": "Retrieve a paginated list of MCP servers for the application.", - "summary": "Get all MCP servers for an app" - } - }, - "/ai-agents/agent-builder/mcp-servers/{slug}": { - "get": { - "operationId": "McpServersController_getMcpServerBySlug", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "MCP server details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_my-mcp-server" - }, - "appId": { - "type": "string", - "example": "my-app-id" + }, + "CreateMcpServerDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the MCP server (human readable)", + "example": "Weather Server" }, "slug": { - "type": "string", - "example": "my-mcp-server" - }, - "name": { - "type": "string", - "example": "My MCP Server" + "type": "string", + "description": "Slug of the MCP server (unique, URL-safe)", + "example": "weather-server" }, "description": { - "type": "string", - "example": "A Model Context Protocol server" + "type": "string", + "description": "Description of the MCP server", + "example": "Provides weather data for cities" }, "url": { - "type": "string", - "example": "https://mcp.example.com/sse" + "type": "string", + "description": "URL of the MCP server", + "example": "http://localhost:3001" }, "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 + "type": "string", + "description": "Icon for the MCP server", + "example": "http://localhost:3001/icon.png" } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid slug parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — MCP server with the given slug does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder MCP Servers" - ], - "description": "Retrieve a specific MCP server by its unique slug.", - "summary": "Get an MCP server by slug" - }, - "patch": { - "operationId": "McpServersController_updateMcpServer", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMcpServerDto" - } - } - } - }, - "responses": { - "200": { - "description": "MCP server updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_my-mcp-server" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "slug": { - "type": "string", - "example": "my-mcp-server" - }, + }, + "required": [ + "name", + "slug", + "description", + "url" + ] + }, + "UpdateMcpServerDto": { + "type": "object", + "properties": { "name": { - "type": "string", - "example": "My MCP Server" + "type": "string", + "description": "Updated name of the MCP server (human readable)", + "example": "Weather Server" }, "description": { - "type": "string", - "example": "A Model Context Protocol server" + "type": "string", + "description": "Updated description of the MCP server", + "example": "Provides weather data for cities" }, "url": { - "type": "string", - "example": "https://mcp.example.com/sse" + "type": "string", + "description": "Updated URL of the MCP server", + "example": "http://localhost:3002" }, "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — MCP server with the given slug does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder MCP Servers" - ], - "description": "Update an existing MCP server by its unique slug.", - "summary": "Update an MCP server by slug" - }, - "delete": { - "operationId": "McpServersController_deleteMcpServer", - "parameters": [ - { - "name": "slug", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "MCP server deleted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessMessageResponse" - } - } - } - }, - "400": { - "description": "Bad Request — invalid slug parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — MCP server with the given slug does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "tags": [ - "Agent Builder MCP Servers" - ], - "description": "Delete a specific MCP server by its unique slug.", - "summary": "Delete an MCP server by slug" - } - }, - "/ai-agents/agent-builder/tools/agent/{agentUid}": { - "get": { - "operationId": "ComposioController_getAvailableIntegration", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": false, - "in": "query", - "description": "Optional slug to filter integration (e.g., gmail, googlesheets)", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "affix", - "required": false, - "in": "query", - "schema": { - "enum": [ - "prepend", - "append" - ], - "type": "string" - } - }, - { - "name": "createdAt", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "search", - "required": false, - "in": "query", - "description": "Search term for tool name or slug", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Available Composio tools retrieved successfully from integrations", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "example": "gmail" - }, - "name": { - "type": "string", - "example": "Gmail" - }, - "icon": { - "type": "string", - "example": "https://example.com/gmail-icon.png" - }, - "description": { - "type": "string", - "example": "Gmail integration for sending and managing emails" - }, - "actions": { - "type": "array", - "items": { - "type": "object" - }, - "example": [ - { - "name": "GMAIL_SEND_EMAIL", - "displayName": "Send Email" - } - ] - }, - "isAuthenticated": { - "type": "boolean", - "example": false - } - } - } - }, - "meta": { - "type": "object", - "properties": { - "previous": { - "type": "object", - "example": { - "affix": "prepend", - "createdAt": 1700000000000 - } - }, - "current": { - "type": "object", - "example": { - "limit": 10, - "count": 5 - } - }, - "next": { - "type": "object", - "example": { - "affix": "append", - "createdAt": 1700000000000 - } - } - } + "type": "string", + "description": "Updated icon for the MCP server", + "example": "http://localhost:3002/icon.png" } - } - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get Ready To Use Tools", - "tags": [ - "Agent Builder Ready to Use Tools" - ], - "description": "Retrieve a paginated list of ready-to-use tool integrations available for an agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions": { - "get": { - "operationId": "ComposioController_getAvailableComposioToolsForAgent", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": true, - "in": "path", - "description": "Get actions available within a tool (e.g., send-email, draft-email)", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Available Composio tools retrieved successfully from integrations" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get actions available within a tool for agent", - "tags": [ - "Agent Builder Ready to Use Tools" - ], - "description": "Retrieve the actions available within a specific tool for an agent." - } - }, - "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/authenticate": { - "post": { - "operationId": "ComposioController_authenticateTool", - "parameters": [ - { - "name": "agentUid", - "required": true, - "in": "path", - "description": "AI Agent UID", - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "required": true, - "in": "path", - "description": "Tool slug to authenticate (e.g., gmail, googlesheets)", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthenticateToolDto" - } - } - } - }, - "responses": { - "200": { - "description": "OAuth authentication initiated successfully with redirect URL" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Authenticate a Composio tool with OAuth", - "tags": [ - "Agent Builder Ready to Use Tools" - ], - "description": "Initiate OAuth authentication for a specific tool on an agent." - } - }, - "/ai-agents/agent-builder/frontend-actions": { - "get": { - "operationId": "FrontendActionsController_getAllFrontendActions", - "parameters": [ - { - "name": "limit", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "affix", - "required": false, - "in": "query", - "schema": { - "enum": [ - "prepend", - "append" - ], - "type": "string" - } - }, - { - "name": "createdAt", - "required": false, - "in": "query", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "Paginated list of frontend actions", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { + }, + "AuthenticateToolDto": { + "type": "object", + "properties": { + "authMeta": { "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_onUserClick" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, - "name": { - "type": "string", - "example": "User Click Action" - }, - "description": { - "type": "string", - "example": "Triggered when a user clicks a button" - }, - "triggerFunction": { - "type": "string", - "example": "onUserClick" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "userId" - }, - "type": { - "type": "string", - "example": "string" - }, - "description": { - "type": "string", - "example": "The user identifier" - }, - "required": { - "type": "boolean", - "example": true - } - } - } - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "onUserClick" - }, - "description": { - "type": "string", - "example": "Triggered when a user clicks a button" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } - } - } - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - }, - "meta": { - "type": "object", - "properties": { - "previous": { - "type": "object", - "example": { - "affix": "prepend", - "createdAt": 1700000000000 - } - }, - "current": { - "type": "object", - "example": { - "limit": 10, - "count": 5 - } - }, - "next": { - "type": "object", - "example": { - "affix": "append", - "createdAt": 1700000000000 - } + "description": "Authentication metadata required for the tool", + "example": { + "emailId": "user@example.com" } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid pagination parameters.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get all frontend actions for an app", - "tags": [ - "Agent Builder Frontend Actions" - ], - "description": "Retrieve a paginated list of frontend actions for the application." - }, - "post": { - "operationId": "FrontendActionsController_createFrontendAction", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFrontendActionDto" - } - } - } - }, - "responses": { - "200": { - "description": "Frontend action created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_onUserClick" - }, - "appId": { - "type": "string", - "example": "my-app-id" + }, + "FrontendActionParameter": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Parameter key/name", + "example": "productId" }, - "name": { - "type": "string", - "example": "User Click Action" + "type": { + "type": "string", + "description": "Parameter type", + "example": "string" }, "description": { - "type": "string", - "example": "Triggered when a user clicks a button" - }, - "triggerFunction": { - "type": "string", - "example": "onUserClick" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" - }, - "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "userId" - }, - "type": { - "type": "string", - "example": "string" - }, - "description": { - "type": "string", - "example": "The user identifier" - }, - "required": { - "type": "boolean", - "example": true - } - } - } - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "onUserClick" - }, - "description": { - "type": "string", - "example": "Triggered when a user clicks a button" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } - } - } - }, - "createdAt": { - "type": "number", - "example": 1700000000000 + "type": "string", + "description": "Parameter description", + "example": "The ID of the product to display" }, - "updatedAt": { - "type": "number", - "example": 1700000000000 + "required": { + "type": "boolean", + "description": "Whether the parameter is required", + "example": true } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error or duplicate trigger function.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Create a frontend action", - "tags": [ - "Agent Builder Frontend Actions" - ], - "description": "Create a new frontend action for the application." - } - }, - "/ai-agents/agent-builder/frontend-actions/{id}": { - "get": { - "operationId": "FrontendActionsController_getFrontendActionById", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Frontend action details", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_onUserClick" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, + }, + "required": [ + "key", + "type", + "description" + ] + }, + "CreateFrontendActionDto": { + "type": "object", + "properties": { "name": { - "type": "string", - "example": "User Click Action" + "type": "string", + "description": "Display name of the frontend action", + "example": "Open Product Modal" }, "description": { - "type": "string", - "example": "Triggered when a user clicks a button" + "type": "string", + "description": "Description of what the frontend action does", + "example": "Opens a modal displaying product details for the specified product ID" }, "triggerFunction": { - "type": "string", - "example": "onUserClick" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" + "type": "string", + "description": "The function name that the frontend will execute (used as unique identifier)", + "example": "showProductModal" }, "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "userId" - }, - "type": { - "type": "string", - "example": "string" - }, - "description": { - "type": "string", - "example": "The user identifier" - }, - "required": { - "type": "boolean", - "example": true - } - } - } - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "onUserClick" - }, - "description": { - "type": "string", - "example": "Triggered when a user clicks a button" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } + "description": "Array of parameters for the frontend action", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendActionParameter" } - } - }, - "createdAt": { - "type": "number", - "example": 1700000000000 }, - "updatedAt": { - "type": "number", - "example": 1700000000000 + "icon": { + "type": "string", + "description": "Icon URL for the frontend action", + "example": "https://example.com/icon.png" } - } - } - } - } - }, - "400": { - "description": "Bad Request — invalid ID parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — frontend action with the given ID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get a frontend action by id", - "tags": [ - "Agent Builder Frontend Actions" - ], - "description": "Retrieve a specific frontend action by its ID." - }, - "patch": { - "operationId": "FrontendActionsController_updateFrontendAction", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateFrontendActionDto" - } - } - } - }, - "responses": { - "200": { - "description": "Frontend action updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "_id": { - "type": "string", - "example": "myapp_onUserClick" - }, - "appId": { - "type": "string", - "example": "my-app-id" - }, + }, + "required": [ + "name", + "description", + "triggerFunction" + ] + }, + "UpdateFrontendActionDto": { + "type": "object", + "properties": { "name": { - "type": "string", - "example": "User Click Action" + "type": "string", + "description": "Name of the frontend action", + "example": "Open Product Modal" }, "description": { - "type": "string", - "example": "Triggered when a user clicks a button" - }, - "triggerFunction": { - "type": "string", - "example": "onUserClick" - }, - "icon": { - "type": "string", - "example": "https://example.com/icon.png" + "type": "string", + "description": "Description of what the frontend action does", + "example": "Opens a modal displaying product details" }, "parameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "userId" - }, - "type": { - "type": "string", - "example": "string" - }, - "description": { - "type": "string", - "example": "The user identifier" - }, - "required": { - "type": "boolean", - "example": true - } - } - } - }, - "tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "onUserClick" - }, - "description": { - "type": "string", - "example": "Triggered when a user clicks a button" - }, - "parameters": { - "type": "object", - "example": { - "type": "object", - "properties": {}, - "required": [] - } - } - } - }, - "createdAt": { - "type": "number", - "example": 1700000000000 - }, - "updatedAt": { - "type": "number", - "example": 1700000000000 - } - } - } - } - } - }, - "400": { - "description": "Bad Request — validation error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — frontend action with the given ID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Update a frontend action", - "tags": [ - "Agent Builder Frontend Actions" - ], - "description": "Update an existing frontend action by its ID." - }, - "delete": { - "operationId": "FrontendActionsController_deleteFrontendAction", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Frontend action deleted successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessMessageResponse" - } - } - } - }, - "400": { - "description": "Bad Request — invalid ID parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — frontend action with the given ID does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Delete a frontend action", - "tags": [ - "Agent Builder Frontend Actions" - ], - "description": "Delete a specific frontend action by its ID." - } - }, - "/ai-agents/agent-builder/knowledge-base/uploads/initiate": { - "post": { - "description": "Generate presigned URLs to initiate file uploads to the knowledge base.", - "operationId": "RagController_initiateUpload", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InitiateUploadDto" - }, - "examples": { - "example1": { - "summary": "Upload multiple files", - "value": { - "files": [ - { - "fileName": "document.pdf", - "mimeType": "application/pdf", - "fileSize": 1024000 - }, - { - "fileName": "document_2.pdf", - "mimeType": "application/pdf", - "fileSize": 512000 - } - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Presigned URLs generated and upload records created successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "uploads": { - "type": "array", - "items": { - "type": "object", - "properties": { - "uploadId": { - "type": "string", - "description": "Unique upload session ID" - }, - "fileName": { - "type": "string", - "description": "Original file name" - }, - "mimeType": { - "type": "string", - "description": "MIME type of the file" - }, - "fileSize": { - "type": "number", - "description": "File size in bytes" - }, - "s3Key": { - "type": "string", - "description": "S3 object key for the upload" - }, - "presignedUrl": { - "type": "string", - "description": "Presigned URL for direct S3 upload" - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request — missing appId header or invalid file metadata.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Initiate file uploads", - "tags": [ - "knowledge-base" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/text": { - "post": { - "description": "Create a new text knowledge base entry with a title and content.", - "operationId": "RagController_createTextDetail", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTextDetailDto" - }, - "examples": { - "example1": { - "summary": "Create a text detail", - "value": { - "title": "Company Policy Document", - "text": "This document outlines the company policies and procedures for remote work, including communication guidelines, working hours expectations, and performance metrics." - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Text detail created and uploaded to S3 successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true - }, - "message": { - "type": "string", - "example": "Text detail created and uploaded successfully" - }, - "data": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique identifier for the text detail" - }, - "title": { - "type": "string", - "description": "Title of the text detail" - }, - "fileName": { - "type": "string", - "description": "Generated .md file name" - }, - "s3Key": { - "type": "string", - "description": "S3 object key for the uploaded file" - }, - "status": { - "type": "string", - "description": "Current processing status", - "example": "indexing" + "description": "Array of parameters for the frontend action", + "type": "array", + "items": { + "$ref": "#/components/schemas/FrontendActionParameter" } - } + }, + "icon": { + "type": "string", + "description": "Icon URL for the frontend action", + "example": "https://example.com/icon.png" } - } - } - } - } - }, - "400": { - "description": "Bad Request — missing appId header or invalid text detail data.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Create text detail and upload to knowledge base", - "tags": [ - "knowledge-base" - ] - }, - "get": { - "description": "Retrieve all text knowledge base entries for the application.", - "operationId": "RagController_getTextDetails", - "parameters": [], - "responses": { - "200": { - "description": "Text details retrieved successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object" - } + }, + "FileDescriptorDto": { + "type": "object", + "properties": { + "fileName": { + "type": "string", + "description": "Name of the file", + "example": "document.pdf" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the file", + "example": "application/pdf" + }, + "fileSize": { + "type": "number", + "description": "Size of the file in bytes", + "example": 1024000 } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get all text details for an app", - "tags": [ - "knowledge-base" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/text/{uniqueId}": { - "get": { - "description": "Retrieve a specific text knowledge base entry by its unique ID.", - "operationId": "RagController_getTextDetailById", - "parameters": [ - { - "name": "uniqueId", - "required": true, - "in": "path", - "description": "Unique text detail ID", - "schema": { - "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Text detail retrieved successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string" - }, - "title": { - "type": "string" - }, - "text": { - "type": "string" - }, - "fileName": { - "type": "string" - }, - "s3Key": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vectorizationStatus": { - "type": "string" - }, - "createdAt": { - "type": "number" - }, - "updatedAt": { - "type": "number" - }, - "isActive": { - "type": "boolean" + }, + "required": [ + "fileName", + "mimeType", + "fileSize" + ] + }, + "InitiateUploadDto": { + "type": "object", + "properties": { + "files": { + "description": "List of files to upload", + "type": "array", + "items": { + "$ref": "#/components/schemas/FileDescriptorDto" } - } } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get a specific text detail by uniqueId", - "tags": [ - "knowledge-base" - ] - }, - "patch": { - "description": "Update a specific text knowledge base entry by its unique ID.", - "operationId": "RagController_updateTextDetail", - "parameters": [ - { - "name": "uniqueId", - "required": true, - "in": "path", - "description": "Unique text detail ID", - "schema": { - "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTextDetailDto" - }, - "examples": { - "example1": { - "summary": "Update text detail", - "value": { - "title": "Updated Company Policy Document", - "text": "This is the updated document content with new policies and procedures..." - } + }, + "required": [ + "files" + ] + }, + "CreateTextDetailDto": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the text content", + "example": "Company Policy Document", + "maxLength": 500 + }, + "text": { + "type": "string", + "description": "Text content to be processed", + "example": "This document outlines the company policies and procedures...", + "maxLength": 5000 + } + }, + "required": [ + "title", + "text" + ] + }, + "UpdateTextDetailDto": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the text content", + "example": "Updated Company Policy Document", + "maxLength": 500 + }, + "text": { + "type": "string", + "description": "Text content to be processed", + "example": "This is the updated document content with new policies and procedures...", + "maxLength": 5000 + } } - } - } - } - }, - "responses": { - "200": { - "description": "Text detail updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" + }, + "StatusQueryDto": { + "type": "object", + "properties": { + "uniqueId": { + "description": "Array of unique IDs to query", + "example": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uniqueId" + ] + }, + "ScrapePagesDto": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Target website URL to crawl", + "example": "https://docs.example.com" }, - "message": { - "type": "string" + "maxDepth": { + "type": "number", + "description": "Maximum depth to crawl from the starting URL", + "minimum": 1, + "maximum": 10, + "default": 3, + "example": 5 }, - "data": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string" - }, - "title": { - "type": "string" - }, - "fileName": { - "type": "string" - }, - "s3Key": { - "type": "string" - }, - "status": { - "type": "string" - }, - "vectorizationStatus": { - "type": "string" + "maxPages": { + "type": "number", + "description": "Maximum number of pages to crawl", + "minimum": 1, + "maximum": 10000, + "default": 100, + "example": 500 + }, + "include": { + "description": "URL patterns to include in crawling (substring matching)", + "example": [ + "docs/", + "api/", + "guides/" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "exclude": { + "description": "URL patterns to exclude from crawling (substring matching)", + "example": [ + "login", + "signup", + "admin", + "privacy" + ], + "type": "array", + "items": { + "type": "string" } - } + }, + "fetchSitemap": { + "type": "boolean", + "description": "Fetch and return sitemap URLs from the website", + "default": false, + "example": true + }, + "crawlerType": { + "type": "string", + "description": "Crawler service to use for crawling (firecrawl, puppeteer, etc.)", + "default": "firecrawl", + "example": "firecrawl" } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Update a specific text detail by uniqueId", - "tags": [ - "knowledge-base" - ] - }, - "delete": { - "description": "Delete a specific text knowledge base entry and all its associated data.", - "operationId": "RagController_deleteTextDetail", - "parameters": [ - { - "name": "uniqueId", - "required": true, - "in": "path", - "description": "Unique text detail ID to delete", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Text detail and all associated data deleted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true + }, + "required": [ + "url" + ] + }, + "ScrapeIndividualPageDto": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Target page URL to crawl and extract content from", + "example": "https://docs.example.com/getting-started" }, - "message": { - "type": "string", - "example": "Text detail and all associated data deleted successfully" - }, - "data": { - "type": "object", - "properties": { - "uniqueId": { - "type": "string", - "description": "Unique identifier of the deleted text detail" - }, - "fileName": { - "type": "string", - "description": "Name of the deleted file" - }, - "uniqueFileId": { - "type": "string", - "description": "Unique file identifier" - }, - "deletedFromAgents": { - "type": "boolean", - "description": "Whether the file reference was removed from agents" - }, - "vectorsDeleted": { - "type": "boolean", - "description": "Whether associated vector embeddings were deleted" - }, - "s3FileDeleted": { - "type": "boolean", - "description": "Whether the S3 file was deleted" + "timeout": { + "type": "number", + "description": "Request timeout in milliseconds", + "minimum": 5000, + "maximum": 120000, + "default": 30000, + "example": 30000 + }, + "crawlerType": { + "type": "string", + "description": "Crawler service to use for page crawling (firecrawl, puppeteer, etc.)", + "default": "firecrawl", + "example": "firecrawl" + }, + "format": { + "type": "string", + "description": "Extract content in specific format", + "enum": [ + "markdown", + "html", + "text" + ], + "default": "markdown", + "example": "markdown" + } + }, + "required": [ + "url" + ] + }, + "ProcessDiscoveredUrlsDto": { + "type": "object", + "properties": { + "exclude": { + "description": "Array of unique IDs to exclude from crawling", + "example": [ + "550e8400-e29b-41d4-a716-446655440001", + "550e8400-e29b-41d4-a716-446655440002" + ], + "type": "array", + "items": { + "type": "string" } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request — missing appId header or uniqueId parameter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized — missing or invalid API key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "404": { - "description": "Not Found — text detail with the given uniqueId does not exist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "Internal Server Error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Delete text detail and all associated data", - "tags": [ - "knowledge-base" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base": { - "get": { - "description": "Retrieve knowledge base records with cursor-based pagination.", - "operationId": "RagController_getKnowledgeBase", - "parameters": [ - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Pagination cursor (paginationKey from previous response meta). Used to fetch records relative to a specific position.", - "schema": { - "example": "1732492800000.12345", - "type": "string" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "Number of records per page (default: 10, maximum: 100)", - "schema": { - "example": 20, - "type": "number" - } - }, - { - "name": "affix", - "required": false, - "in": "query", - "description": "Navigation direction: \"append\" for next/older records, \"prepend\" for previous/newer records", - "schema": { - "enum": [ - "append", - "prepend" - ], - "type": "string" - } - }, - { - "name": "start", - "required": true, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "end", - "required": true, - "in": "query", - "schema": { - "type": "number" - } - }, - { - "name": "endTime", - "required": false, - "in": "query", - "description": "End timestamp (Unix timestamp in milliseconds) to filter records created before this time", - "schema": { - "example": 1732579200000, - "type": "number" - } - }, - { - "name": "startTime", - "required": false, - "in": "query", - "description": "Start timestamp (Unix timestamp in milliseconds) to filter records created after this time", - "schema": { - "example": 1732492800000, - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "Knowledge base records retrieved successfully with pagination metadata", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "description": "Array of knowledge base records (excludes _id, __v, paginationKey)", - "items": { + }, + "required": [ + "exclude" + ] + }, + "DiscoveredUrlsStatusQueryDto": { + "type": "object", + "properties": { + "uniqueId": { + "description": "Array of discovered URL unique IDs to query status for", + "example": [ + "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", + "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uniqueId" + ] + }, + "SyncDiscoveredUrlsDto": { + "type": "object", + "properties": { + "uniqueIds": { + "description": "Array of unique IDs to sync for batch processing", + "example": [ + "url-id-1", + "url-id-2", + "url-id-3" + ], + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uniqueIds" + ] + }, + "FormFieldDto": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Field label" + }, + "required": { + "type": "boolean", + "description": "Whether field is required" + }, + "type": { + "type": "string", + "description": "Field type (text, url, boolean, dropdown, toggles)" + }, + "keyInPayload": { + "type": "string", + "description": "Key to use in payload" + }, + "keyInData": { + "type": "string", + "description": "Key to use in data" + }, + "hidden": { + "type": "boolean", + "description": "Whether field is hidden", + "default": false + }, + "disabled": { + "type": "boolean", + "description": "Whether field is disabled", + "default": false + }, + "placeholder": { "type": "object", + "description": "Placeholder text/number/object for the field" + }, + "tip": { + "type": "object", + "description": "Tip information for the field", "properties": { - "uniqueId": { - "type": "string", - "description": "Unique identifier for the record" - }, - "appId": { - "type": "string", - "description": "Application ID" - }, - "sourceName": { - "type": "string", - "description": "Name of the source file or text detail" - }, - "type": { - "type": "string", - "description": "Type of source (uploads, text-details)" - }, - "status": { - "type": "string", - "description": "Current status (inSync, indexing, indexed, failed)" - }, - "lastSynced": { - "type": "number", - "description": "Timestamp of last synchronization" - }, - "createdAt": { - "type": "number", - "description": "Creation timestamp" - }, - "updatedAt": { - "type": "number", - "description": "Last update timestamp" - } - } - } - }, - "meta": { - "type": "object", - "description": "Pagination metadata for navigation", - "properties": { - "current": { - "type": "object", - "properties": { - "limit": { - "type": "number", - "description": "Requested page limit" - }, - "count": { - "type": "number", - "description": "Actual number of records returned" - } - } - }, - "previous": { - "type": "object", - "description": "Previous page navigation (only present if previous page exists)", - "properties": { - "affix": { - "type": "string", - "enum": [ - "prepend" - ], - "description": "Direction for previous page" - }, - "cursor": { - "type": "string", - "description": "Cursor for previous page" - } - } - }, - "next": { - "type": "object", - "description": "Next page navigation (only present if next page exists)", - "properties": { - "affix": { - "type": "string", - "enum": [ - "append" - ], - "description": "Direction for next page" + "title": { + "type": "string", + "description": "Tip title/text" }, - "cursor": { - "type": "string", - "description": "Cursor for next page" + "icon": { + "type": "string", + "description": "Optional tip icon" } - } } - } + }, + "value": { + "type": "object", + "description": "Default field value" + }, + "dynamicOptions": { + "type": "object", + "description": "Dynamic options configuration" } - } - } - } - } - }, - "400": { - "description": "Bad Request - Missing appId header or invalid parameters" - }, - "500": { - "description": "Internal Server Error - Failed to retrieve knowledge base records" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get knowledge base records with cursor-based pagination", - "tags": [ - "knowledge-base" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/pages": { - "get": { - "description": "Retrieve paginated pages for a specific knowledge base source.", - "operationId": "RagController_getSourcePages", - "parameters": [ - { - "name": "sourceType", - "required": true, - "in": "path", - "description": "Source type (uploads, knowledge-base, etc.)", - "schema": { - "type": "string" - } - }, - { - "name": "uniqueId", - "required": true, - "in": "path", - "description": "Unique file ID to fetch pages for", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "Number of pages to return (default 1)", - "schema": { - "type": "number" - } - }, - { - "name": "page", - "required": false, - "in": "query", - "description": "Cursor page number for pagination", - "schema": { - "type": "number" - } - }, - { - "name": "affix", - "required": false, - "in": "query", - "description": "append or prepend", - "schema": { - "enum": [ - "prepend", - "append" - ], - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Source pages retrieved successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object" - } + }, + "required": [ + "label", + "required", + "type" + ] + }, + "SubmitDetailsDto": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "HTTP method" + }, + "url": { + "type": "string", + "description": "Submit URL" + }, + "Authorization": { + "type": "string", + "description": "Authorization header" }, - "meta": { - "type": "object" + "redirectPath": { + "type": "string", + "description": "Redirect path after submit" } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get paginated source pages", - "tags": [ - "knowledge-base" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/sync": { - "patch": { - "description": "Trigger a resync for a specific knowledge base source.", - "operationId": "RagController_revectorizeSource", - "parameters": [ - { - "name": "sourceType", - "required": true, - "in": "path", - "description": "Source type (uploads, knowledge-base, etc.)", - "schema": { - "type": "string" - } - }, - { - "name": "uniqueId", - "required": true, - "in": "path", - "description": "Unique source ID to revectorize", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Revectorization triggered successfully." - }, - "400": { - "description": "Bad Request." - }, - "404": { - "description": "Source not found." - }, - "500": { - "description": "Internal Server Error." - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Resync/Revectorize source", - "tags": [ - "knowledge-base" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/status/poll": { - "post": { - "operationId": "RagController_getBatchStatus", - "parameters": [], - "requestBody": { - "required": true, - "description": "Array of unique IDs to query", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusQueryDto" - } - } - } - }, - "responses": { - "200": { - "description": "Status for requested unique IDs", - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "success": true, - "data": { - "id1": "indexing", - "id2": "indexed" - } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get status for multiple unique IDs", - "tags": [ - "knowledge-base" - ], - "description": "Retrieve the processing status for multiple knowledge base entries." - } - }, - "/ai-agents/agent-builder/knowledge-base/website/scrape": { - "post": { - "description": "Scrape a website and fetch its sitemap for use as agent knowledge.", - "operationId": "CrawlWebPagesController_crawlWebsite", - "parameters": [], - "requestBody": { - "required": true, - "description": "Website crawling configuration", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScrapePagesDto" - }, - "examples": { - "basic": { - "summary": "Website sitemap scrape", - "description": "Scrape website and fetch sitemap with basic configuration", - "value": { - "url": "https://example.com", - "maxDepth": 3, - "maxPages": 5 - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Website scraped successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true + }, + "required": [ + "method", + "url" + ] + }, + "CreateFormDto": { + "type": "object", + "properties": { + "formType": { + "type": "string", + "description": "Form type identifier" }, - "message": { - "type": "string", - "example": "Website scrape completed successfully" - }, - "data": { - "type": "object", - "properties": { - "crawlId": { - "type": "string", - "example": "crawl-1701789123456" - }, - "crawlDuration": { - "type": "number", - "example": 120000 - }, - "status": { - "type": "string", - "example": "completed" - }, - "sitemap": { - "type": "object", - "properties": { - "found": { - "type": "boolean", - "example": true - }, - "url": { - "type": "string", - "example": "https://docs.example.com/sitemap.xml" - }, - "totalUrls": { - "type": "number", - "example": 245 - }, - "urls": { - "type": "array", - "items": { - "type": "string" - } - }, - "lastModified": { - "type": "string", - "example": "2025-12-05T10:30:00Z" - } - } + "name": { + "type": "string", + "description": "Form name" + }, + "description": { + "type": "string", + "description": "Form description" + }, + "fields": { + "description": "Form fields", + "type": "array", + "items": { + "$ref": "#/components/schemas/FormFieldDto" } - } - } - } - } - } - } - }, - "400": { - "description": "Invalid request parameters", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "statusCode": { - "type": "number", - "example": 400 }, - "message": { - "type": "string", - "example": "Invalid URL format" + "submitDetails": { + "description": "Submit configuration", + "allOf": [ + { + "$ref": "#/components/schemas/SubmitDetailsDto" + } + ] + }, + "isActive": { + "type": "boolean", + "description": "Whether form is active", + "default": true }, - "error": { - "type": "string", - "example": "Bad Request" + "version": { + "type": "string", + "description": "Form version" } - } - } - } - } - }, - "401": { - "description": "Unauthorized - missing or invalid appId" - }, - "429": { - "description": "Too many requests - rate limit exceeded" - }, - "500": { - "description": "Internal server error during scraping", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "statusCode": { - "type": "number", - "example": 500 + }, + "required": [ + "formType", + "name", + "fields", + "submitDetails" + ] + }, + "UpdateFormDto": { + "type": "object", + "properties": { + "formType": { + "type": "string", + "description": "Form type identifier" }, - "message": { - "type": "string", - "example": "Failed to scrape website: FIRECRAWL_API_KEY not configured" + "name": { + "type": "string", + "description": "Form name" }, - "error": { - "type": "string", - "example": "Internal Server Error" - } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Scrape a website and fetch sitemap", - "tags": [ - "crawl-web-pages" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/website/individual-page": { - "post": { - "description": "Scrape a single webpage to extract its title, description, and content.", - "operationId": "CrawlWebPagesController_scrapePage", - "parameters": [], - "requestBody": { - "required": true, - "description": "Single page scraping configuration", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScrapeIndividualPageDto" - }, - "examples": { - "basic": { - "summary": "Basic page scrape", - "description": "Simple page content extraction", - "value": { - "url": "https://docs.example.com/getting-started", - "timeout": 30000, - "format": "markdown" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Page scraped successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true + "description": { + "type": "string", + "description": "Form description" }, - "message": { - "type": "string", - "example": "Page scraped successfully" - }, - "data": { - "type": "object", - "properties": { - "url": { - "type": "string", - "example": "https://docs.example.com/getting-started" - }, - "title": { - "type": "string", - "example": "Getting Started Guide" - }, - "description": { - "type": "string", - "example": "Learn how to get started with our platform" - }, - "content": { - "type": "string", - "example": "# Getting Started\n\nWelcome to our platform..." - }, - "metadata": { - "type": "object", - "properties": { - "og": { - "type": "object" - }, - "twitter": { - "type": "object" - }, - "canonical": { - "type": "string" - }, - "language": { - "type": "string" - } - } - }, - "scraper": { - "type": "string", - "example": "Firecrawl" - }, - "crawlDuration": { - "type": "number", - "example": 2500 - }, - "contentLength": { - "type": "number", - "example": 1024 - }, - "timestamp": { - "type": "string", - "example": "2025-12-05T17:30:00Z" + "fields": { + "description": "Form fields", + "type": "array", + "items": { + "$ref": "#/components/schemas/FormFieldDto" } - } - } - } - } - } - } - }, - "400": { - "description": "Invalid request parameters", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "statusCode": { - "type": "number", - "example": 400 }, - "message": { - "type": "string", - "example": "Invalid URL format" + "submitDetails": { + "description": "Submit configuration", + "allOf": [ + { + "$ref": "#/components/schemas/SubmitDetailsDto" + } + ] }, - "error": { - "type": "string", - "example": "Bad Request" + "isActive": { + "type": "boolean", + "description": "Whether form is active", + "default": true + }, + "version": { + "type": "string", + "description": "Form version" } - } } - } - } - }, - "401": { - "description": "Unauthorized - missing or invalid appId" - }, - "500": { - "description": "Internal server error during page scraping", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { + }, + "ErrorResponse": { + "type": "object", + "properties": { "statusCode": { - "type": "number", - "example": 500 + "type": "number", + "example": 400, + "description": "HTTP status code" }, "message": { - "type": "string", - "example": "Failed to scrape page: Timeout exceeded" + "type": "string", + "example": "Validation failed", + "description": "Error message" }, "error": { - "type": "string", - "example": "Internal Server Error" + "type": "string", + "example": "Bad Request", + "description": "Error type" } - } - } - } - } - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Scrape a single page and extract content", - "tags": [ - "crawl-web-pages" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls": { - "get": { - "description": "Retrieve URLs discovered during a website crawl with cursor-based pagination.", - "operationId": "CrawlWebPagesController_getDiscoveredUrls", - "parameters": [ - { - "name": "parentUniqueId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Pagination cursor (timestamp from previous response meta)", - "schema": { - "example": "1701789000000", - "type": "string" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "Number of records per page (default: 10, maximum: 100)", - "schema": { - "example": 20, - "type": "number" - } - }, - { - "name": "affix", - "required": false, - "in": "query", - "description": "Navigation direction: \"append\" for next/older records, \"prepend\" for previous/newer records", - "schema": { - "enum": [ - "append", - "prepend" - ], - "type": "string" - } - }, - { - "name": "status", - "required": false, - "in": "query", - "description": "Filter by URL processing status", - "schema": { - "enum": [ - "discovered", - "processing", - "processed", - "failed", - "skipped" - ], - "type": "string" - } - }, - { - "name": "startTime", - "required": false, - "in": "query", - "description": "Start timestamp (Unix timestamp in milliseconds) to filter records created after this time", - "schema": { - "example": 1701780000000, - "type": "number" - } - }, - { - "name": "endTime", - "required": false, - "in": "query", - "description": "End timestamp (Unix timestamp in milliseconds) to filter records created before this time", - "schema": { - "example": 1701790000000, - "type": "number" - } - }, - { - "name": "parentId", - "required": true, - "in": "path", - "description": "Unique ID of the parent crawl (from WebPages collection)", - "schema": { - "example": "uuid-1234-5678-9abc" - } - } - ], - "responses": { - "200": { - "description": "Discovered URLs retrieved successfully with pagination metadata", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "description": "Array of discovered URL records", - "items": { - "type": "object", - "properties": { - "urlId": { - "type": "string", - "description": "Unique identifier for the discovered URL", - "example": "uuid-abcd-1234" - }, - "url": { - "type": "string", - "description": "The discovered URL", - "example": "https://docs.example.com/guide" - }, - "title": { - "type": "string", - "description": "Page title extracted from the URL", - "example": "Getting Started Guide" - }, - "description": { - "type": "string", - "description": "Page description or meta description", - "example": "Learn how to get started..." - }, - "content": { - "type": "string", - "description": "Page content preview (truncated to 500 characters)", - "example": "Page content preview..." - }, - "status": { - "type": "string", - "description": "Processing status of the URL", - "example": "processed" - }, - "lastCrawledAt": { - "type": "number", - "description": "Timestamp when URL was last crawled", - "example": 1701789123456 - }, - "retryCount": { - "type": "number", - "description": "Number of retry attempts", - "example": 0 - }, - "createdAt": { - "type": "number", - "description": "Creation timestamp", - "example": 1701789000000 - }, - "updatedAt": { - "type": "number", - "description": "Last update timestamp", - "example": 1701789123456 - }, - "vectorizationStatus": { - "type": "string", - "description": "Status of content vectorization", - "example": "completed" - }, - "chunksCreated": { - "type": "number", - "description": "Number of text chunks created", - "example": 5 - }, - "embeddingsGenerated": { - "type": "number", - "description": "Number of embeddings generated", - "example": 5 - } - } - } - }, - "meta": { - "type": "object", - "description": "Pagination metadata for navigation", - "properties": { - "current": { - "type": "object", - "properties": { - "limit": { - "type": "number", - "description": "Records per page limit used for this request" - }, - "count": { - "type": "number", - "description": "Number of records returned in this page" - } - } - }, - "previous": { - "type": "object", - "description": "Navigation info for previous page (newer records). Present only if there are newer records available.", - "properties": { - "affix": { - "type": "string", - "enum": [ - "prepend" - ], - "description": "Use \"prepend\" to get previous/newer records" - }, - "cursor": { - "type": "string", - "description": "Cursor value to use in next request for previous page" - } - } - }, - "next": { - "type": "object", - "description": "Navigation info for next page (older records). Present only if there are older records available.", - "properties": { - "affix": { - "type": "string", - "enum": [ - "append" - ], - "description": "Use \"append\" to get next/older records" - }, - "cursor": { - "type": "string", - "description": "Cursor value to use in next request for next page" - } - } - } - } + }, + "required": [ + "statusCode", + "message", + "error" + ] + }, + "SuccessBooleanResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates whether the operation was successful" } - } - } - } - } - }, - "400": { - "description": "Bad Request - Missing appId header or invalid parameters" - }, - "500": { - "description": "Internal Server Error - Failed to retrieve discovered URLs" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get discovered URLs for a parent crawl", - "tags": [ - "crawl-web-pages" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process": { - "post": { - "description": "Process discovered URLs by marking exclusions and initiating batch crawling.", - "operationId": "CrawlWebPagesController_processDiscoveredUrls", - "parameters": [ - { - "name": "parentUniqueId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "description": "Discovered URLs processing configuration. App ID is taken from header, not body.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessDiscoveredUrlsDto" - }, - "examples": { - "basic": { - "summary": "Process discovered URLs", - "description": "Process multiple discovered URLs for batch crawling. App ID comes from header.", - "value": { - "exclude": [ - "550e8400-e29b-41d4-a716-446655440001", - "550e8400-e29b-41d4-a716-446655440002" - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Batch processing initiated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { + }, + "required": [ + "success" + ] + }, + "SuccessMessageResponse": { + "type": "object", + "properties": { "success": { - "type": "boolean", - "example": true + "type": "boolean", + "example": true, + "description": "Indicates whether the operation was successful" }, "message": { - "type": "string", - "example": "Batch processing initiated successfully" - }, - "data": { - "type": "object", - "properties": { - "batchId": { - "type": "string", - "example": "batch-1701789123456" - }, - "urlsProcessed": { - "type": "number", - "example": 2 - }, - "totalUrls": { - "type": "number", - "example": 2 - }, - "webhookUrl": { - "type": "string", - "example": "https://webhook.site/b4994000-62d9-4e17-928f-790282cb5815" - }, - "status": { - "type": "string", - "example": "processing" - } - } + "type": "string", + "example": "Operation completed successfully", + "description": "Human-readable result message" } - } - } - } - } - }, - "400": { - "description": "Invalid request parameters or mismatched arrays" - }, - "404": { - "description": "No valid discovered URLs found for processing" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Process discovered URLs for batch crawling", - "tags": [ - "crawl-web-pages" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/status/poll": { - "post": { - "description": "Retrieve the processing status for multiple discovered URLs.", - "operationId": "CrawlWebPagesController_getDiscoveredUrlsStatus", - "parameters": [ - { - "name": "parentUniqueId", - "required": true, - "in": "path", - "description": "Parent website crawl unique ID", - "schema": { - "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "description": "Array of discovered URL unique IDs to query status for", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiscoveredUrlsStatusQueryDto" - }, - "examples": { - "example1": { - "summary": "Query multiple discovered URL statuses", - "value": { - "uniqueId": [ - "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", - "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Status for requested discovered URLs (omits non-existing uniqueIds)", - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "success": true, - "data": { - "fb45bb1e-bc81-45a8-85be-36b2aa4f289e": "processed", - "c2847dcd-636c-4e7a-9217-593ccf2a7bb1": "discovered" - } - } - } - } - } - }, - "400": { - "description": "Bad Request - Missing appId header or invalid parameters" - }, - "500": { - "description": "Internal Server Error - Failed to retrieve discovered URLs status" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Get status for multiple discovered URLs", - "tags": [ - "crawl-web-pages" - ] - } - }, - "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/sync": { - "patch": { - "description": "Resync specific discovered URLs within a parent website crawl.", - "operationId": "CrawlWebPagesController_syncDiscoveredUrls", - "parameters": [ - { - "name": "parentUniqueId", - "required": true, - "in": "path", - "description": "Parent website crawl unique ID", - "schema": { - "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479", - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "description": "Array of discovered URL unique IDs to sync. Only non-excluded URLs will be processed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncDiscoveredUrlsDto" - }, - "examples": { - "sync_specific_urls": { - "summary": "Sync specific discovered URLs", - "description": "Process only the specified discovered URLs that are not excluded", - "value": { - "uniqueIds": [ - "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", - "c2847dcd-636c-4e7a-9217-593ccf2a7bb1", - "550e8400-e29b-41d4-a716-446655440003" - ] - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Sync processing initiated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true + }, + "required": [ + "success", + "message" + ] + }, + "ParametersDto": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "object" + ], + "description": "The type of the parameters object", + "example": "object" }, - "message": { - "type": "string", - "example": "Sync processing initiated successfully" - }, - "data": { - "type": "object", - "properties": { - "batchId": { - "type": "string", - "example": "sync-batch-1701789123456" - }, - "urlsProcessed": { - "type": "number", - "example": 2 - }, - "totalRequested": { - "type": "number", - "example": 3 - }, - "excludedUrls": { - "type": "number", - "example": 1 - }, - "webhookUrl": { - "type": "string", - "example": "https://webhook.site/b4994000-62d9-4e17-928f-790282cb5815" - }, - "status": { - "type": "string", - "example": "processing" + "properties": { + "type": "object", + "description": "Map of parameter property names to their definitions (type and description)", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "type", + "description" + ] }, - "processedUrls": { - "type": "array", - "items": { + "example": { + "username": { + "type": "string", + "description": "The username" + } + } + }, + "required": { + "description": "List of required parameter property names", + "example": [ + "username" + ], + "type": "array", + "items": { "type": "string" - }, - "example": [ - "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", - "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" - ] } - } } - } - } - } - } - }, - "400": { - "description": "Bad Request - Missing appId header, invalid parameters, or empty uniqueIds array" - }, - "404": { - "description": "No valid non-excluded discovered URLs found for sync processing" - }, - "500": { - "description": "Internal Server Error - Failed to sync discovered URLs" - } - }, - "security": [ - { - "apiKey": [] - } - ], - "summary": "Sync specific discovered URLs for batch processing", - "tags": [ - "crawl-web-pages" - ] - } - } - }, - "info": { - "title": "AI Agents APIs", - "description": "API reference for CometChat AI Agents service", - "version": "1.0" - }, - "tags": [ - { - "name": "ai-agent", - "description": "" - } - ], - "servers": [ - { - "url": "https://{appid}.api-{region}.cometchat.io/v3", - "variables": { - "appid": { - "default": "appId", - "description": "(Required) App ID" - }, - "region": { - "enum": [ - "us", - "eu", - "in" - ], - "default": "us", - "description": "Select Region" - } - } - } - ], - "components": { - "securitySchemes": { - "apiKey": { - "type": "apiKey", - "description": "API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).", - "name": "apikey", - "in": "header" - } - }, - "schemas": { - "CreateAgentDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the agent" - }, - "icon": { - "type": "string", - "description": "URL to the icon/avatar of the agent" - }, - "isActive": { - "type": "boolean", - "default": true, - "description": "Is the agent active?" - }, - "integrateWith": { - "type": "string", - "description": "ID of the LLM or platform this agent connects to" - }, - "integrationType": { - "type": "string", - "enum": [ - "llm", - "agent" - ], - "description": "Type of connection: llm or agent" - }, - "integrationMeta": { - "type": "object", - "description": "Required if integrationType is \"agent\". URL where the agent is deployed" - }, - "actions": { - "description": "List of actions", - "type": "array", - "items": { - "type": "string" - } - }, - "tools": { - "description": "List of tools", - "type": "array", - "items": { - "type": "string" - } - }, - "cometchatTools": { - "description": "List of CometChat-provided tools", - "type": "array", - "items": { - "type": "string" - } - }, - "instruction": { - "type": "string", - "description": "Instruction for the agent" - }, - "suggestions": { - "description": "Array of suggestion texts for the agent", - "type": "array", - "items": { - "type": "string" - } - }, - "metaData": { - "type": "object", - "description": "Optional metadata object for the agent" - } - }, - "required": [ - "name", - "isActive", - "integrateWith", - "integrationType", - "actions", - "tools" - ] - }, - "GetAgentDetailDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "deploymentUrl": { - "type": "string" - }, - "apiKey": { - "type": "string" - } - }, - "required": [ - "name", - "description", - "deploymentUrl", - "apiKey" - ] - }, - "UpdateAgentDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the agent" - }, - "icon": { - "type": "string", - "description": "URL to the icon/avatar of the agent" - }, - "isActive": { - "type": "boolean", - "default": true, - "description": "Is the agent active?" - }, - "integrateWith": { - "type": "string", - "description": "ID of the LLM or platform this agent connects to" - }, - "integrationType": { - "type": "string", - "enum": [ - "llm", - "agent" - ], - "description": "Type of connection: llm or agent" - }, - "integrationMeta": { - "type": "object", - "description": "Required if integrationType is \"agent\". URL where the agent is deployed" - }, - "actions": { - "description": "List of actions", - "type": "array", - "items": { - "type": "string" - } - }, - "tools": { - "description": "List of tools", - "type": "array", - "items": { - "type": "string" - } - }, - "cometchatTools": { - "description": "List of CometChat-provided tools", - "type": "array", - "items": { - "type": "string" - } - }, - "instruction": { - "type": "string", - "description": "Instruction for the agent" - }, - "suggestions": { - "description": "Array of suggestion texts for the agent", - "type": "array", - "items": { - "type": "string" - } - }, - "metaData": { - "type": "object", - "description": "Optional metadata object for the agent" - } - } - }, - "CreateTagDto": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "text": { - "type": "string" - }, - "style": { - "type": "object" - } - }, - "required": [ - "id", - "text", - "style" - ] - }, - "UpdateTagDto": { - "type": "object", - "properties": { - "text": { - "type": "string" - }, - "style": { - "type": "object" - } - }, - "required": [ - "text", - "style" - ] - }, - "ToolDto": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "description": "Display name shown in the UI for this tool", - "example": "Get Weather" - }, - "description": { - "type": "string", - "description": "Description of what the tool does. Required when doNotExecute is false.", - "example": "Fetches current weather data for a given location" - }, - "executionText": { - "type": "string", - "description": "Text displayed while the tool is executing", - "example": "Fetching weather data..." - }, - "name": { - "type": "string", - "description": "Unique function name for the tool. Must start with a letter, underscore, or dollar sign, followed by alphanumeric characters, underscores, dollar signs, or hyphens.", - "pattern": "^[a-zA-Z_$][a-zA-Z0-9_$-]*$", - "example": "get_weather" - }, - "doNotExecute": { - "type": "boolean", - "description": "When true, the tool will not be executed locally and parameters/description become optional", - "default": false - }, - "parameters": { - "description": "Tool parameter definitions. Required when doNotExecute is false, but can be an empty object. Must be empty or omitted when doNotExecute is true.", - "allOf": [ - { - "$ref": "#/components/schemas/ParametersDto" - } - ] - } - }, - "required": [ - "displayName", - "executionText", - "name" - ] - }, - "MessageEventDTO": { - "type": "object", - "properties": {} - }, - "CreateIntegrationDto": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "agent", - "llm" - ], - "description": "Allowed values: agent, llm" - }, - "icon": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "isActive": { - "type": "boolean", - "default": true - }, - "metaData": { - "type": "object", - "default": {} - } - }, - "required": [ - "id", - "name", - "type", - "icon", - "tags", - "isActive", - "metaData" - ] - }, - "UpdateIntegrationDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "isActive": { - "type": "boolean", - "default": true - }, - "metaData": { - "type": "object", - "default": {} - } - }, - "required": [ - "name", - "icon", - "tags", - "isActive", - "metaData" - ] - }, - "CreateCometChatAgentDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the agent" - }, - "icon": { - "type": "string", - "description": "URL to the icon/avatar of the agent" - }, - "description": { - "type": "string", - "description": "Description of the agent" - }, - "tools": { - "description": "Array of tool names available to this agent", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "apiTools": { - "description": "Array of API tool names available to this agent", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "mcpServers": { - "description": "Array of MCP server names available to this agent", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "instruction": { - "type": "string", - "description": "Instructions for the agent behavior" - }, - "metaData": { - "type": "object", - "description": "Additional metadata for the agent" - }, - "model": { - "type": "string", - "description": "AI model to use for this agent", - "default": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "description": "Configuration metadata for the AI model" - }, - "isActive": { - "type": "boolean", - "default": true, - "description": "Is the agent active?" - } - }, - "required": [ - "name", - "description", - "isActive" - ] - }, - "UpdateCometChatAgentDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the agent" - }, - "icon": { - "type": "string", - "description": "URL to the icon/avatar of the agent" - }, - "description": { - "type": "string", - "description": "Description of the agent" - }, - "tools": { - "description": "Array of tool names available to this agent", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "apiTools": { - "description": "Array of API tool names available to this agent", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "mcpServers": { - "description": "Array of MCP server names available to this agent", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "instruction": { - "type": "string", - "description": "Instructions for the agent behavior" - }, - "metaData": { - "type": "object", - "description": "Additional metadata for the agent" - }, - "model": { - "type": "string", - "description": "AI model to use for this agent", - "default": "gpt-4o-mini" - }, - "modelMetaData": { - "type": "object", - "description": "Configuration metadata for the AI model" - }, - "isActive": { - "type": "boolean", - "default": true, - "description": "Is the agent active?" - } - } - }, - "ManageAgentToolsDto": { - "type": "object", - "properties": { - "tools": { - "description": "Array of tool names to add or remove", - "example": [ - "gmail", - "google-sheets", - "slack" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "tools" - ] - }, - "ManageAgentMcpDto": { - "type": "object", - "properties": { - "mcps": { - "description": "Array of MCP server slugs to add or remove", - "example": [ - "filesystem", - "git", - "postgres" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "mcps" - ] - }, - "ManageAgentApiToolsDto": { - "type": "object", - "properties": { - "apiTools": { - "description": "Array of API tool slugs to add or remove", - "example": [ - "get_weather", - "send_email", - "create_task" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "apiTools" - ] - }, - "ManageAgentFrontendActionsDto": { - "type": "object", - "properties": { - "frontendActions": { - "description": "Array of frontend action function names to add or remove", - "example": [ - "openProduct_modal", - "showNotification" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "frontendActions" - ] - }, - "ManageKnowledgeBaseFilesDto": { - "type": "object", - "properties": { - "uniqueIds": { - "description": "Array of file IDs to be added to the knowledge base", - "example": [ - "60f7b3b3b3b3b3b3b3b3b3b3", - "60f7b3b3b3b3b3b3b3b3b3b4" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "uniqueIds" - ] - }, - "ManageActionsDto": { - "type": "object", - "properties": { - "actions": { - "description": "Array of action names to add or remove", - "example": [ - "send-email", - "draft-email", - "read-emails" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "authMeta": { - "type": "object", - "description": "Credentials or metadata required for authenticating the tool", - "example": [ - "emailId: \"example@cometchat.com\"" - ] - } - }, - "required": [ - "actions", - "authMeta" - ] - }, - "CreateCustomVariableDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique variable name. Must start with a letter and contain only alphanumeric characters, underscores, and dots.", - "maxLength": 50, - "pattern": "^[a-zA-Z][a-zA-Z0-9_.]*$", - "example": "user.preferred_language" - }, - "description": { - "type": "string", - "description": "Human-readable description of the variable", - "maxLength": 200, - "example": "The preferred language of the user" - }, - "sourceType": { - "type": "string", - "description": "Source from which the variable value is resolved", - "enum": [ - "message_metadata", - "user_metadata", - "constant" - ], - "example": "user_metadata" - }, - "sourcePath": { - "type": "string", - "description": "Dot-notation path to extract the value from the source metadata", - "maxLength": 100, - "example": "language" - }, - "constantValue": { - "type": "string", - "description": "Fixed value used when sourceType is constant", - "maxLength": 500, - "example": "en" - }, - "defaultValue": { - "type": "string", - "description": "Fallback value used when the source path does not resolve", - "maxLength": 200, - "example": "en" - } - }, - "required": [ - "name", - "sourceType" - ] - }, - "UpdateCustomVariableDto": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Human-readable description of the variable", - "maxLength": 200, - "example": "The preferred language of the user" - }, - "sourceType": { - "type": "string", - "description": "Source from which the variable value is resolved", - "enum": [ - "message_metadata", - "user_metadata", - "constant" - ], - "example": "user_metadata" - }, - "sourcePath": { - "type": "string", - "description": "Dot-notation path to extract the value from the source metadata", - "maxLength": 100, - "example": "language" - }, - "constantValue": { - "type": "string", - "description": "Fixed value used when sourceType is constant", - "maxLength": 500, - "example": "en" - }, - "defaultValue": { - "type": "string", - "description": "Fallback value used when the source path does not resolve", - "maxLength": 200, - "example": "en" - } - } - }, - "TestVariableResolutionDto": { - "type": "object", - "properties": {} - }, - "ApiToolSampleContextDto": { - "type": "object", - "properties": { - "senderUid": { - "type": "string", - "description": "Sender user ID", - "example": "user123" - }, - "senderRole": { - "type": "string", - "description": "Sender role", - "example": "default" - }, - "senderMetadata": { - "type": "object", - "description": "Sender metadata object", - "example": { - "department": "engineering", - "level": "senior" - } - }, - "receiverUid": { - "type": "string", - "description": "Receiver user ID (defaults to agent ID)", - "example": "agent456" - }, - "messageMetadata": { - "type": "object", - "description": "Message metadata object", - "example": { - "priority": "high", - "source": "web" - } - } - }, - "required": [ - "senderUid" - ] - }, - "TestApiToolVariablesDto": { - "type": "object", - "properties": { - "sampleContext": { - "description": "Sample context for variable resolution", - "allOf": [ - { - "$ref": "#/components/schemas/ApiToolSampleContextDto" - } - ] - }, - "sampleQueryParams": { - "type": "object", - "description": "Sample query parameters to test resolution", - "example": { - "userId": "[{variable-auth: \"sender.uid\"}]", - "limit": "10" - } - } - }, - "required": [ - "sampleContext" - ] - }, - "ApiToolParameter": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Parameter key/name", - "example": "email" - }, - "type": { - "type": "string", - "description": "Parameter type", - "example": "string" - }, - "description": { - "type": "string", - "description": "Parameter description", - "example": "Email of the lead" - }, - "required": { - "type": "boolean", - "description": "Whether the parameter is required", - "example": false - } - }, - "required": [ - "key", - "type", - "description" - ] - }, - "CreateApiToolDto": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "description": "Slug for the API tool (unique)", - "example": "create_lead" - }, - "description": { - "type": "string", - "description": "Description of the API tool", - "example": "When to use, preconditions, what it returns" - }, - "endpoint": { - "type": "string", - "description": "API endpoint URL", - "example": "https://api.example.com/leads" - }, - "method": { - "type": "string", - "description": "HTTP method", - "example": "POST", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - }, - "enableBasicAuth": { - "type": "boolean", - "description": "Whether to enable basic authentication", - "example": true - }, - "basicAuthUsername": { - "type": "string", - "description": "Basic auth username (required if enableBasicAuth is true)", - "example": "username" - }, - "basicAuthPassword": { - "type": "string", - "description": "Basic auth password (required if enableBasicAuth is true)", - "example": "password" - }, - "headers": { - "type": "string", - "description": "HTTP headers as a JSON string (e.g., '{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}')", - "example": "{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}" - }, - "bodyTemplate": { - "type": "string", - "description": "Body template for the API request", - "example": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}" - }, - "allowAdditionalProperties": { - "type": "boolean", - "description": "Whether to allow additional properties", - "example": false, - "default": false - }, - "parameters": { - "description": "Array of parameters for the API tool", - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiToolParameter" - } - }, - "icon": { - "type": "string", - "description": "Icon for the API Tool", - "example": "http://localhost:3001" - }, - "name": { - "type": "string", - "description": "Name of the API tool", - "example": "Create Lead" - } - }, - "required": [ - "slug", - "description", - "endpoint", - "method", - "enableBasicAuth", - "name" - ] - }, - "UpdateApiToolDto": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "description": "Slug for the API tool (unique)", - "example": "create_lead" - }, - "description": { - "type": "string", - "description": "Description of the API tool", - "example": "When to use, preconditions, what it returns" - }, - "endpoint": { - "type": "string", - "description": "API endpoint URL", - "example": "https://api.example.com/leads" - }, - "method": { - "type": "string", - "description": "HTTP method", - "example": "POST", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE" - ] - }, - "enableBasicAuth": { - "type": "boolean", - "description": "Whether to enable basic authentication", - "example": true - }, - "basicAuthUsername": { - "type": "string", - "description": "Basic auth username (required if enableBasicAuth is true)", - "example": "username" - }, - "basicAuthPassword": { - "type": "string", - "description": "Basic auth password (required if enableBasicAuth is true)", - "example": "password" - }, - "headers": { - "type": "string", - "description": "HTTP headers as a JSON string (e.g., '{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}')", - "example": "{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}" - }, - "bodyTemplate": { - "type": "string", - "description": "Body template for the API request", - "example": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}" - }, - "allowAdditionalProperties": { - "type": "boolean", - "description": "Whether to allow additional properties", - "example": false, - "default": false - }, - "parameters": { - "description": "Array of parameters for the API tool", - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiToolParameter" - } - }, - "icon": { - "type": "string", - "description": "Icon for the API Tool", - "example": "http://localhost:3001" - } - } - }, - "CreateMcpServerDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the MCP server (human readable)", - "example": "Weather Server" - }, - "slug": { - "type": "string", - "description": "Slug of the MCP server (unique, URL-safe)", - "example": "weather-server" - }, - "description": { - "type": "string", - "description": "Description of the MCP server", - "example": "Provides weather data for cities" - }, - "url": { - "type": "string", - "description": "URL of the MCP server", - "example": "http://localhost:3001" - }, - "icon": { - "type": "string", - "description": "Icon for the MCP server", - "example": "http://localhost:3001/icon.png" - } - }, - "required": [ - "name", - "slug", - "description", - "url" - ] - }, - "UpdateMcpServerDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Updated name of the MCP server (human readable)", - "example": "Weather Server" - }, - "description": { - "type": "string", - "description": "Updated description of the MCP server", - "example": "Provides weather data for cities" - }, - "url": { - "type": "string", - "description": "Updated URL of the MCP server", - "example": "http://localhost:3002" - }, - "icon": { - "type": "string", - "description": "Updated icon for the MCP server", - "example": "http://localhost:3002/icon.png" - } - } - }, - "AuthenticateToolDto": { - "type": "object", - "properties": { - "authMeta": { - "type": "object", - "description": "Authentication metadata required for the tool", - "example": { - "emailId": "user@example.com" - } - } - } - }, - "FrontendActionParameter": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Parameter key/name", - "example": "productId" - }, - "type": { - "type": "string", - "description": "Parameter type", - "example": "string" - }, - "description": { - "type": "string", - "description": "Parameter description", - "example": "The ID of the product to display" - }, - "required": { - "type": "boolean", - "description": "Whether the parameter is required", - "example": true - } - }, - "required": [ - "key", - "type", - "description" - ] - }, - "CreateFrontendActionDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Display name of the frontend action", - "example": "Open Product Modal" - }, - "description": { - "type": "string", - "description": "Description of what the frontend action does", - "example": "Opens a modal displaying product details for the specified product ID" - }, - "triggerFunction": { - "type": "string", - "description": "The function name that the frontend will execute (used as unique identifier)", - "example": "showProductModal" - }, - "parameters": { - "description": "Array of parameters for the frontend action", - "type": "array", - "items": { - "$ref": "#/components/schemas/FrontendActionParameter" - } - }, - "icon": { - "type": "string", - "description": "Icon URL for the frontend action", - "example": "https://example.com/icon.png" - } - }, - "required": [ - "name", - "description", - "triggerFunction" - ] - }, - "UpdateFrontendActionDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the frontend action", - "example": "Open Product Modal" - }, - "description": { - "type": "string", - "description": "Description of what the frontend action does", - "example": "Opens a modal displaying product details" - }, - "parameters": { - "description": "Array of parameters for the frontend action", - "type": "array", - "items": { - "$ref": "#/components/schemas/FrontendActionParameter" - } - }, - "icon": { - "type": "string", - "description": "Icon URL for the frontend action", - "example": "https://example.com/icon.png" - } - } - }, - "FileDescriptorDto": { - "type": "object", - "properties": { - "fileName": { - "type": "string", - "description": "Name of the file", - "example": "document.pdf" - }, - "mimeType": { - "type": "string", - "description": "MIME type of the file", - "example": "application/pdf" - }, - "fileSize": { - "type": "number", - "description": "Size of the file in bytes", - "example": 1024000 - } - }, - "required": [ - "fileName", - "mimeType", - "fileSize" - ] - }, - "InitiateUploadDto": { - "type": "object", - "properties": { - "files": { - "description": "List of files to upload", - "type": "array", - "items": { - "$ref": "#/components/schemas/FileDescriptorDto" - } - } - }, - "required": [ - "files" - ] - }, - "CreateTextDetailDto": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Title of the text content", - "example": "Company Policy Document", - "maxLength": 500 - }, - "text": { - "type": "string", - "description": "Text content to be processed", - "example": "This document outlines the company policies and procedures...", - "maxLength": 5000 - } - }, - "required": [ - "title", - "text" - ] - }, - "UpdateTextDetailDto": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Title of the text content", - "example": "Updated Company Policy Document", - "maxLength": 500 - }, - "text": { - "type": "string", - "description": "Text content to be processed", - "example": "This is the updated document content with new policies and procedures...", - "maxLength": 5000 - } - } - }, - "StatusQueryDto": { - "type": "object", - "properties": { - "uniqueId": { - "description": "Array of unique IDs to query", - "example": [ - "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", - "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "uniqueId" - ] - }, - "ScrapePagesDto": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Target website URL to crawl", - "example": "https://docs.example.com" - }, - "maxDepth": { - "type": "number", - "description": "Maximum depth to crawl from the starting URL", - "minimum": 1, - "maximum": 10, - "default": 3, - "example": 5 - }, - "maxPages": { - "type": "number", - "description": "Maximum number of pages to crawl", - "minimum": 1, - "maximum": 10000, - "default": 100, - "example": 500 - }, - "include": { - "description": "URL patterns to include in crawling (substring matching)", - "example": [ - "docs/", - "api/", - "guides/" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "exclude": { - "description": "URL patterns to exclude from crawling (substring matching)", - "example": [ - "login", - "signup", - "admin", - "privacy" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "fetchSitemap": { - "type": "boolean", - "description": "Fetch and return sitemap URLs from the website", - "default": false, - "example": true - }, - "crawlerType": { - "type": "string", - "description": "Crawler service to use for crawling (firecrawl, puppeteer, etc.)", - "default": "firecrawl", - "example": "firecrawl" - } - }, - "required": [ - "url" - ] - }, - "ScrapeIndividualPageDto": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Target page URL to crawl and extract content from", - "example": "https://docs.example.com/getting-started" - }, - "timeout": { - "type": "number", - "description": "Request timeout in milliseconds", - "minimum": 5000, - "maximum": 120000, - "default": 30000, - "example": 30000 - }, - "crawlerType": { - "type": "string", - "description": "Crawler service to use for page crawling (firecrawl, puppeteer, etc.)", - "default": "firecrawl", - "example": "firecrawl" - }, - "format": { - "type": "string", - "description": "Extract content in specific format", - "enum": [ - "markdown", - "html", - "text" - ], - "default": "markdown", - "example": "markdown" - } - }, - "required": [ - "url" - ] - }, - "ProcessDiscoveredUrlsDto": { - "type": "object", - "properties": { - "exclude": { - "description": "Array of unique IDs to exclude from crawling", - "example": [ - "550e8400-e29b-41d4-a716-446655440001", - "550e8400-e29b-41d4-a716-446655440002" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "exclude" - ] - }, - "DiscoveredUrlsStatusQueryDto": { - "type": "object", - "properties": { - "uniqueId": { - "description": "Array of discovered URL unique IDs to query status for", - "example": [ - "fb45bb1e-bc81-45a8-85be-36b2aa4f289e", - "c2847dcd-636c-4e7a-9217-593ccf2a7bb1" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "uniqueId" - ] - }, - "SyncDiscoveredUrlsDto": { - "type": "object", - "properties": { - "uniqueIds": { - "description": "Array of unique IDs to sync for batch processing", - "example": [ - "url-id-1", - "url-id-2", - "url-id-3" - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "uniqueIds" - ] - }, - "FormFieldDto": { - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Field label" - }, - "required": { - "type": "boolean", - "description": "Whether field is required" - }, - "type": { - "type": "string", - "description": "Field type (text, url, boolean, dropdown, toggles)" - }, - "keyInPayload": { - "type": "string", - "description": "Key to use in payload" - }, - "keyInData": { - "type": "string", - "description": "Key to use in data" - }, - "hidden": { - "type": "boolean", - "description": "Whether field is hidden", - "default": false - }, - "disabled": { - "type": "boolean", - "description": "Whether field is disabled", - "default": false - }, - "placeholder": { - "type": "object", - "description": "Placeholder text/number/object for the field" - }, - "tip": { - "type": "object", - "description": "Tip information for the field", - "properties": { - "title": { - "type": "string", - "description": "Tip title/text" - }, - "icon": { - "type": "string", - "description": "Optional tip icon" - } - } - }, - "value": { - "type": "object", - "description": "Default field value" - }, - "dynamicOptions": { - "type": "object", - "description": "Dynamic options configuration" - } - }, - "required": [ - "label", - "required", - "type" - ] - }, - "SubmitDetailsDto": { - "type": "object", - "properties": { - "method": { - "type": "string", - "description": "HTTP method" - }, - "url": { - "type": "string", - "description": "Submit URL" - }, - "Authorization": { - "type": "string", - "description": "Authorization header" - }, - "redirectPath": { - "type": "string", - "description": "Redirect path after submit" - } - }, - "required": [ - "method", - "url" - ] - }, - "CreateFormDto": { - "type": "object", - "properties": { - "formType": { - "type": "string", - "description": "Form type identifier" - }, - "name": { - "type": "string", - "description": "Form name" - }, - "description": { - "type": "string", - "description": "Form description" - }, - "fields": { - "description": "Form fields", - "type": "array", - "items": { - "$ref": "#/components/schemas/FormFieldDto" - } - }, - "submitDetails": { - "description": "Submit configuration", - "allOf": [ - { - "$ref": "#/components/schemas/SubmitDetailsDto" - } - ] - }, - "isActive": { - "type": "boolean", - "description": "Whether form is active", - "default": true - }, - "version": { - "type": "string", - "description": "Form version" - } - }, - "required": [ - "formType", - "name", - "fields", - "submitDetails" - ] - }, - "UpdateFormDto": { - "type": "object", - "properties": { - "formType": { - "type": "string", - "description": "Form type identifier" - }, - "name": { - "type": "string", - "description": "Form name" - }, - "description": { - "type": "string", - "description": "Form description" - }, - "fields": { - "description": "Form fields", - "type": "array", - "items": { - "$ref": "#/components/schemas/FormFieldDto" - } - }, - "submitDetails": { - "description": "Submit configuration", - "allOf": [ - { - "$ref": "#/components/schemas/SubmitDetailsDto" - } - ] - }, - "isActive": { - "type": "boolean", - "description": "Whether form is active", - "default": true - }, - "version": { - "type": "string", - "description": "Form version" - } - } - }, - "ErrorResponse": { - "type": "object", - "properties": { - "statusCode": { - "type": "number", - "example": 400, - "description": "HTTP status code" - }, - "message": { - "type": "string", - "example": "Validation failed", - "description": "Error message" - }, - "error": { - "type": "string", - "example": "Bad Request", - "description": "Error type" - } - }, - "required": [ - "statusCode", - "message", - "error" - ] - }, - "SuccessBooleanResponse": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true, - "description": "Indicates whether the operation was successful" - } - }, - "required": [ - "success" - ] - }, - "SuccessMessageResponse": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "example": true, - "description": "Indicates whether the operation was successful" - }, - "message": { - "type": "string", - "example": "Operation completed successfully", - "description": "Human-readable result message" - } - }, - "required": [ - "success", - "message" - ] - }, - "ParametersDto": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "object" - ], - "description": "The type of the parameters object", - "example": "object" - }, - "properties": { - "type": "object", - "description": "Map of parameter property names to their definitions (type and description)", - "additionalProperties": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "type", - "description" - ] + }, + "required": [ + "type", + "properties" + ] }, - "example": { - "username": { - "type": "string", - "description": "The username" - } - } - }, - "required": { - "description": "List of required parameter property names", - "example": [ - "username" - ], - "type": "array", - "items": { - "type": "string" + "DeletedResponse": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean", + "example": true, + "description": "Indicates whether the resource was deleted" + } + }, + "required": [ + "deleted" + ] } - } - }, - "required": [ - "type", - "properties" - ] - }, - "DeletedResponse": { - "type": "object", - "properties": { - "deleted": { - "type": "boolean", - "example": true, - "description": "Indicates whether the resource was deleted" - } - }, - "required": [ - "deleted" - ] - } + } } - } } From b3e8e92ef408324f19ec2902e58370c9fbdbcb9d Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Thu, 5 Mar 2026 17:12:34 +0530 Subject: [PATCH 07/13] merge BYO Agent APIs and Agent Builder APIs into single APIs tab with dropdowns --- docs.json | 375 +++++++++++++++++++++++++++--------------------------- 1 file changed, 190 insertions(+), 185 deletions(-) diff --git a/docs.json b/docs.json index 16a0d11e..7201efe1 100644 --- a/docs.json +++ b/docs.json @@ -220,7 +220,7 @@ "pages": [ "fundamentals/webhooks-overview", "fundamentals/webhooks-management", - "fundamentals/webhooks-events", + "fundamentals/webhooks-events", "fundamentals/webhooks-legacy" ] }, @@ -247,11 +247,11 @@ "pages": [ "/widget/html/overview", "/widget/html/integration", - "/widget/html/advanced", + "/widget/html/advanced", { "group": " ", "pages": [ - "/widget/html/legacy" + "/widget/html/legacy" ] } ] @@ -898,7 +898,7 @@ "icon": "/images/icons/react.svg", "versions": [ { - "version": "v5\u200e", + "version": "v5‎", "groups": [ { "group": " ", @@ -985,7 +985,7 @@ ] }, { - "version": "v4\u200e", + "version": "v4‎", "groups": [ { "group": " ", @@ -1148,7 +1148,7 @@ ] }, { - "version": "v3\u200e", + "version": "v3‎", "groups": [ { "group": " ", @@ -1170,7 +1170,7 @@ ] }, { - "version": "v2\u200e", + "version": "v2‎", "groups": [ { "group": " ", @@ -1198,7 +1198,7 @@ "icon": "/images/icons/swift.svg", "versions": [ { - "version": "v5\u200e\u200e", + "version": "v5‎‎", "groups": [ { "group": " ", @@ -1303,7 +1303,7 @@ ] }, { - "version": "v4\u200e\u200e", + "version": "v4‎‎", "groups": [ { "group": " ", @@ -1467,7 +1467,7 @@ ] }, { - "version": "v3\u200e\u200e", + "version": "v3‎‎", "groups": [ { "group": " ", @@ -1489,7 +1489,7 @@ ] }, { - "version": "v2\u200e\u200e", + "version": "v2‎‎", "groups": [ { "group": " ", @@ -1517,7 +1517,7 @@ "icon": "/images/icons/android.svg", "versions": [ { - "version": "v5\u200e\u200e\u200e", + "version": "v5‎‎‎", "groups": [ { "group": " ", @@ -1620,7 +1620,7 @@ ] }, { - "version": "v4\u200e\u200e\u200e", + "version": "v4‎‎‎", "groups": [ { "group": " ", @@ -1777,7 +1777,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e", + "version": "v3‎‎‎", "groups": [ { "group": " ", @@ -1802,7 +1802,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e", + "version": "v2‎‎‎", "groups": [ { "group": " ", @@ -1831,7 +1831,7 @@ "icon": "/images/icons/flutter.svg", "versions": [ { - "version": "v5\u200e\u200e\u200e\u200e", + "version": "v5‎‎‎‎", "groups": [ { "group": " ", @@ -1938,7 +1938,7 @@ ] }, { - "version": "v4\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎", "groups": [ { "group": " ", @@ -2114,7 +2114,7 @@ "icon": "/images/icons/angular.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎", "groups": [ { "group": " ", @@ -2304,7 +2304,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎", "groups": [ { "group": " ", @@ -2325,7 +2325,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎", "groups": [ { "group": " ", @@ -2352,7 +2352,7 @@ "icon": "/images/icons/vuejs.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2445,7 +2445,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2467,7 +2467,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2499,7 +2499,7 @@ "icon": "/images/icons/js.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2632,7 +2632,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2755,7 +2755,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2858,7 +2858,7 @@ "icon": "/images/icons/react.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2974,7 +2974,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3088,7 +3088,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3190,7 +3190,7 @@ "icon": "/images/icons/swift.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3313,7 +3313,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3431,7 +3431,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3538,7 +3538,7 @@ "icon": "/images/icons/android.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3653,7 +3653,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3773,7 +3773,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3876,7 +3876,7 @@ "icon": "/images/icons/flutter.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3990,7 +3990,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -4095,7 +4095,7 @@ "icon": "/images/icons/ionic.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -4203,7 +4203,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -4313,7 +4313,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -5105,128 +5105,133 @@ ] }, { - "tab": "BYO Agent APIs", - "pages": [ - "ai-agents/byo-api-explorer", - { - "group": "Third-Party Agents", - "pages": [ - "ai-agents/apis/create-third-party-agent", - "ai-agents/apis/list-third-party-agents", - "ai-agents/apis/update-third-party-agent", - "ai-agents/apis/delete-third-party-agent" - ] - }, - { - "group": "Tools", - "pages": [ - "ai-agents/apis/list-tools", - "ai-agents/apis/get-tool", - "ai-agents/apis/create-tool", - "ai-agents/apis/update-tool", - "ai-agents/apis/delete-tool" - ] - }, - { - "group": "Integrations", - "pages": [ - "ai-agents/apis/list-integrations" - ] - } - ] - }, - { - "tab": "Agent Builder APIs", - "pages": [ - "ai-agents/api-explorer", - { - "group": "Agents", - "pages": [ - "ai-agents/apis/create-agent", - "ai-agents/apis/list-agents", - "ai-agents/apis/get-agent", - "ai-agents/apis/update-agent", - "ai-agents/apis/delete-agent", - "ai-agents/apis/search-agent-tools", - "ai-agents/apis/get-enabled-items", - "ai-agents/apis/get-available-models" - ] - }, - { - "group": "Tools", - "pages": [ - "ai-agents/apis/get-composio-tools", - "ai-agents/apis/add-tools-to-agent", - "ai-agents/apis/remove-tools-from-agent", - "ai-agents/apis/get-tool-actions-for-agent", - "ai-agents/apis/enable-tool-actions", - "ai-agents/apis/remove-tool-actions", - "ai-agents/apis/authenticate-composio-tool" - ] - }, - { - "group": "Custom API Tools", - "pages": [ - "ai-agents/apis/list-api-tools", - "ai-agents/apis/create-api-tool", - "ai-agents/apis/update-api-tool", - "ai-agents/apis/delete-api-tool", - "ai-agents/apis/add-api-tools-to-agent", - "ai-agents/apis/remove-api-tools-from-agent" - ] - }, - { - "group": "Frontend Actions", - "pages": [ - "ai-agents/apis/list-frontend-actions", - "ai-agents/apis/create-frontend-action", - "ai-agents/apis/update-frontend-action", - "ai-agents/apis/delete-frontend-action", - "ai-agents/apis/add-frontend-actions-to-agent", - "ai-agents/apis/remove-frontend-actions-from-agent" - ] - }, - { - "group": "MCP Servers", - "pages": [ - "ai-agents/apis/list-mcp-servers", - "ai-agents/apis/create-mcp-server", - "ai-agents/apis/update-mcp-server", - "ai-agents/apis/delete-mcp-server", - "ai-agents/apis/add-mcp-servers-to-agent", - "ai-agents/apis/remove-mcp-servers-from-agent" - ] - }, + "tab": "APIs", + "dropdowns": [ { - "group": "Knowledge Base", + "dropdown": "BYO Agent", "pages": [ - "ai-agents/apis/list-knowledge-base-records", - "ai-agents/apis/get-source-pages", - "ai-agents/apis/resync-knowledge-base-source", - "ai-agents/apis/initiate-file-uploads", - "ai-agents/apis/delete-uploaded-file", - "ai-agents/apis/create-text-detail", - "ai-agents/apis/update-text-detail", - "ai-agents/apis/poll-knowledge-base-status", - "ai-agents/apis/add-knowledge-base-files", - "ai-agents/apis/remove-knowledge-base-files", - "ai-agents/apis/scrape-website", - "ai-agents/apis/scrape-single-page", - "ai-agents/apis/delete-website", - "ai-agents/apis/get-discovered-urls", - "ai-agents/apis/get-sitemap-discovered-urls", - "ai-agents/apis/process-discovered-urls", - "ai-agents/apis/poll-discovered-urls-status", - "ai-agents/apis/sync-discovered-urls" + "ai-agents/byo-api-explorer", + { + "group": "Third-Party Agents", + "pages": [ + "ai-agents/apis/create-third-party-agent", + "ai-agents/apis/list-third-party-agents", + "ai-agents/apis/update-third-party-agent", + "ai-agents/apis/delete-third-party-agent" + ] + }, + { + "group": "Tools", + "pages": [ + "ai-agents/apis/list-tools", + "ai-agents/apis/get-tool", + "ai-agents/apis/create-tool", + "ai-agents/apis/update-tool", + "ai-agents/apis/delete-tool" + ] + }, + { + "group": "Integrations", + "pages": [ + "ai-agents/apis/list-integrations" + ] + } ] }, { - "group": "Variables", + "dropdown": "Agent Builder", "pages": [ - "ai-agents/apis/get-all-available-variables", - "ai-agents/apis/create-custom-variable", - "ai-agents/apis/update-custom-variable", - "ai-agents/apis/delete-custom-variable" + "ai-agents/api-explorer", + { + "group": "Agents", + "pages": [ + "ai-agents/apis/create-agent", + "ai-agents/apis/list-agents", + "ai-agents/apis/get-agent", + "ai-agents/apis/update-agent", + "ai-agents/apis/delete-agent", + "ai-agents/apis/search-agent-tools", + "ai-agents/apis/get-enabled-items", + "ai-agents/apis/get-available-models" + ] + }, + { + "group": "Tools", + "pages": [ + "ai-agents/apis/get-composio-tools", + "ai-agents/apis/add-tools-to-agent", + "ai-agents/apis/remove-tools-from-agent", + "ai-agents/apis/get-tool-actions-for-agent", + "ai-agents/apis/enable-tool-actions", + "ai-agents/apis/remove-tool-actions", + "ai-agents/apis/authenticate-composio-tool" + ] + }, + { + "group": "Custom API Tools", + "pages": [ + "ai-agents/apis/list-api-tools", + "ai-agents/apis/create-api-tool", + "ai-agents/apis/update-api-tool", + "ai-agents/apis/delete-api-tool", + "ai-agents/apis/add-api-tools-to-agent", + "ai-agents/apis/remove-api-tools-from-agent" + ] + }, + { + "group": "Frontend Actions", + "pages": [ + "ai-agents/apis/list-frontend-actions", + "ai-agents/apis/create-frontend-action", + "ai-agents/apis/update-frontend-action", + "ai-agents/apis/delete-frontend-action", + "ai-agents/apis/add-frontend-actions-to-agent", + "ai-agents/apis/remove-frontend-actions-from-agent" + ] + }, + { + "group": "MCP Servers", + "pages": [ + "ai-agents/apis/list-mcp-servers", + "ai-agents/apis/create-mcp-server", + "ai-agents/apis/update-mcp-server", + "ai-agents/apis/delete-mcp-server", + "ai-agents/apis/add-mcp-servers-to-agent", + "ai-agents/apis/remove-mcp-servers-from-agent" + ] + }, + { + "group": "Knowledge Base", + "pages": [ + "ai-agents/apis/list-knowledge-base-records", + "ai-agents/apis/get-source-pages", + "ai-agents/apis/resync-knowledge-base-source", + "ai-agents/apis/initiate-file-uploads", + "ai-agents/apis/delete-uploaded-file", + "ai-agents/apis/create-text-detail", + "ai-agents/apis/update-text-detail", + "ai-agents/apis/poll-knowledge-base-status", + "ai-agents/apis/add-knowledge-base-files", + "ai-agents/apis/remove-knowledge-base-files", + "ai-agents/apis/scrape-website", + "ai-agents/apis/scrape-single-page", + "ai-agents/apis/delete-website", + "ai-agents/apis/get-discovered-urls", + "ai-agents/apis/get-sitemap-discovered-urls", + "ai-agents/apis/process-discovered-urls", + "ai-agents/apis/poll-discovered-urls-status", + "ai-agents/apis/sync-discovered-urls" + ] + }, + { + "group": "Variables", + "pages": [ + "ai-agents/apis/get-all-available-variables", + "ai-agents/apis/create-custom-variable", + "ai-agents/apis/update-custom-variable", + "ai-agents/apis/delete-custom-variable" + ] + } ] } ] @@ -5292,7 +5297,7 @@ "notifications/ios-apns-push-notifications", "notifications/ios-fcm-push-notifications", "notifications/flutter-push-notifications-android", - "notifications/flutter-push-notifications-ios", + "notifications/flutter-push-notifications-ios", "notifications/react-native-push-notifications-android", "notifications/react-native-push-notifications-ios", "notifications/web-push-notifications" @@ -6028,62 +6033,62 @@ { "source": "/notifications/push-notification-extension-overview", "destination": "/notifications/push-notification-extension-legacy" - }, + }, { "source": "/notifications/push-notification-extension-legacy", "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/web-push-notifications-legacy", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/web-push-notifications-legacy", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/android-push-notifications-legacy", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/android-push-notifications-legacy", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/android-connection-service", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/android-connection-service", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/ios-fcm-push-notifications-legacy", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/ios-fcm-push-notifications-legacy", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/ios-apns-push-notifications-legacy", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/ios-apns-push-notifications-legacy", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/flutter-push-notifications", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/flutter-push-notifications", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/react-native-push-notifications-legacy", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/react-native-push-notifications-legacy", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/capacitor-cordova-ionic-push-notifications", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/capacitor-cordova-ionic-push-notifications", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/mute-functionality", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/mute-functionality", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/token-management", - "destination": "/notifications/push-notifications-extension-legacy" + "source": "/notifications/token-management", + "destination": "/notifications/push-notifications-extension-legacy" }, { - "source": "/notifications/email-notification-extension", - "destination": "/notifications/email-notifications-extension-legacy" + "source": "/notifications/email-notification-extension", + "destination": "/notifications/email-notifications-extension-legacy" }, { - "source": "/notifications/sms-notification-extension", - "destination": "/notifications/sms-notifications-extension-legacy" + "source": "/notifications/sms-notification-extension", + "destination": "/notifications/sms-notifications-extension-legacy" }, { - "source": "/notifications/react-native-push-notifications", - "destination": "/notifications/react-native-push-notifications-android" + "source": "/notifications/react-native-push-notifications", + "destination": "/notifications/react-native-push-notifications-android" } ], "integrations": { @@ -6096,7 +6101,7 @@ "metatags": { "charset": "UTF-8", "viewport": "width=device-width, initial-scale=1.0", - "description": "Learn how to integrate, customize, and scale real-time chat using CometChat\u2019s UI Kits, SDKs, and widgets across popular frameworks. Get step-by-step guides, best practices, and implementation details to build production-ready chat experiences.", + "description": "Learn how to integrate, customize, and scale real-time chat using CometChat’s UI Kits, SDKs, and widgets across popular frameworks. Get step-by-step guides, best practices, and implementation details to build production-ready chat experiences.", "language": "en" } }, From b544dbac7d4b99aec2d35e8d8c4977c2a0a2fbdf Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Thu, 5 Mar 2026 17:25:11 +0530 Subject: [PATCH 08/13] add icons to API dropdown sections to fix empty square --- docs.json | 82 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/docs.json b/docs.json index 7201efe1..e59e9e06 100644 --- a/docs.json +++ b/docs.json @@ -898,7 +898,7 @@ "icon": "/images/icons/react.svg", "versions": [ { - "version": "v5‎", + "version": "v5\u200e", "groups": [ { "group": " ", @@ -985,7 +985,7 @@ ] }, { - "version": "v4‎", + "version": "v4\u200e", "groups": [ { "group": " ", @@ -1148,7 +1148,7 @@ ] }, { - "version": "v3‎", + "version": "v3\u200e", "groups": [ { "group": " ", @@ -1170,7 +1170,7 @@ ] }, { - "version": "v2‎", + "version": "v2\u200e", "groups": [ { "group": " ", @@ -1198,7 +1198,7 @@ "icon": "/images/icons/swift.svg", "versions": [ { - "version": "v5‎‎", + "version": "v5\u200e\u200e", "groups": [ { "group": " ", @@ -1303,7 +1303,7 @@ ] }, { - "version": "v4‎‎", + "version": "v4\u200e\u200e", "groups": [ { "group": " ", @@ -1467,7 +1467,7 @@ ] }, { - "version": "v3‎‎", + "version": "v3\u200e\u200e", "groups": [ { "group": " ", @@ -1489,7 +1489,7 @@ ] }, { - "version": "v2‎‎", + "version": "v2\u200e\u200e", "groups": [ { "group": " ", @@ -1517,7 +1517,7 @@ "icon": "/images/icons/android.svg", "versions": [ { - "version": "v5‎‎‎", + "version": "v5\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -1620,7 +1620,7 @@ ] }, { - "version": "v4‎‎‎", + "version": "v4\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -1777,7 +1777,7 @@ ] }, { - "version": "v3‎‎‎", + "version": "v3\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -1802,7 +1802,7 @@ ] }, { - "version": "v2‎‎‎", + "version": "v2\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -1831,7 +1831,7 @@ "icon": "/images/icons/flutter.svg", "versions": [ { - "version": "v5‎‎‎‎", + "version": "v5\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -1938,7 +1938,7 @@ ] }, { - "version": "v4‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2114,7 +2114,7 @@ "icon": "/images/icons/angular.svg", "versions": [ { - "version": "v4‎‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2304,7 +2304,7 @@ ] }, { - "version": "v3‎‎‎‎‎", + "version": "v3\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2325,7 +2325,7 @@ ] }, { - "version": "v2‎‎‎‎‎", + "version": "v2\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2352,7 +2352,7 @@ "icon": "/images/icons/vuejs.svg", "versions": [ { - "version": "v4‎‎‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2445,7 +2445,7 @@ ] }, { - "version": "v3‎‎‎‎‎‎", + "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2467,7 +2467,7 @@ ] }, { - "version": "v2‎‎‎‎‎‎", + "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2499,7 +2499,7 @@ "icon": "/images/icons/js.svg", "versions": [ { - "version": "v4‎‎‎‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2632,7 +2632,7 @@ ] }, { - "version": "v3‎‎‎‎‎‎‎", + "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2755,7 +2755,7 @@ ] }, { - "version": "v2‎‎‎‎‎‎‎", + "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2858,7 +2858,7 @@ "icon": "/images/icons/react.svg", "versions": [ { - "version": "v4‎‎‎‎‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -2974,7 +2974,7 @@ ] }, { - "version": "v3‎‎‎‎‎‎‎‎", + "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3088,7 +3088,7 @@ ] }, { - "version": "v2‎‎‎‎‎‎‎‎", + "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3190,7 +3190,7 @@ "icon": "/images/icons/swift.svg", "versions": [ { - "version": "v4‎‎‎‎‎‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3313,7 +3313,7 @@ ] }, { - "version": "v3‎‎‎‎‎‎‎‎‎", + "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3431,7 +3431,7 @@ ] }, { - "version": "v2‎‎‎‎‎‎‎‎‎", + "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3538,7 +3538,7 @@ "icon": "/images/icons/android.svg", "versions": [ { - "version": "v4‎‎‎‎‎‎‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3653,7 +3653,7 @@ ] }, { - "version": "v3‎‎‎‎‎‎‎‎‎‎", + "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3773,7 +3773,7 @@ ] }, { - "version": "v2‎‎‎‎‎‎‎‎‎‎", + "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3876,7 +3876,7 @@ "icon": "/images/icons/flutter.svg", "versions": [ { - "version": "v4‎‎‎‎‎‎‎‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -3990,7 +3990,7 @@ ] }, { - "version": "v3‎‎‎‎‎‎‎‎‎‎‎", + "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -4095,7 +4095,7 @@ "icon": "/images/icons/ionic.svg", "versions": [ { - "version": "v4‎‎‎‎‎‎‎‎‎‎‎‎", + "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -4203,7 +4203,7 @@ ] }, { - "version": "v3‎‎‎‎‎‎‎‎‎‎‎‎", + "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -4313,7 +4313,7 @@ ] }, { - "version": "v2‎‎‎‎‎‎‎‎‎‎‎‎", + "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", "groups": [ { "group": " ", @@ -5136,7 +5136,8 @@ "ai-agents/apis/list-integrations" ] } - ] + ], + "icon": "plug" }, { "dropdown": "Agent Builder", @@ -5232,7 +5233,8 @@ "ai-agents/apis/delete-custom-variable" ] } - ] + ], + "icon": "robot" } ] } @@ -6101,7 +6103,7 @@ "metatags": { "charset": "UTF-8", "viewport": "width=device-width, initial-scale=1.0", - "description": "Learn how to integrate, customize, and scale real-time chat using CometChat’s UI Kits, SDKs, and widgets across popular frameworks. Get step-by-step guides, best practices, and implementation details to build production-ready chat experiences.", + "description": "Learn how to integrate, customize, and scale real-time chat using CometChat\u2019s UI Kits, SDKs, and widgets across popular frameworks. Get step-by-step guides, best practices, and implementation details to build production-ready chat experiences.", "language": "en" } }, From bb3255910d1e9fdb04c409dc7ae7a3559a4e5db2 Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Thu, 5 Mar 2026 17:58:28 +0530 Subject: [PATCH 09/13] enrich API descriptions with use-case context and markdown formatting to match moderation style --- ai-agent-service.json | 248 +++++++++++++++++++++--------------------- 1 file changed, 124 insertions(+), 124 deletions(-) diff --git a/ai-agent-service.json b/ai-agent-service.json index ea17dd4a..e0cd122a 100644 --- a/ai-agent-service.json +++ b/ai-agent-service.json @@ -143,8 +143,8 @@ "tags": [ "Agents" ], - "description": "Create a new third-party agent that delegates to an external AI framework. All referenced tools and actions are validated before the agent is created.", - "summary": "Create a new third-party integration agent" + "description": "Creates a new third-party agent that delegates conversations to an external AI framework. Use this endpoint to register a BYO (Bring Your Own) agent powered by frameworks like Mastra, CrewAI, or LangGraph.\n\n**Validation:** All referenced tools and actions are validated before the agent is created.", + "summary": "Create Third-Party Agent" }, "get": { "operationId": "AgentsController_getAgents", @@ -257,8 +257,8 @@ "tags": [ "Agents" ], - "description": "Update an existing third-party agent by its UID. Referenced tools and actions are validated if provided.", - "summary": "Update a third-party integration agent" + "description": "Updates an existing third-party agent by its UID. Use this endpoint to modify agent configuration, update referenced tools, or change the connected AI framework.\n\n**Validation:** Referenced tools and actions are validated if provided.", + "summary": "Update Third-Party Agent" }, "delete": { "operationId": "AgentsController_deleteAgent", @@ -332,8 +332,8 @@ "tags": [ "Agents" ], - "description": "Delete a third-party agent by its UID.", - "summary": "Delete a third-party integration agent" + "description": "Deletes a third-party agent by its UID. Use this endpoint to remove a BYO agent that is no longer needed.", + "summary": "Delete Third-Party Agent" } }, "/ai-agents/tools": { @@ -463,8 +463,8 @@ "tags": [ "Tools" ], - "description": "Create a new tool or action for the application. The tool name must be unique per application. The type is automatically assigned based on the doNotExecute flag: set to \"tool\" when true, \"action\" otherwise.", - "summary": "Create a new tool" + "description": "Creates a new tool or action for the application. Use this endpoint to define custom tools that agents can invoke during conversations.\n\n**Naming:** The tool name must be unique per application.\n\n**Type assignment:** The type is automatically determined by the `doNotExecute` flag — set to `tool` when true, `action` otherwise.", + "summary": "Create Tool" }, "get": { "operationId": "ToolsController_getAllTools", @@ -589,8 +589,8 @@ "tags": [ "Tools" ], - "description": "Retrieve all tools for the application. Optionally filter by type (\"action\" or \"tool\") using the type query parameter.", - "summary": "List all tools" + "description": "Retrieves all tools configured for your CometChat app. Use this endpoint to view available tools and actions, or filter by type.\n\n**Filtering:** Use the `type` query parameter to filter by `action` or `tool`.", + "summary": "List Tools" } }, "/ai-agents/tools/{name}": { @@ -729,8 +729,8 @@ "tags": [ "Tools" ], - "description": "Retrieve a specific tool by its unique name. Returns 404 if no tool with the given name exists.", - "summary": "Get a tool by name" + "description": "Retrieves a specific tool by its unique name. Use this endpoint to inspect a tool's configuration, parameters, and description.", + "summary": "Get Tool" }, "put": { "operationId": "ToolsController_updateTool", @@ -877,8 +877,8 @@ "tags": [ "Tools" ], - "description": "Update an existing tool by its unique name. The tool name cannot be changed after creation. The update is merged with existing tool data for the nested tool object (name, description, parameters). Returns 404 if no tool with the given name exists.", - "summary": "Update a tool by name" + "description": "Updates an existing tool by its unique name. Use this endpoint to modify a tool's description, parameters, or behavior.\n\n**Restrictions:** The tool name cannot be changed after creation. The update is merged with existing tool data for the nested tool object (name, description, parameters).", + "summary": "Update Tool" }, "delete": { "operationId": "ToolsController_deleteTool", @@ -952,8 +952,8 @@ "tags": [ "Tools" ], - "description": "Delete a tool by its unique name. Returns 404 if no tool with the given name exists.", - "summary": "Delete a tool by name" + "description": "Deletes a tool by its unique name. Use this endpoint to remove a tool that is no longer needed.", + "summary": "Delete Tool" } }, "/ai-agents/integrations": { @@ -1020,8 +1020,8 @@ "tags": [ "Integrations" ], - "description": "Register a new AI framework integration (e.g., OpenAI, CrewAI, LangGraph).", - "summary": "Create a new AI framework integration" + "description": "Registers a new AI framework integration. Use this endpoint to add support for frameworks like OpenAI, CrewAI, or LangGraph.\n\n**Framework examples:** OpenAI, CrewAI, LangGraph, Mastra, AG2, Agno.", + "summary": "Create Integration" }, "get": { "operationId": "IntegrationsController_getIntegrations", @@ -1139,8 +1139,8 @@ "tags": [ "Integrations" ], - "description": "Retrieve a list of available AI framework integrations, optionally filtered by type and active status. Results include populated tag objects. When an appid header is provided, results are scoped to integrations available for that app.", - "summary": "List available AI framework integrations" + "description": "Retrieves all available AI framework integrations. Use this endpoint to discover which frameworks are supported and their current status.\n\n**Filtering:** Optionally filter by `type` and `active` status. Results include populated tag objects.", + "summary": "List Integrations" } }, "/ai-agents/agent-builder/agents/available-models": { @@ -1205,11 +1205,11 @@ "apiKey": [] } ], - "summary": "Get available models", + "summary": "List Available Models", "tags": [ "Agent Builder" ], - "description": "Retrieve the list of AI models available for agents. Each model includes its provider, configuration settings, and whether it is the default. The default model is used when no model is explicitly specified during agent creation." + "description": "Retrieves the list of AI models available for agents. Use this endpoint to discover supported models before creating or updating an agent.\n\n**Model details:** Each model includes its provider, configuration settings, and whether it is the default. The default model is used when no model is explicitly specified during agent creation." } }, "/ai-agents/agent-builder/agents/variables/all": { @@ -1309,11 +1309,11 @@ "apiKey": [] } ], - "summary": "Get all available variables for an app", + "summary": "List All Variables", "tags": [ "Agent Builder" ], - "description": "Retrieve all enabled variables (predefined and custom) for the application. Each variable includes usage information showing which agents reference it in their instructions and which API tools use it. Set groupByCategory to true to group results by category (e.g., auth, custom); otherwise results are returned as a flat array." + "description": "Retrieves all enabled variables (predefined and custom) for the application. Use this endpoint to view variable definitions and understand where they are used.\n\n**Usage tracking:** Each variable includes information showing which agents reference it in their instructions and which API tools use it.\n\n**Grouping:** Set `groupByCategory` to `true` to group results by category (e.g., auth, custom); otherwise results are returned as a flat array." } }, "/ai-agents/agent-builder/agents/{agentId}/tools/search": { @@ -1418,11 +1418,11 @@ "apiKey": [] } ], - "summary": "Search across ready to use tool actions, api tools and mcp for an agent", + "summary": "Search Agent Tools", "tags": [ "Agent Builder" ], - "description": "Search across all tool types available for an agent, including ready-to-use tool actions, API tools, and MCP servers. Results are aggregated into a single array. Use the key parameter to filter by name, description, or slug, and the slug parameter to filter by a specific integration." + "description": "Searches across all tool types available for an agent, including ready-to-use tool actions, API tools, and MCP servers. Use this endpoint to find specific tools across all categories.\n\n**Filtering:** Use the `key` parameter to filter by name, description, or slug, and the `slug` parameter to filter by a specific integration." } }, "/ai-agents/agent-builder/agents/{agentUid}/enabled-items": { @@ -1707,11 +1707,11 @@ "apiKey": [] } ], - "summary": "Get enabled items (tools, frontend actions, API tools, MCP servers) for an agent", + "summary": "Get Enabled Items", "tags": [ "Agent Builder" ], - "description": "Retrieve all enabled items for a specific agent, categorized by type: tools (with their actions), frontend actions, API tools, and MCP servers. Each category can be individually toggled via query parameters. Use the key parameter to filter results by name or description across all categories. Returns 404 if the agent does not exist." + "description": "Retrieves all enabled items for a specific agent, organized by type. Use this endpoint to audit which tools, actions, and servers are active for an agent.\n\n**Categories:** Tools (with their actions), frontend actions, API tools, and MCP servers. Each category can be individually toggled via query parameters.\n\n**Filtering:** Use the `key` parameter to filter results by name or description across all categories." } }, "/ai-agents/agent-builder/agents": { @@ -1899,11 +1899,11 @@ "apiKey": [] } ], - "summary": "Create a new agent", + "summary": "Create Agent", "tags": [ "Agent Builder" ], - "description": "Create a new agent with optional tools, API tools, MCP servers, and frontend actions. All referenced tools, API tools, and MCP servers are validated before creation. The default AI model is assigned if none is specified." + "description": "Creates a new agent with optional tools, API tools, MCP servers, and frontend actions. Use this endpoint to set up a fully configured agent in a single request.\n\n**Validation:** All referenced tools, API tools, and MCP servers are validated before creation.\n\n**Default model:** The default AI model is assigned if none is specified." }, "get": { "operationId": "AgentBuilderController_findAll", @@ -2150,11 +2150,11 @@ "apiKey": [] } ], - "summary": "Get all agents for an app", + "summary": "List Agents", "tags": [ "Agent Builder" ], - "description": "Retrieve a paginated list of agents for the application. Supports cursor-based pagination using createdAt timestamps with prepend/append navigation. Use the search parameter to filter agents by name, description, or UID. Results are sorted by creation date in descending order." + "description": "Retrieves a paginated list of agents for your CometChat app. Use this endpoint to browse, search, and manage your agents.\n\n**Pagination:** Supports cursor-based pagination using `createdAt` timestamps with prepend/append navigation. Results are sorted by creation date in descending order.\n\n**Search:** Use the `search` parameter to filter agents by name, description, or UID." } }, "/ai-agents/agent-builder/agents/{id}": { @@ -2337,11 +2337,11 @@ "apiKey": [] } ], - "summary": "Get an agent by UID", + "summary": "Get Agent", "tags": [ "Agent Builder" ], - "description": "Retrieve a specific agent by its unique identifier. Returns 404 if no agent with the given UID exists." + "description": "Retrieves a specific agent by its unique identifier. Use this endpoint to inspect an agent's full configuration, including its tools, model, and instructions." }, "patch": { "operationId": "AgentBuilderController_update", @@ -2423,11 +2423,11 @@ "apiKey": [] } ], - "summary": "Update an agent by UID", + "summary": "Update Agent", "tags": [ "Agent Builder" ], - "description": "Update an existing agent by its UID. Referenced tools, API tools, and MCP servers are validated if provided." + "description": "Updates an existing agent by its UID. Use this endpoint to modify an agent's configuration, instructions, model, or connected tools.\n\n**Validation:** Referenced tools, API tools, and MCP servers are validated if provided." }, "delete": { "operationId": "AgentBuilderController_remove", @@ -2489,11 +2489,11 @@ "apiKey": [] } ], - "summary": "Delete an agent by UID", + "summary": "Delete Agent", "tags": [ "Agent Builder" ], - "description": "Delete an agent by its UID." + "description": "Deletes an agent by its UID. Use this endpoint to remove an agent that is no longer needed." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/add": { @@ -2705,11 +2705,11 @@ "apiKey": [] } ], - "summary": "Add tools to an agent", + "summary": "Add Tools to Agent", "tags": [ "Agent Builder" ], - "description": "Add one or more tools to a specific agent. The tools array in the request body contains tool slug identifiers. Returns the updated agent object." + "description": "Adds one or more tools to a specific agent. Use this endpoint to extend an agent's capabilities with additional tool integrations.\n\n**Request body:** The `tools` array contains tool slug identifiers. Returns the updated agent object." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/remove": { @@ -2921,11 +2921,11 @@ "apiKey": [] } ], - "summary": "Remove tools from an agent", + "summary": "Remove Tools from Agent", "tags": [ "Agent Builder" ], - "description": "Remove one or more tools from a specific agent. The tools array in the request body contains tool slug identifiers to remove. Returns the updated agent object." + "description": "Removes one or more tools from a specific agent. Use this endpoint to revoke tool access from an agent.\n\n**Request body:** The `tools` array contains tool slug identifiers to remove. Returns the updated agent object." } }, "/ai-agents/agent-builder/agents/{agentUid}/mcp/add": { @@ -3137,11 +3137,11 @@ "apiKey": [] } ], - "summary": "Add MCP servers to an agent", + "summary": "Add MCP Servers to Agent", "tags": [ "Agent Builder" ], - "description": "Add one or more MCP servers to a specific agent. The mcps array in the request body contains MCP server slug identifiers. Returns the updated agent object." + "description": "Adds one or more MCP servers to a specific agent. Use this endpoint to connect an agent to additional Model Context Protocol servers.\n\n**Request body:** The `mcps` array contains MCP server slug identifiers. Returns the updated agent object." } }, "/ai-agents/agent-builder/agents/{agentUid}/mcp/remove": { @@ -3353,11 +3353,11 @@ "apiKey": [] } ], - "summary": "Remove MCP servers from an agent", + "summary": "Remove MCP Servers from Agent", "tags": [ "Agent Builder" ], - "description": "Remove one or more MCP servers from a specific agent. The mcps array in the request body contains MCP server slug identifiers to remove. Returns the updated agent object." + "description": "Removes one or more MCP servers from a specific agent. Use this endpoint to disconnect MCP servers from an agent.\n\n**Request body:** The `mcps` array contains MCP server slug identifiers to remove. Returns the updated agent object." } }, "/ai-agents/agent-builder/agents/{agentUid}/api-tools/add": { @@ -3569,11 +3569,11 @@ "apiKey": [] } ], - "summary": "Add API tools to an agent", + "summary": "Add API Tools to Agent", "tags": [ "Agent Builder" ], - "description": "Add one or more API tools to a specific agent. The apiTools array in the request body contains API tool slug identifiers. Returns the updated agent object." + "description": "Adds one or more API tools to a specific agent. Use this endpoint to give an agent access to custom API tool integrations.\n\n**Request body:** The `apiTools` array contains API tool slug identifiers. Returns the updated agent object." } }, "/ai-agents/agent-builder/agents/{agentUid}/api-tools/remove": { @@ -3785,11 +3785,11 @@ "apiKey": [] } ], - "summary": "Remove API tools from an agent", + "summary": "Remove API Tools from Agent", "tags": [ "Agent Builder" ], - "description": "Remove one or more API tools from a specific agent. The apiTools array in the request body contains API tool slug identifiers to remove. Returns the updated agent object." + "description": "Removes one or more API tools from a specific agent. Use this endpoint to revoke API tool access from an agent.\n\n**Request body:** The `apiTools` array contains API tool slug identifiers to remove. Returns the updated agent object." } }, "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/add": { @@ -4001,11 +4001,11 @@ "apiKey": [] } ], - "summary": "Add frontend actions to an agent", + "summary": "Add Frontend Actions to Agent", "tags": [ "Agent Builder" ], - "description": "Add one or more frontend actions to a specific agent. Frontend actions allow agents to trigger client-side UI operations. The frontendActions array in the request body contains frontend action identifiers. Returns the updated agent object." + "description": "Adds one or more frontend actions to a specific agent. Use this endpoint to enable an agent to trigger client-side UI operations.\n\n**Frontend actions** allow agents to interact with the user interface, such as opening dialogs, navigating pages, or updating UI state.\n\n**Request body:** The `frontendActions` array contains frontend action identifiers. Returns the updated agent object." } }, "/ai-agents/agent-builder/agents/{agentUid}/frontend-actions/remove": { @@ -4217,11 +4217,11 @@ "apiKey": [] } ], - "summary": "Remove frontend actions from an agent", + "summary": "Remove Frontend Actions from Agent", "tags": [ "Agent Builder" ], - "description": "Remove one or more frontend actions from a specific agent. The frontendActions array in the request body contains frontend action identifiers to remove. Returns the updated agent object." + "description": "Removes one or more frontend actions from a specific agent. Use this endpoint to revoke frontend action capabilities from an agent.\n\n**Request body:** The `frontendActions` array contains frontend action identifiers to remove. Returns the updated agent object." } }, "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/add": { @@ -4530,11 +4530,11 @@ "apiKey": [] } ], - "summary": "Get all custom variables for the app", + "summary": "List Custom Variables", "tags": [ "Agent Builder" ], - "description": "Retrieve all custom variables defined for the application. Custom variables allow dynamic value injection into agent instructions using metadata from messages, users, or constant values. Each variable includes its source type, resolution path, and default value." + "description": "Retrieves all custom variables defined for the application. Use this endpoint to view and manage dynamic variables used in agent instructions.\n\n**Variable types:** Custom variables can source values from message metadata, user metadata, or constant values. Each variable includes its source type, resolution path, and default value." }, "post": { "operationId": "AgentBuilderController_createCustomVariable", @@ -4650,11 +4650,11 @@ "apiKey": [] } ], - "summary": "Create a new custom variable", + "summary": "Create Custom Variable", "tags": [ "Agent Builder" ], - "description": "Create a new custom variable for the application. Custom variables can source their values from message metadata, user metadata, or a constant value. Variable names must be unique within the app and follow the pattern [a-zA-Z][a-zA-Z0-9_.]*." + "description": "Creates a new custom variable for the application. Use this endpoint to define dynamic values that can be injected into agent instructions.\n\n**Source types:** Variables can source values from message metadata, user metadata, or a constant value.\n\n**Naming:** Variable names must be unique within the app and follow the pattern `[a-zA-Z][a-zA-Z0-9_.]*`." } }, "/ai-agents/agent-builder/agents/variables/custom/{variableId}": { @@ -4792,11 +4792,11 @@ "apiKey": [] } ], - "summary": "Update a custom variable", + "summary": "Update Custom Variable", "tags": [ "Agent Builder" ], - "description": "Update an existing custom variable by its ID. Only the provided fields are updated; omitted fields remain unchanged. The variable name cannot be changed after creation." + "description": "Updates an existing custom variable by its ID. Use this endpoint to modify a variable's source, default value, or other properties.\n\n**Partial updates:** Only the provided fields are updated; omitted fields remain unchanged.\n\n**Restrictions:** The variable name cannot be changed after creation." }, "delete": { "operationId": "AgentBuilderController_deleteCustomVariable", @@ -4858,11 +4858,11 @@ "apiKey": [] } ], - "summary": "Delete a custom variable", + "summary": "Delete Custom Variable", "tags": [ "Agent Builder" ], - "description": "Delete a custom variable by its ID. Any agent instructions referencing this variable will no longer resolve its value." + "description": "Deletes a custom variable by its ID. Use this endpoint to remove variables that are no longer needed.\n\n**Impact:** Any agent instructions referencing this variable will no longer resolve its value." } }, "/ai-agents/agent-builder/api-tools": { @@ -5084,11 +5084,11 @@ "apiKey": [] } ], - "summary": "Get all api-tools for an app", + "summary": "List API Tools", "tags": [ "Agent Builder API Tools" ], - "description": "Retrieve a paginated list of API tools for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page." + "description": "Retrieves a paginated list of API tools for the application. Use this endpoint to browse and manage custom API tool configurations.\n\n**Pagination:** Supports cursor-based pagination using the `affix` and `createdAt` query parameters. Use `affix=append` with a `createdAt` timestamp to fetch the next page, or `affix=prepend` for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page." }, "post": { "operationId": "ApiToolsController_createApiTool", @@ -5258,8 +5258,8 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Create a new API tool for the application. The slug must be unique per application. A tool object is automatically generated from the provided parameters, description, and slug.", - "summary": "Create a new API tool" + "description": "Creates a new API tool configuration for the application. Use this endpoint to define a custom API endpoint that agents can call during conversations.\n\n**Uniqueness:** The slug must be unique per application.\n\n**Auto-generation:** A tool object is automatically generated from the provided parameters, description, and slug.", + "summary": "Create API Tool" } }, "/ai-agents/agent-builder/api-tools/{slug}": { @@ -5440,8 +5440,8 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Retrieve a specific API tool by its unique slug. Returns 404 if no API tool with the given slug exists.", - "summary": "Get an API tool by slug" + "description": "Retrieves a specific API tool by its unique slug. Use this endpoint to inspect an API tool's configuration, parameters, and connected agents.", + "summary": "Get API Tool" }, "patch": { "operationId": "ApiToolsController_updateApiTool", @@ -5630,8 +5630,8 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Update an existing API tool by its unique slug. The tool object is automatically regenerated from the updated parameters and description. Returns 404 if no API tool with the given slug exists.", - "summary": "Update an API tool by slug" + "description": "Updates an existing API tool by its unique slug. Use this endpoint to modify an API tool's parameters, description, or endpoint configuration.\n\n**Auto-regeneration:** The tool object is automatically regenerated from the updated parameters and description.", + "summary": "Update API Tool" }, "delete": { "operationId": "ApiToolsController_deleteApiTool", @@ -5705,8 +5705,8 @@ "tags": [ "Agent Builder API Tools" ], - "description": "Delete an API tool by its unique slug. Returns 404 if no API tool with the given slug exists.", - "summary": "Delete an API tool by slug" + "description": "Deletes an API tool by its unique slug. Use this endpoint to remove an API tool configuration that is no longer needed.", + "summary": "Delete API Tool" } }, "/ai-agents/agent-builder/mcp-servers": { @@ -5811,8 +5811,8 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Create a new MCP server configuration for the application. The slug must be unique per application.", - "summary": "Create a new MCP server" + "description": "Creates a new MCP (Model Context Protocol) server configuration for the application. Use this endpoint to register an MCP server that agents can connect to.\n\n**Uniqueness:** The slug must be unique per application.", + "summary": "Create MCP Server" }, "get": { "operationId": "McpServersController_getAllMcpServers", @@ -5968,8 +5968,8 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Retrieve a paginated list of MCP servers for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page.", - "summary": "Get all MCP servers for an app" + "description": "Retrieves a paginated list of MCP servers for the application. Use this endpoint to browse and manage MCP server configurations.\n\n**Pagination:** Supports cursor-based pagination using the `affix` and `createdAt` query parameters. Use `affix=append` with a `createdAt` timestamp to fetch the next page, or `affix=prepend` for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page.", + "summary": "List MCP Servers" } }, "/ai-agents/agent-builder/mcp-servers/{slug}": { @@ -6083,8 +6083,8 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Retrieve a specific MCP server by its unique slug. Returns 404 if no MCP server with the given slug exists.", - "summary": "Get an MCP server by slug" + "description": "Retrieves a specific MCP server by its unique slug. Use this endpoint to inspect an MCP server's configuration and connected agents.", + "summary": "Get MCP Server" }, "patch": { "operationId": "McpServersController_updateMcpServer", @@ -6206,8 +6206,8 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Update an existing MCP server by its unique slug. Returns 404 if no MCP server with the given slug exists.", - "summary": "Update an MCP server by slug" + "description": "Updates an existing MCP server by its unique slug. Use this endpoint to modify an MCP server's configuration or connection details.", + "summary": "Update MCP Server" }, "delete": { "operationId": "McpServersController_deleteMcpServer", @@ -6281,8 +6281,8 @@ "tags": [ "Agent Builder MCP Servers" ], - "description": "Delete an MCP server by its unique slug. Returns 404 if no MCP server with the given slug exists.", - "summary": "Delete an MCP server by slug" + "description": "Deletes an MCP server by its unique slug. Use this endpoint to remove an MCP server configuration that is no longer needed.", + "summary": "Delete MCP Server" } }, "/ai-agents/agent-builder/tools/agent/{agentUid}": { @@ -6450,11 +6450,11 @@ "apiKey": [] } ], - "summary": "Get Ready To Use Tools", + "summary": "List Tool Integrations", "tags": [ "Agent Builder Ready to Use Tools" ], - "description": "Retrieve a paginated list of ready-to-use tool integrations available for the specified agent. Each tool includes its slug, name, icon, description, available actions, and authentication status. Supports cursor-based pagination using the affix and createdAt query parameters. Optionally filter by slug or search by tool name." + "description": "Retrieves a paginated list of ready-to-use tool integrations available for the specified agent. Use this endpoint to discover and browse pre-built tool integrations.\n\n**Tool details:** Each tool includes its slug, name, icon, description, available actions, and authentication status.\n\n**Pagination:** Supports cursor-based pagination using the `affix` and `createdAt` query parameters. Optionally filter by slug or search by tool name." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions": { @@ -6738,11 +6738,11 @@ "apiKey": [] } ], - "summary": "Get all frontend actions for an app", + "summary": "List Frontend Actions", "tags": [ "Agent Builder Frontend Actions" ], - "description": "Retrieve a paginated list of frontend actions for the application. Supports cursor-based pagination using the affix and createdAt query parameters. Use affix=append with a createdAt timestamp to fetch the next page, or affix=prepend for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page." + "description": "Retrieves a paginated list of frontend actions for the application. Use this endpoint to browse and manage frontend action configurations.\n\n**Pagination:** Supports cursor-based pagination using the `affix` and `createdAt` query parameters. Use `affix=append` with a `createdAt` timestamp to fetch the next page, or `affix=prepend` for the previous page. Results are sorted by creation date in descending order with a maximum of 10 items per page." }, "post": { "operationId": "FrontendActionsController_createFrontendAction", @@ -6883,11 +6883,11 @@ "apiKey": [] } ], - "summary": "Create a frontend action", + "summary": "Create Frontend Action", "tags": [ "Agent Builder Frontend Actions" ], - "description": "Create a new frontend action for the application. The trigger function must be unique per application. A tool object is automatically generated from the provided parameters, description, and trigger function." + "description": "Creates a new frontend action for the application. Use this endpoint to define a client-side UI operation that agents can trigger during conversations.\n\n**Uniqueness:** The trigger function must be unique per application.\n\n**Auto-generation:** A tool object is automatically generated from the provided parameters, description, and trigger function." } }, "/ai-agents/agent-builder/frontend-actions/{id}": { @@ -7039,11 +7039,11 @@ "apiKey": [] } ], - "summary": "Get a frontend action by id", + "summary": "Get Frontend Action", "tags": [ "Agent Builder Frontend Actions" ], - "description": "Retrieve a specific frontend action by its unique ID. Returns 404 if no frontend action with the given ID exists." + "description": "Retrieves a specific frontend action by its unique ID. Use this endpoint to inspect a frontend action's configuration, parameters, and trigger function." }, "patch": { "operationId": "FrontendActionsController_updateFrontendAction", @@ -7203,11 +7203,11 @@ "apiKey": [] } ], - "summary": "Update a frontend action", + "summary": "Update Frontend Action", "tags": [ "Agent Builder Frontend Actions" ], - "description": "Update an existing frontend action by its unique ID. The tool object is automatically regenerated from the updated parameters and description. Returns 404 if no frontend action with the given ID exists." + "description": "Updates an existing frontend action by its unique ID. Use this endpoint to modify a frontend action's parameters, description, or trigger function.\n\n**Auto-regeneration:** The tool object is automatically regenerated from the updated parameters and description." }, "delete": { "operationId": "FrontendActionsController_deleteFrontendAction", @@ -7278,16 +7278,16 @@ "apiKey": [] } ], - "summary": "Delete a frontend action", + "summary": "Delete Frontend Action", "tags": [ "Agent Builder Frontend Actions" ], - "description": "Delete a frontend action by its unique ID. Returns 404 if no frontend action with the given ID exists." + "description": "Deletes a frontend action by its unique ID. Use this endpoint to remove a frontend action that is no longer needed." } }, "/ai-agents/agent-builder/knowledge-base/uploads/initiate": { "post": { - "description": "Generate presigned URLs and create upload records for one or more files to be added to the knowledge base.", + "description": "Generates presigned URLs and creates upload records for one or more files. Use this endpoint to prepare files for upload to the knowledge base.\n\n**Workflow:** After receiving the presigned URLs, upload the files directly to the provided URLs, then use the Add Knowledge Base Files endpoint to associate them with an agent.", "operationId": "RagController_initiateUpload", "parameters": [], "requestBody": { @@ -7400,7 +7400,7 @@ "apiKey": [] } ], - "summary": "Initiate file uploads", + "summary": "Initiate File Uploads", "tags": [ "knowledge-base" ] @@ -7408,7 +7408,7 @@ }, "/ai-agents/agent-builder/knowledge-base/text": { "post": { - "description": "Create a new text-based knowledge base entry. Accepts a title and text content, converts it to a Markdown file, and adds it to the knowledge base.", + "description": "Creates a new text-based knowledge base entry. Use this endpoint to add custom text content that agents can reference during conversations.\n\n**Processing:** Accepts a title and text content, converts it to a Markdown file, and adds it to the knowledge base for indexing.", "operationId": "RagController_createTextDetail", "parameters": [], "requestBody": { @@ -7513,13 +7513,13 @@ "apiKey": [] } ], - "summary": "Create text detail and upload to knowledge base", + "summary": "Create Text Entry", "tags": [ "knowledge-base" ] }, "get": { - "description": "Retrieve all text-based knowledge base entries for the application.", + "description": "Retrieves all text-based knowledge base entries for the application. Use this endpoint to view and manage text content in the knowledge base.", "operationId": "RagController_getTextDetails", "parameters": [], "responses": { @@ -7547,7 +7547,7 @@ "apiKey": [] } ], - "summary": "Get all text details for an app", + "summary": "List Text Entries", "tags": [ "knowledge-base" ] @@ -7555,7 +7555,7 @@ }, "/ai-agents/agent-builder/knowledge-base/text/{uniqueId}": { "get": { - "description": "Retrieve a specific text-based knowledge base entry by its unique ID.", + "description": "Retrieves a specific text-based knowledge base entry by its unique ID. Use this endpoint to inspect the content and status of a text entry.", "operationId": "RagController_getTextDetailById", "parameters": [ { @@ -7623,13 +7623,13 @@ "apiKey": [] } ], - "summary": "Get a specific text detail by uniqueId", + "summary": "Get Text Entry", "tags": [ "knowledge-base" ] }, "patch": { - "description": "Update a specific text-based knowledge base entry by its unique ID. The content is re-uploaded and the entry status is reset to indexing.", + "description": "Updates a specific text-based knowledge base entry by its unique ID. Use this endpoint to modify the title or content of an existing text entry.\n\n**Re-indexing:** The content is re-uploaded and the entry status is reset to indexing.", "operationId": "RagController_updateTextDetail", "parameters": [ { @@ -7710,13 +7710,13 @@ "apiKey": [] } ], - "summary": "Update a specific text detail by uniqueId", + "summary": "Update Text Entry", "tags": [ "knowledge-base" ] }, "delete": { - "description": "Delete a text-based knowledge base entry by its unique ID, including its associated upload record and stored content.", + "description": "Deletes a text-based knowledge base entry by its unique ID. Use this endpoint to remove text content from the knowledge base.\n\n**Cleanup:** The associated upload record and stored content are also removed.", "operationId": "RagController_deleteTextDetail", "parameters": [ { @@ -7825,7 +7825,7 @@ "apiKey": [] } ], - "summary": "Delete text detail and all associated data", + "summary": "Delete Text Entry", "tags": [ "knowledge-base" ] @@ -7833,7 +7833,7 @@ }, "/ai-agents/agent-builder/knowledge-base": { "get": { - "description": "Retrieve knowledge base records for the application using cursor-based pagination. Records are returned in descending order (newest first). Supports bidirectional navigation using cursor and affix parameters.", + "description": "Retrieves knowledge base records for the application. Use this endpoint to browse all knowledge base sources including files, text entries, and websites.\n\n**Pagination:** Uses cursor-based pagination with records returned in descending order (newest first). Supports bidirectional navigation using `cursor` and `affix` parameters.", "operationId": "RagController_getKnowledgeBase", "parameters": [ { @@ -8025,7 +8025,7 @@ "apiKey": [] } ], - "summary": "Get knowledge base records with cursor-based pagination", + "summary": "List Knowledge Base Records", "tags": [ "knowledge-base" ] @@ -8033,7 +8033,7 @@ }, "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/pages": { "get": { - "description": "Retrieve paginated pages for a specific knowledge base source file. Supports limit, page, and affix parameters for pagination.", + "description": "Retrieves paginated pages for a specific knowledge base source file. Use this endpoint to inspect the individual pages extracted from a knowledge base source.\n\n**Pagination:** Supports `limit`, `page`, and `affix` parameters.", "operationId": "RagController_getSourcePages", "parameters": [ { @@ -8114,7 +8114,7 @@ "apiKey": [] } ], - "summary": "Get paginated source pages", + "summary": "Get Source Pages", "tags": [ "knowledge-base" ] @@ -8122,7 +8122,7 @@ }, "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/sync": { "patch": { - "description": "Trigger re-indexing for a specific knowledge base source by its type and unique ID.", + "description": "Triggers re-indexing for a specific knowledge base source by its type and unique ID. Use this endpoint to refresh the vector embeddings after the source content has been updated.", "operationId": "RagController_revectorizeSource", "parameters": [ { @@ -8163,7 +8163,7 @@ "apiKey": [] } ], - "summary": "Resync/Revectorize source", + "summary": "Resync Knowledge Base Source", "tags": [ "knowledge-base" ] @@ -8216,7 +8216,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/scrape": { "post": { - "description": "Scrape a website to discover and crawl its pages. Supports configuration options for URL filtering and crawl depth control.", + "description": "Scrapes a website to discover and crawl its pages for the knowledge base. Use this endpoint to add website content as a knowledge source for agents.\n\n**Configuration:** Supports options for URL filtering and crawl depth control.", "operationId": "CrawlWebPagesController_crawlWebsite", "parameters": [], "requestBody": { @@ -8366,7 +8366,7 @@ "apiKey": [] } ], - "summary": "Scrape a website and fetch sitemap", + "summary": "Scrape Website", "tags": [ "crawl-web-pages" ] @@ -8374,7 +8374,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/individual-page": { "post": { - "description": "Scrape a single webpage to extract its title, description, and full content.", + "description": "Scrapes a single webpage to extract its content for the knowledge base. Use this endpoint to add a specific page without crawling an entire website.\n\n**Extraction:** Returns the page title, description, and full content.", "operationId": "CrawlWebPagesController_scrapePage", "parameters": [], "requestBody": { @@ -8531,7 +8531,7 @@ "apiKey": [] } ], - "summary": "Scrape a single page and extract content", + "summary": "Scrape Single Page", "tags": [ "crawl-web-pages" ] @@ -8539,7 +8539,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls": { "get": { - "description": "Retrieve all URLs discovered during a website crawl with cursor-based pagination.", + "description": "Retrieves all URLs discovered during a website crawl. Use this endpoint to review which pages were found before processing them.\n\n**Pagination:** Supports cursor-based pagination.", "operationId": "CrawlWebPagesController_getDiscoveredUrls", "parameters": [ { @@ -8781,7 +8781,7 @@ "apiKey": [] } ], - "summary": "Get discovered URLs for a parent crawl", + "summary": "Get Discovered URLs", "tags": [ "crawl-web-pages" ] @@ -8789,7 +8789,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process": { "post": { - "description": "Mark discovered URLs for exclusion and initiate batch crawling of the remaining URLs.", + "description": "Marks discovered URLs for exclusion and initiates batch crawling of the remaining URLs. Use this endpoint to selectively process pages discovered during a website crawl.", "operationId": "CrawlWebPagesController_processDiscoveredUrls", "parameters": [ { @@ -8882,7 +8882,7 @@ "apiKey": [] } ], - "summary": "Process discovered URLs for batch crawling", + "summary": "Process Discovered URLs", "tags": [ "crawl-web-pages" ] @@ -8890,7 +8890,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/status/poll": { "post": { - "description": "Retrieve the processing status of discovered URLs by their unique IDs within a parent website crawl. Only returns records for existing unique IDs.", + "description": "Retrieves the processing status of discovered URLs by their unique IDs. Use this endpoint to monitor the progress of URL crawling within a parent website crawl.\n\n**Behavior:** Only returns records for existing unique IDs; non-existing IDs are omitted from the response.", "operationId": "CrawlWebPagesController_getDiscoveredUrlsStatus", "parameters": [ { @@ -8956,7 +8956,7 @@ "apiKey": [] } ], - "summary": "Get status for multiple discovered URLs", + "summary": "Poll Discovered URLs Status", "tags": [ "crawl-web-pages" ] @@ -8964,7 +8964,7 @@ }, "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/sync": { "patch": { - "description": "Selectively re-process specific discovered URLs that are not excluded. Allows syncing individual URLs within a parent website crawl without processing all discovered URLs.", + "description": "Selectively re-processes specific discovered URLs that are not excluded. Use this endpoint to sync individual URLs within a parent website crawl without processing all discovered URLs.", "operationId": "CrawlWebPagesController_syncDiscoveredUrls", "parameters": [ { @@ -9077,7 +9077,7 @@ "apiKey": [] } ], - "summary": "Sync specific discovered URLs for batch processing", + "summary": "Sync Discovered URLs", "tags": [ "crawl-web-pages" ] From ada615d3b4c95a528327f32dcfee1525569590a3 Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Thu, 5 Mar 2026 19:06:48 +0530 Subject: [PATCH 10/13] restructure APIs tab: replace dropdowns with groups and collapsible folders matching Chat APIs pattern --- docs.json | 108 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 45 deletions(-) diff --git a/docs.json b/docs.json index e59e9e06..38485ac8 100644 --- a/docs.json +++ b/docs.json @@ -898,7 +898,7 @@ "icon": "/images/icons/react.svg", "versions": [ { - "version": "v5\u200e", + "version": "v5‎", "groups": [ { "group": " ", @@ -985,7 +985,7 @@ ] }, { - "version": "v4\u200e", + "version": "v4‎", "groups": [ { "group": " ", @@ -1148,7 +1148,7 @@ ] }, { - "version": "v3\u200e", + "version": "v3‎", "groups": [ { "group": " ", @@ -1170,7 +1170,7 @@ ] }, { - "version": "v2\u200e", + "version": "v2‎", "groups": [ { "group": " ", @@ -1198,7 +1198,7 @@ "icon": "/images/icons/swift.svg", "versions": [ { - "version": "v5\u200e\u200e", + "version": "v5‎‎", "groups": [ { "group": " ", @@ -1303,7 +1303,7 @@ ] }, { - "version": "v4\u200e\u200e", + "version": "v4‎‎", "groups": [ { "group": " ", @@ -1467,7 +1467,7 @@ ] }, { - "version": "v3\u200e\u200e", + "version": "v3‎‎", "groups": [ { "group": " ", @@ -1489,7 +1489,7 @@ ] }, { - "version": "v2\u200e\u200e", + "version": "v2‎‎", "groups": [ { "group": " ", @@ -1517,7 +1517,7 @@ "icon": "/images/icons/android.svg", "versions": [ { - "version": "v5\u200e\u200e\u200e", + "version": "v5‎‎‎", "groups": [ { "group": " ", @@ -1620,7 +1620,7 @@ ] }, { - "version": "v4\u200e\u200e\u200e", + "version": "v4‎‎‎", "groups": [ { "group": " ", @@ -1777,7 +1777,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e", + "version": "v3‎‎‎", "groups": [ { "group": " ", @@ -1802,7 +1802,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e", + "version": "v2‎‎‎", "groups": [ { "group": " ", @@ -1831,7 +1831,7 @@ "icon": "/images/icons/flutter.svg", "versions": [ { - "version": "v5\u200e\u200e\u200e\u200e", + "version": "v5‎‎‎‎", "groups": [ { "group": " ", @@ -1938,7 +1938,7 @@ ] }, { - "version": "v4\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎", "groups": [ { "group": " ", @@ -2114,7 +2114,7 @@ "icon": "/images/icons/angular.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎", "groups": [ { "group": " ", @@ -2304,7 +2304,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎", "groups": [ { "group": " ", @@ -2325,7 +2325,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎", "groups": [ { "group": " ", @@ -2352,7 +2352,7 @@ "icon": "/images/icons/vuejs.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2445,7 +2445,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2467,7 +2467,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2499,7 +2499,7 @@ "icon": "/images/icons/js.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2632,7 +2632,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2755,7 +2755,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2858,7 +2858,7 @@ "icon": "/images/icons/react.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2974,7 +2974,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3088,7 +3088,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3190,7 +3190,7 @@ "icon": "/images/icons/swift.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3313,7 +3313,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3431,7 +3431,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3538,7 +3538,7 @@ "icon": "/images/icons/android.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3653,7 +3653,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3773,7 +3773,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3876,7 +3876,7 @@ "icon": "/images/icons/flutter.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3990,7 +3990,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -4095,7 +4095,7 @@ "icon": "/images/icons/ionic.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -4203,7 +4203,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -4313,7 +4313,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -5106,13 +5106,15 @@ }, { "tab": "APIs", - "dropdowns": [ + "groups": [ { - "dropdown": "BYO Agent", + "group": "BYO Agent APIs", "pages": [ "ai-agents/byo-api-explorer", { "group": "Third-Party Agents", + "expanded": false, + "icon": "robot", "pages": [ "ai-agents/apis/create-third-party-agent", "ai-agents/apis/list-third-party-agents", @@ -5122,6 +5124,8 @@ }, { "group": "Tools", + "expanded": false, + "icon": "wrench", "pages": [ "ai-agents/apis/list-tools", "ai-agents/apis/get-tool", @@ -5132,19 +5136,22 @@ }, { "group": "Integrations", + "expanded": false, + "icon": "plug", "pages": [ "ai-agents/apis/list-integrations" ] } - ], - "icon": "plug" + ] }, { - "dropdown": "Agent Builder", + "group": "Agent Builder APIs", "pages": [ "ai-agents/api-explorer", { "group": "Agents", + "expanded": false, + "icon": "robot", "pages": [ "ai-agents/apis/create-agent", "ai-agents/apis/list-agents", @@ -5158,6 +5165,8 @@ }, { "group": "Tools", + "expanded": false, + "icon": "wrench", "pages": [ "ai-agents/apis/get-composio-tools", "ai-agents/apis/add-tools-to-agent", @@ -5170,6 +5179,8 @@ }, { "group": "Custom API Tools", + "expanded": false, + "icon": "code", "pages": [ "ai-agents/apis/list-api-tools", "ai-agents/apis/create-api-tool", @@ -5181,6 +5192,8 @@ }, { "group": "Frontend Actions", + "expanded": false, + "icon": "window", "pages": [ "ai-agents/apis/list-frontend-actions", "ai-agents/apis/create-frontend-action", @@ -5192,6 +5205,8 @@ }, { "group": "MCP Servers", + "expanded": false, + "icon": "server", "pages": [ "ai-agents/apis/list-mcp-servers", "ai-agents/apis/create-mcp-server", @@ -5203,6 +5218,8 @@ }, { "group": "Knowledge Base", + "expanded": false, + "icon": "book", "pages": [ "ai-agents/apis/list-knowledge-base-records", "ai-agents/apis/get-source-pages", @@ -5226,6 +5243,8 @@ }, { "group": "Variables", + "expanded": false, + "icon": "brackets-curly", "pages": [ "ai-agents/apis/get-all-available-variables", "ai-agents/apis/create-custom-variable", @@ -5233,8 +5252,7 @@ "ai-agents/apis/delete-custom-variable" ] } - ], - "icon": "robot" + ] } ] } @@ -6103,7 +6121,7 @@ "metatags": { "charset": "UTF-8", "viewport": "width=device-width, initial-scale=1.0", - "description": "Learn how to integrate, customize, and scale real-time chat using CometChat\u2019s UI Kits, SDKs, and widgets across popular frameworks. Get step-by-step guides, best practices, and implementation details to build production-ready chat experiences.", + "description": "Learn how to integrate, customize, and scale real-time chat using CometChat’s UI Kits, SDKs, and widgets across popular frameworks. Get step-by-step guides, best practices, and implementation details to build production-ready chat experiences.", "language": "en" } }, From 375f65e068744b44d511b0cfe9ec576798b4db3b Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Thu, 5 Mar 2026 23:43:14 +0530 Subject: [PATCH 11/13] replace third-party agent with BYO agent across all files --- ai-agent-service.json | 254 +++++++++--------- ...d-party-agent.mdx => create-byo-agent.mdx} | 0 ...d-party-agent.mdx => delete-byo-agent.mdx} | 0 ...d-party-agents.mdx => list-byo-agents.mdx} | 0 ...ird-party-agent.mdx => test-byo-agent.mdx} | 0 ...d-party-agent.mdx => update-byo-agent.mdx} | 0 docs.json | 10 +- 7 files changed, 132 insertions(+), 132 deletions(-) rename ai-agents/apis/{create-third-party-agent.mdx => create-byo-agent.mdx} (100%) rename ai-agents/apis/{delete-third-party-agent.mdx => delete-byo-agent.mdx} (100%) rename ai-agents/apis/{list-third-party-agents.mdx => list-byo-agents.mdx} (100%) rename ai-agents/apis/{test-third-party-agent.mdx => test-byo-agent.mdx} (100%) rename ai-agents/apis/{update-third-party-agent.mdx => update-byo-agent.mdx} (100%) diff --git a/ai-agent-service.json b/ai-agent-service.json index e0cd122a..ced89d22 100644 --- a/ai-agent-service.json +++ b/ai-agent-service.json @@ -105,7 +105,7 @@ } }, "400": { - "description": "Bad Request — validation error or referenced tools/actions not found.", + "description": "Bad Request \u2014 validation error or referenced tools/actions not found.", "content": { "application/json": { "schema": { @@ -115,7 +115,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -143,8 +143,8 @@ "tags": [ "Agents" ], - "description": "Creates a new third-party agent that delegates conversations to an external AI framework. Use this endpoint to register a BYO (Bring Your Own) agent powered by frameworks like Mastra, CrewAI, or LangGraph.\n\n**Validation:** All referenced tools and actions are validated before the agent is created.", - "summary": "Create Third-Party Agent" + "description": "Creates a new BYO agent that delegates conversations to an external AI framework. Use this endpoint to register a BYO (Bring Your Own) agent powered by frameworks like Mastra, CrewAI, or LangGraph.\n\n**Validation:** All referenced tools and actions are validated before the agent is created.", + "summary": "Create BYO Agent" }, "get": { "operationId": "AgentsController_getAgents", @@ -209,7 +209,7 @@ } }, "400": { - "description": "Bad Request — validation error or referenced tools/actions not found.", + "description": "Bad Request \u2014 validation error or referenced tools/actions not found.", "content": { "application/json": { "schema": { @@ -219,7 +219,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -229,7 +229,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -257,8 +257,8 @@ "tags": [ "Agents" ], - "description": "Updates an existing third-party agent by its UID. Use this endpoint to modify agent configuration, update referenced tools, or change the connected AI framework.\n\n**Validation:** Referenced tools and actions are validated if provided.", - "summary": "Update Third-Party Agent" + "description": "Updates an existing BYO agent by its UID. Use this endpoint to modify agent configuration, update referenced tools, or change the connected AI framework.\n\n**Validation:** Referenced tools and actions are validated if provided.", + "summary": "Update BYO Agent" }, "delete": { "operationId": "AgentsController_deleteAgent", @@ -294,7 +294,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -304,7 +304,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -332,8 +332,8 @@ "tags": [ "Agents" ], - "description": "Deletes a third-party agent by its UID. Use this endpoint to remove a BYO agent that is no longer needed.", - "summary": "Delete Third-Party Agent" + "description": "Deletes a BYO agent by its UID. Use this endpoint to remove a BYO agent that is no longer needed.", + "summary": "Delete BYO Agent" } }, "/ai-agents/tools": { @@ -425,7 +425,7 @@ } }, "400": { - "description": "Bad Request — validation error or duplicate tool name.", + "description": "Bad Request \u2014 validation error or duplicate tool name.", "content": { "application/json": { "schema": { @@ -435,7 +435,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -463,7 +463,7 @@ "tags": [ "Tools" ], - "description": "Creates a new tool or action for the application. Use this endpoint to define custom tools that agents can invoke during conversations.\n\n**Naming:** The tool name must be unique per application.\n\n**Type assignment:** The type is automatically determined by the `doNotExecute` flag — set to `tool` when true, `action` otherwise.", + "description": "Creates a new tool or action for the application. Use this endpoint to define custom tools that agents can invoke during conversations.\n\n**Naming:** The tool name must be unique per application.\n\n**Type assignment:** The type is automatically determined by the `doNotExecute` flag \u2014 set to `tool` when true, `action` otherwise.", "summary": "Create Tool" }, "get": { @@ -561,7 +561,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -681,7 +681,7 @@ } }, "400": { - "description": "Bad Request — invalid tool name parameter.", + "description": "Bad Request \u2014 invalid tool name parameter.", "content": { "application/json": { "schema": { @@ -691,7 +691,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -701,7 +701,7 @@ } }, "404": { - "description": "Not Found — tool with the given name does not exist.", + "description": "Not Found \u2014 tool with the given name does not exist.", "content": { "application/json": { "schema": { @@ -829,7 +829,7 @@ } }, "400": { - "description": "Bad Request — validation error or attempt to change tool name.", + "description": "Bad Request \u2014 validation error or attempt to change tool name.", "content": { "application/json": { "schema": { @@ -839,7 +839,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -849,7 +849,7 @@ } }, "404": { - "description": "Not Found — tool with the given name does not exist.", + "description": "Not Found \u2014 tool with the given name does not exist.", "content": { "application/json": { "schema": { @@ -904,7 +904,7 @@ } }, "400": { - "description": "Bad Request — invalid tool name parameter.", + "description": "Bad Request \u2014 invalid tool name parameter.", "content": { "application/json": { "schema": { @@ -914,7 +914,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -924,7 +924,7 @@ } }, "404": { - "description": "Not Found — tool with the given name does not exist.", + "description": "Not Found \u2014 tool with the given name does not exist.", "content": { "application/json": { "schema": { @@ -982,7 +982,7 @@ } }, "400": { - "description": "Bad Request — validation error or invalid integration data.", + "description": "Bad Request \u2014 validation error or invalid integration data.", "content": { "application/json": { "schema": { @@ -992,7 +992,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid admin API key.", + "description": "Unauthorized \u2014 missing or invalid admin API key.", "content": { "application/json": { "schema": { @@ -1111,7 +1111,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1180,7 +1180,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1284,7 +1284,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1373,7 +1373,7 @@ } }, "400": { - "description": "Bad Request — invalid search parameters.", + "description": "Bad Request \u2014 invalid search parameters.", "content": { "application/json": { "schema": { @@ -1383,7 +1383,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1393,7 +1393,7 @@ } }, "404": { - "description": "Not Found — agent with the given ID does not exist.", + "description": "Not Found \u2014 agent with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -1662,7 +1662,7 @@ } }, "400": { - "description": "Bad Request — invalid query parameters.", + "description": "Bad Request \u2014 invalid query parameters.", "content": { "application/json": { "schema": { @@ -1672,7 +1672,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1682,7 +1682,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -1864,7 +1864,7 @@ } }, "400": { - "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", + "description": "Bad Request \u2014 validation error or referenced tools/API tools/MCP servers not found.", "content": { "application/json": { "schema": { @@ -1874,7 +1874,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2115,7 +2115,7 @@ } }, "400": { - "description": "Bad Request — invalid pagination parameters.", + "description": "Bad Request \u2014 invalid pagination parameters.", "content": { "application/json": { "schema": { @@ -2125,7 +2125,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2302,7 +2302,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2312,7 +2312,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -2378,7 +2378,7 @@ } }, "400": { - "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", + "description": "Bad Request \u2014 validation error or referenced tools/API tools/MCP servers not found.", "content": { "application/json": { "schema": { @@ -2388,7 +2388,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2398,7 +2398,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -2454,7 +2454,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2464,7 +2464,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -2660,7 +2660,7 @@ } }, "400": { - "description": "Bad Request — invalid tool slugs or malformed request body.", + "description": "Bad Request \u2014 invalid tool slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -2670,7 +2670,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2680,7 +2680,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -2876,7 +2876,7 @@ } }, "400": { - "description": "Bad Request — invalid tool slugs or malformed request body.", + "description": "Bad Request \u2014 invalid tool slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -2886,7 +2886,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2896,7 +2896,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3092,7 +3092,7 @@ } }, "400": { - "description": "Bad Request — invalid MCP server slugs or malformed request body.", + "description": "Bad Request \u2014 invalid MCP server slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -3102,7 +3102,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3112,7 +3112,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3308,7 +3308,7 @@ } }, "400": { - "description": "Bad Request — invalid MCP server slugs or malformed request body.", + "description": "Bad Request \u2014 invalid MCP server slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -3318,7 +3318,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3328,7 +3328,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3524,7 +3524,7 @@ } }, "400": { - "description": "Bad Request — invalid API tool slugs or malformed request body.", + "description": "Bad Request \u2014 invalid API tool slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -3534,7 +3534,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3544,7 +3544,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3740,7 +3740,7 @@ } }, "400": { - "description": "Bad Request — invalid API tool slugs or malformed request body.", + "description": "Bad Request \u2014 invalid API tool slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -3750,7 +3750,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3760,7 +3760,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3956,7 +3956,7 @@ } }, "400": { - "description": "Bad Request — invalid frontend action identifiers or malformed request body.", + "description": "Bad Request \u2014 invalid frontend action identifiers or malformed request body.", "content": { "application/json": { "schema": { @@ -3966,7 +3966,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3976,7 +3976,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -4172,7 +4172,7 @@ } }, "400": { - "description": "Bad Request — invalid frontend action identifiers or malformed request body.", + "description": "Bad Request \u2014 invalid frontend action identifiers or malformed request body.", "content": { "application/json": { "schema": { @@ -4182,7 +4182,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4192,7 +4192,7 @@ } }, "404": { - "description": "Not Found — agent with the given UID does not exist.", + "description": "Not Found \u2014 agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -4505,7 +4505,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4615,7 +4615,7 @@ } }, "400": { - "description": "Bad Request — validation error or duplicate variable name.", + "description": "Bad Request \u2014 validation error or duplicate variable name.", "content": { "application/json": { "schema": { @@ -4625,7 +4625,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4747,7 +4747,7 @@ } }, "400": { - "description": "Bad Request — validation error.", + "description": "Bad Request \u2014 validation error.", "content": { "application/json": { "schema": { @@ -4757,7 +4757,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4767,7 +4767,7 @@ } }, "404": { - "description": "Not Found — custom variable with the given ID does not exist.", + "description": "Not Found \u2014 custom variable with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -4823,7 +4823,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4833,7 +4833,7 @@ } }, "404": { - "description": "Not Found — custom variable with the given ID does not exist.", + "description": "Not Found \u2014 custom variable with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -5049,7 +5049,7 @@ } }, "400": { - "description": "Bad Request — invalid pagination parameters.", + "description": "Bad Request \u2014 invalid pagination parameters.", "content": { "application/json": { "schema": { @@ -5059,7 +5059,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5220,7 +5220,7 @@ } }, "400": { - "description": "Bad Request — validation error or duplicate slug.", + "description": "Bad Request \u2014 validation error or duplicate slug.", "content": { "application/json": { "schema": { @@ -5230,7 +5230,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5392,7 +5392,7 @@ } }, "400": { - "description": "Bad Request — invalid slug parameter.", + "description": "Bad Request \u2014 invalid slug parameter.", "content": { "application/json": { "schema": { @@ -5402,7 +5402,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5412,7 +5412,7 @@ } }, "404": { - "description": "Not Found — API tool with the given slug does not exist.", + "description": "Not Found \u2014 API tool with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -5582,7 +5582,7 @@ } }, "400": { - "description": "Bad Request — validation error.", + "description": "Bad Request \u2014 validation error.", "content": { "application/json": { "schema": { @@ -5592,7 +5592,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5602,7 +5602,7 @@ } }, "404": { - "description": "Not Found — API tool with the given slug does not exist.", + "description": "Not Found \u2014 API tool with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -5657,7 +5657,7 @@ } }, "400": { - "description": "Bad Request — invalid slug parameter.", + "description": "Bad Request \u2014 invalid slug parameter.", "content": { "application/json": { "schema": { @@ -5667,7 +5667,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5677,7 +5677,7 @@ } }, "404": { - "description": "Not Found — API tool with the given slug does not exist.", + "description": "Not Found \u2014 API tool with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -5773,7 +5773,7 @@ } }, "400": { - "description": "Bad Request — validation error or duplicate slug.", + "description": "Bad Request \u2014 validation error or duplicate slug.", "content": { "application/json": { "schema": { @@ -5783,7 +5783,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5930,7 +5930,7 @@ } }, "400": { - "description": "Bad Request — invalid pagination parameters.", + "description": "Bad Request \u2014 invalid pagination parameters.", "content": { "application/json": { "schema": { @@ -5940,7 +5940,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6035,7 +6035,7 @@ } }, "400": { - "description": "Bad Request — invalid slug parameter.", + "description": "Bad Request \u2014 invalid slug parameter.", "content": { "application/json": { "schema": { @@ -6045,7 +6045,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6055,7 +6055,7 @@ } }, "404": { - "description": "Not Found — MCP server with the given slug does not exist.", + "description": "Not Found \u2014 MCP server with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -6158,7 +6158,7 @@ } }, "400": { - "description": "Bad Request — validation error.", + "description": "Bad Request \u2014 validation error.", "content": { "application/json": { "schema": { @@ -6168,7 +6168,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6178,7 +6178,7 @@ } }, "404": { - "description": "Not Found — MCP server with the given slug does not exist.", + "description": "Not Found \u2014 MCP server with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -6233,7 +6233,7 @@ } }, "400": { - "description": "Bad Request — invalid slug parameter.", + "description": "Bad Request \u2014 invalid slug parameter.", "content": { "application/json": { "schema": { @@ -6243,7 +6243,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6253,7 +6253,7 @@ } }, "404": { - "description": "Not Found — MCP server with the given slug does not exist.", + "description": "Not Found \u2014 MCP server with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -6425,7 +6425,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6703,7 +6703,7 @@ } }, "400": { - "description": "Bad Request — invalid pagination parameters.", + "description": "Bad Request \u2014 invalid pagination parameters.", "content": { "application/json": { "schema": { @@ -6713,7 +6713,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6848,7 +6848,7 @@ } }, "400": { - "description": "Bad Request — validation error or duplicate trigger function.", + "description": "Bad Request \u2014 validation error or duplicate trigger function.", "content": { "application/json": { "schema": { @@ -6858,7 +6858,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6994,7 +6994,7 @@ } }, "400": { - "description": "Bad Request — invalid ID parameter.", + "description": "Bad Request \u2014 invalid ID parameter.", "content": { "application/json": { "schema": { @@ -7004,7 +7004,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7014,7 +7014,7 @@ } }, "404": { - "description": "Not Found — frontend action with the given ID does not exist.", + "description": "Not Found \u2014 frontend action with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -7158,7 +7158,7 @@ } }, "400": { - "description": "Bad Request — validation error.", + "description": "Bad Request \u2014 validation error.", "content": { "application/json": { "schema": { @@ -7168,7 +7168,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7178,7 +7178,7 @@ } }, "404": { - "description": "Not Found — frontend action with the given ID does not exist.", + "description": "Not Found \u2014 frontend action with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -7233,7 +7233,7 @@ } }, "400": { - "description": "Bad Request — invalid ID parameter.", + "description": "Bad Request \u2014 invalid ID parameter.", "content": { "application/json": { "schema": { @@ -7243,7 +7243,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7253,7 +7253,7 @@ } }, "404": { - "description": "Not Found — frontend action with the given ID does not exist.", + "description": "Not Found \u2014 frontend action with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -7365,7 +7365,7 @@ } }, "400": { - "description": "Bad Request — missing appId header or invalid file metadata.", + "description": "Bad Request \u2014 missing appId header or invalid file metadata.", "content": { "application/json": { "schema": { @@ -7375,7 +7375,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7478,7 +7478,7 @@ } }, "400": { - "description": "Bad Request — missing appId header or invalid text detail data.", + "description": "Bad Request \u2014 missing appId header or invalid text detail data.", "content": { "application/json": { "schema": { @@ -7488,7 +7488,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7780,7 +7780,7 @@ } }, "400": { - "description": "Bad Request — missing appId header or uniqueId parameter.", + "description": "Bad Request \u2014 missing appId header or uniqueId parameter.", "content": { "application/json": { "schema": { @@ -7790,7 +7790,7 @@ } }, "401": { - "description": "Unauthorized — missing or invalid API key.", + "description": "Unauthorized \u2014 missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7800,7 +7800,7 @@ } }, "404": { - "description": "Not Found — text detail with the given uniqueId does not exist.", + "description": "Not Found \u2014 text detail with the given uniqueId does not exist.", "content": { "application/json": { "schema": { diff --git a/ai-agents/apis/create-third-party-agent.mdx b/ai-agents/apis/create-byo-agent.mdx similarity index 100% rename from ai-agents/apis/create-third-party-agent.mdx rename to ai-agents/apis/create-byo-agent.mdx diff --git a/ai-agents/apis/delete-third-party-agent.mdx b/ai-agents/apis/delete-byo-agent.mdx similarity index 100% rename from ai-agents/apis/delete-third-party-agent.mdx rename to ai-agents/apis/delete-byo-agent.mdx diff --git a/ai-agents/apis/list-third-party-agents.mdx b/ai-agents/apis/list-byo-agents.mdx similarity index 100% rename from ai-agents/apis/list-third-party-agents.mdx rename to ai-agents/apis/list-byo-agents.mdx diff --git a/ai-agents/apis/test-third-party-agent.mdx b/ai-agents/apis/test-byo-agent.mdx similarity index 100% rename from ai-agents/apis/test-third-party-agent.mdx rename to ai-agents/apis/test-byo-agent.mdx diff --git a/ai-agents/apis/update-third-party-agent.mdx b/ai-agents/apis/update-byo-agent.mdx similarity index 100% rename from ai-agents/apis/update-third-party-agent.mdx rename to ai-agents/apis/update-byo-agent.mdx diff --git a/docs.json b/docs.json index 38485ac8..512686f7 100644 --- a/docs.json +++ b/docs.json @@ -5112,14 +5112,14 @@ "pages": [ "ai-agents/byo-api-explorer", { - "group": "Third-Party Agents", + "group": "BYO Agents", "expanded": false, "icon": "robot", "pages": [ - "ai-agents/apis/create-third-party-agent", - "ai-agents/apis/list-third-party-agents", - "ai-agents/apis/update-third-party-agent", - "ai-agents/apis/delete-third-party-agent" + "ai-agents/apis/create-byo-agent", + "ai-agents/apis/list-byo-agents", + "ai-agents/apis/update-byo-agent", + "ai-agents/apis/delete-byo-agent" ] }, { From 844851fb344d15d1560d82e749cdbd5ce50e0896 Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Fri, 6 Mar 2026 01:14:51 +0530 Subject: [PATCH 12/13] fix endpoint descriptions, remove Composio refs, remove empty pages --- ai-agent-service.json | 282 +++++++++++++++++++++--------------------- docs.json | 3 - 2 files changed, 144 insertions(+), 141 deletions(-) diff --git a/ai-agent-service.json b/ai-agent-service.json index ced89d22..da56340c 100644 --- a/ai-agent-service.json +++ b/ai-agent-service.json @@ -105,7 +105,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or referenced tools/actions not found.", + "description": "Bad Request — validation error or referenced tools/actions not found.", "content": { "application/json": { "schema": { @@ -115,7 +115,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -171,7 +171,9 @@ ], "tags": [ "Agents" - ] + ], + "summary": "List BYO Agents", + "description": "Retrieves all BYO agents configured for your CometChat app. Use this endpoint to view all registered BYO (Bring Your Own) agents and their current configuration." } }, "/ai-agents/agents/{id}": { @@ -209,7 +211,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or referenced tools/actions not found.", + "description": "Bad Request — validation error or referenced tools/actions not found.", "content": { "application/json": { "schema": { @@ -219,7 +221,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -229,7 +231,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -294,7 +296,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -304,7 +306,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -425,7 +427,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or duplicate tool name.", + "description": "Bad Request — validation error or duplicate tool name.", "content": { "application/json": { "schema": { @@ -435,7 +437,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -463,7 +465,7 @@ "tags": [ "Tools" ], - "description": "Creates a new tool or action for the application. Use this endpoint to define custom tools that agents can invoke during conversations.\n\n**Naming:** The tool name must be unique per application.\n\n**Type assignment:** The type is automatically determined by the `doNotExecute` flag \u2014 set to `tool` when true, `action` otherwise.", + "description": "Creates a new tool or action for the application. Use this endpoint to define custom tools that agents can invoke during conversations.\n\n**Naming:** The tool name must be unique per application.\n\n**Type assignment:** The type is automatically determined by the `doNotExecute` flag — set to `tool` when true, `action` otherwise.", "summary": "Create Tool" }, "get": { @@ -561,7 +563,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -681,7 +683,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid tool name parameter.", + "description": "Bad Request — invalid tool name parameter.", "content": { "application/json": { "schema": { @@ -691,7 +693,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -701,7 +703,7 @@ } }, "404": { - "description": "Not Found \u2014 tool with the given name does not exist.", + "description": "Not Found — tool with the given name does not exist.", "content": { "application/json": { "schema": { @@ -829,7 +831,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or attempt to change tool name.", + "description": "Bad Request — validation error or attempt to change tool name.", "content": { "application/json": { "schema": { @@ -839,7 +841,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -849,7 +851,7 @@ } }, "404": { - "description": "Not Found \u2014 tool with the given name does not exist.", + "description": "Not Found — tool with the given name does not exist.", "content": { "application/json": { "schema": { @@ -904,7 +906,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid tool name parameter.", + "description": "Bad Request — invalid tool name parameter.", "content": { "application/json": { "schema": { @@ -914,7 +916,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -924,7 +926,7 @@ } }, "404": { - "description": "Not Found \u2014 tool with the given name does not exist.", + "description": "Not Found — tool with the given name does not exist.", "content": { "application/json": { "schema": { @@ -982,7 +984,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or invalid integration data.", + "description": "Bad Request — validation error or invalid integration data.", "content": { "application/json": { "schema": { @@ -992,7 +994,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid admin API key.", + "description": "Unauthorized — missing or invalid admin API key.", "content": { "application/json": { "schema": { @@ -1111,7 +1113,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1180,7 +1182,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1284,7 +1286,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1373,7 +1375,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid search parameters.", + "description": "Bad Request — invalid search parameters.", "content": { "application/json": { "schema": { @@ -1383,7 +1385,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1393,7 +1395,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given ID does not exist.", + "description": "Not Found — agent with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -1662,7 +1664,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid query parameters.", + "description": "Bad Request — invalid query parameters.", "content": { "application/json": { "schema": { @@ -1672,7 +1674,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -1682,7 +1684,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -1864,7 +1866,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or referenced tools/API tools/MCP servers not found.", + "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", "content": { "application/json": { "schema": { @@ -1874,7 +1876,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2115,7 +2117,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid pagination parameters.", + "description": "Bad Request — invalid pagination parameters.", "content": { "application/json": { "schema": { @@ -2125,7 +2127,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2302,7 +2304,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2312,7 +2314,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -2378,7 +2380,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or referenced tools/API tools/MCP servers not found.", + "description": "Bad Request — validation error or referenced tools/API tools/MCP servers not found.", "content": { "application/json": { "schema": { @@ -2388,7 +2390,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2398,7 +2400,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -2454,7 +2456,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2464,7 +2466,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -2660,7 +2662,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid tool slugs or malformed request body.", + "description": "Bad Request — invalid tool slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -2670,7 +2672,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2680,7 +2682,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -2876,7 +2878,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid tool slugs or malformed request body.", + "description": "Bad Request — invalid tool slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -2886,7 +2888,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -2896,7 +2898,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3092,7 +3094,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid MCP server slugs or malformed request body.", + "description": "Bad Request — invalid MCP server slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -3102,7 +3104,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3112,7 +3114,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3308,7 +3310,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid MCP server slugs or malformed request body.", + "description": "Bad Request — invalid MCP server slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -3318,7 +3320,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3328,7 +3330,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3524,7 +3526,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid API tool slugs or malformed request body.", + "description": "Bad Request — invalid API tool slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -3534,7 +3536,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3544,7 +3546,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3740,7 +3742,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid API tool slugs or malformed request body.", + "description": "Bad Request — invalid API tool slugs or malformed request body.", "content": { "application/json": { "schema": { @@ -3750,7 +3752,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3760,7 +3762,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -3956,7 +3958,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid frontend action identifiers or malformed request body.", + "description": "Bad Request — invalid frontend action identifiers or malformed request body.", "content": { "application/json": { "schema": { @@ -3966,7 +3968,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -3976,7 +3978,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -4172,7 +4174,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid frontend action identifiers or malformed request body.", + "description": "Bad Request — invalid frontend action identifiers or malformed request body.", "content": { "application/json": { "schema": { @@ -4182,7 +4184,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4192,7 +4194,7 @@ } }, "404": { - "description": "Not Found \u2014 agent with the given UID does not exist.", + "description": "Not Found — agent with the given UID does not exist.", "content": { "application/json": { "schema": { @@ -4270,10 +4272,11 @@ "apiKey": [] } ], - "summary": "Add files to agent knowledge base", + "summary": "Add Files to Agent Knowledge Base", "tags": [ "Agent Builder" - ] + ], + "description": "Associates uploaded files or text entries with an agent's knowledge base. Use this endpoint after uploading files via the Initiate File Uploads endpoint to make them available to the agent.\n\n**Source types:** Specify the source type (e.g., uploads, text) in the path." } }, "/ai-agents/agent-builder/agents/{agentId}/knowledge-base/{sourceType}/remove": { @@ -4322,10 +4325,11 @@ "apiKey": [] } ], - "summary": "Remove files from agent knowledge base", + "summary": "Remove Files from Agent Knowledge Base", "tags": [ "Agent Builder" - ] + ], + "description": "Removes files or text entries from an agent's knowledge base. Use this endpoint to disassociate specific sources from an agent without deleting the underlying content.\n\n**Source types:** Specify the source type (e.g., uploads, text) in the path." } }, "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions/add": { @@ -4505,7 +4509,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4615,7 +4619,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or duplicate variable name.", + "description": "Bad Request — validation error or duplicate variable name.", "content": { "application/json": { "schema": { @@ -4625,7 +4629,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4747,7 +4751,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error.", + "description": "Bad Request — validation error.", "content": { "application/json": { "schema": { @@ -4757,7 +4761,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4767,7 +4771,7 @@ } }, "404": { - "description": "Not Found \u2014 custom variable with the given ID does not exist.", + "description": "Not Found — custom variable with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -4823,7 +4827,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -4833,7 +4837,7 @@ } }, "404": { - "description": "Not Found \u2014 custom variable with the given ID does not exist.", + "description": "Not Found — custom variable with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -5049,7 +5053,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid pagination parameters.", + "description": "Bad Request — invalid pagination parameters.", "content": { "application/json": { "schema": { @@ -5059,7 +5063,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5220,7 +5224,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or duplicate slug.", + "description": "Bad Request — validation error or duplicate slug.", "content": { "application/json": { "schema": { @@ -5230,7 +5234,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5392,7 +5396,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid slug parameter.", + "description": "Bad Request — invalid slug parameter.", "content": { "application/json": { "schema": { @@ -5402,7 +5406,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5412,7 +5416,7 @@ } }, "404": { - "description": "Not Found \u2014 API tool with the given slug does not exist.", + "description": "Not Found — API tool with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -5582,7 +5586,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error.", + "description": "Bad Request — validation error.", "content": { "application/json": { "schema": { @@ -5592,7 +5596,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5602,7 +5606,7 @@ } }, "404": { - "description": "Not Found \u2014 API tool with the given slug does not exist.", + "description": "Not Found — API tool with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -5657,7 +5661,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid slug parameter.", + "description": "Bad Request — invalid slug parameter.", "content": { "application/json": { "schema": { @@ -5667,7 +5671,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5677,7 +5681,7 @@ } }, "404": { - "description": "Not Found \u2014 API tool with the given slug does not exist.", + "description": "Not Found — API tool with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -5773,7 +5777,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or duplicate slug.", + "description": "Bad Request — validation error or duplicate slug.", "content": { "application/json": { "schema": { @@ -5783,7 +5787,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -5930,7 +5934,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid pagination parameters.", + "description": "Bad Request — invalid pagination parameters.", "content": { "application/json": { "schema": { @@ -5940,7 +5944,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6035,7 +6039,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid slug parameter.", + "description": "Bad Request — invalid slug parameter.", "content": { "application/json": { "schema": { @@ -6045,7 +6049,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6055,7 +6059,7 @@ } }, "404": { - "description": "Not Found \u2014 MCP server with the given slug does not exist.", + "description": "Not Found — MCP server with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -6158,7 +6162,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error.", + "description": "Bad Request — validation error.", "content": { "application/json": { "schema": { @@ -6168,7 +6172,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6178,7 +6182,7 @@ } }, "404": { - "description": "Not Found \u2014 MCP server with the given slug does not exist.", + "description": "Not Found — MCP server with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -6233,7 +6237,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid slug parameter.", + "description": "Bad Request — invalid slug parameter.", "content": { "application/json": { "schema": { @@ -6243,7 +6247,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6253,7 +6257,7 @@ } }, "404": { - "description": "Not Found \u2014 MCP server with the given slug does not exist.", + "description": "Not Found — MCP server with the given slug does not exist.", "content": { "application/json": { "schema": { @@ -6287,7 +6291,7 @@ }, "/ai-agents/agent-builder/tools/agent/{agentUid}": { "get": { - "operationId": "ComposioController_getAvailableIntegration", + "operationId": "ReadyToUseToolsController_getAvailableIntegration", "parameters": [ { "name": "agentUid", @@ -6347,7 +6351,7 @@ ], "responses": { "200": { - "description": "Available Composio tools retrieved successfully from integrations", + "description": "Available tool integrations retrieved successfully", "content": { "application/json": { "schema": { @@ -6425,7 +6429,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6459,7 +6463,7 @@ }, "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/actions": { "get": { - "operationId": "ComposioController_getAvailableComposioToolsForAgent", + "operationId": "ReadyToUseToolsController_getAvailableToolsForAgent", "parameters": [ { "name": "agentUid", @@ -6482,7 +6486,7 @@ ], "responses": { "200": { - "description": "Available Composio tools retrieved successfully from integrations" + "description": "Available tool actions retrieved successfully" } }, "security": [ @@ -6498,7 +6502,7 @@ }, "/ai-agents/agent-builder/agents/{agentUid}/tools/{slug}/authenticate": { "post": { - "operationId": "ComposioController_authenticateTool", + "operationId": "ReadyToUseToolsController_authenticateTool", "parameters": [ { "name": "agentUid", @@ -6539,10 +6543,11 @@ "apiKey": [] } ], - "summary": "Authenticate a Composio tool with OAuth", + "summary": "Authenticate Tool with OAuth", "tags": [ "Agent Builder Ready to Use Tools" - ] + ], + "description": "Initiates OAuth authentication for a ready-to-use tool integration. Use this endpoint to connect a tool (e.g., Gmail, Google Sheets) to an agent by generating an OAuth redirect URL.\n\n**Workflow:** After calling this endpoint, redirect the user to the returned URL to complete the OAuth flow." } }, "/ai-agents/agent-builder/frontend-actions": { @@ -6703,7 +6708,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid pagination parameters.", + "description": "Bad Request — invalid pagination parameters.", "content": { "application/json": { "schema": { @@ -6713,7 +6718,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6848,7 +6853,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error or duplicate trigger function.", + "description": "Bad Request — validation error or duplicate trigger function.", "content": { "application/json": { "schema": { @@ -6858,7 +6863,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -6994,7 +6999,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid ID parameter.", + "description": "Bad Request — invalid ID parameter.", "content": { "application/json": { "schema": { @@ -7004,7 +7009,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7014,7 +7019,7 @@ } }, "404": { - "description": "Not Found \u2014 frontend action with the given ID does not exist.", + "description": "Not Found — frontend action with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -7158,7 +7163,7 @@ } }, "400": { - "description": "Bad Request \u2014 validation error.", + "description": "Bad Request — validation error.", "content": { "application/json": { "schema": { @@ -7168,7 +7173,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7178,7 +7183,7 @@ } }, "404": { - "description": "Not Found \u2014 frontend action with the given ID does not exist.", + "description": "Not Found — frontend action with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -7233,7 +7238,7 @@ } }, "400": { - "description": "Bad Request \u2014 invalid ID parameter.", + "description": "Bad Request — invalid ID parameter.", "content": { "application/json": { "schema": { @@ -7243,7 +7248,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7253,7 +7258,7 @@ } }, "404": { - "description": "Not Found \u2014 frontend action with the given ID does not exist.", + "description": "Not Found — frontend action with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -7365,7 +7370,7 @@ } }, "400": { - "description": "Bad Request \u2014 missing appId header or invalid file metadata.", + "description": "Bad Request — missing appId header or invalid file metadata.", "content": { "application/json": { "schema": { @@ -7375,7 +7380,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7478,7 +7483,7 @@ } }, "400": { - "description": "Bad Request \u2014 missing appId header or invalid text detail data.", + "description": "Bad Request — missing appId header or invalid text detail data.", "content": { "application/json": { "schema": { @@ -7488,7 +7493,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7780,7 +7785,7 @@ } }, "400": { - "description": "Bad Request \u2014 missing appId header or uniqueId parameter.", + "description": "Bad Request — missing appId header or uniqueId parameter.", "content": { "application/json": { "schema": { @@ -7790,7 +7795,7 @@ } }, "401": { - "description": "Unauthorized \u2014 missing or invalid API key.", + "description": "Unauthorized — missing or invalid API key.", "content": { "application/json": { "schema": { @@ -7800,7 +7805,7 @@ } }, "404": { - "description": "Not Found \u2014 text detail with the given uniqueId does not exist.", + "description": "Not Found — text detail with the given uniqueId does not exist.", "content": { "application/json": { "schema": { @@ -8122,7 +8127,7 @@ }, "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/sync": { "patch": { - "description": "Triggers re-indexing for a specific knowledge base source by its type and unique ID. Use this endpoint to refresh the vector embeddings after the source content has been updated.", + "description": "Triggers re-indexing for a specific knowledge base source by its type and unique ID. Use this endpoint to sync the vector embeddings when the source content has been updated.\n\n**Source types:** Supports uploads, text entries, and website sources.", "operationId": "RagController_revectorizeSource", "parameters": [ { @@ -8138,7 +8143,7 @@ "name": "uniqueId", "required": true, "in": "path", - "description": "Unique source ID to revectorize", + "description": "Unique source ID to sync", "schema": { "type": "string" } @@ -8163,7 +8168,7 @@ "apiKey": [] } ], - "summary": "Resync Knowledge Base Source", + "summary": "Sync Knowledge Base Source", "tags": [ "knowledge-base" ] @@ -8208,10 +8213,11 @@ "apiKey": [] } ], - "summary": "Get status for multiple unique IDs", + "summary": "Poll Knowledge Base Status", "tags": [ "knowledge-base" - ] + ], + "description": "Retrieves the indexing status for one or more knowledge base sources by their IDs. Use this endpoint to monitor the progress of file uploads, text entries, or website crawls being indexed.\n\n**Batch support:** Accepts multiple IDs in a single request to efficiently check status across sources." } }, "/ai-agents/agent-builder/knowledge-base/website/scrape": { diff --git a/docs.json b/docs.json index 512686f7..5ad31363 100644 --- a/docs.json +++ b/docs.json @@ -5225,7 +5225,6 @@ "ai-agents/apis/get-source-pages", "ai-agents/apis/resync-knowledge-base-source", "ai-agents/apis/initiate-file-uploads", - "ai-agents/apis/delete-uploaded-file", "ai-agents/apis/create-text-detail", "ai-agents/apis/update-text-detail", "ai-agents/apis/poll-knowledge-base-status", @@ -5233,9 +5232,7 @@ "ai-agents/apis/remove-knowledge-base-files", "ai-agents/apis/scrape-website", "ai-agents/apis/scrape-single-page", - "ai-agents/apis/delete-website", "ai-agents/apis/get-discovered-urls", - "ai-agents/apis/get-sitemap-discovered-urls", "ai-agents/apis/process-discovered-urls", "ai-agents/apis/poll-discovered-urls-status", "ai-agents/apis/sync-discovered-urls" From 8bcc3d4b5d033737b724ae93555c7986338736cb Mon Sep 17 00:00:00 2001 From: Afroz khan Date: Fri, 6 Mar 2026 09:21:52 +0530 Subject: [PATCH 13/13] add DELETE endpoints for text, uploads, and website knowledge base sources --- ai-agent-service.json | 239 ++++++++++++++++++++++++++++++++++++++---- docs.json | 3 + 2 files changed, 220 insertions(+), 22 deletions(-) diff --git a/ai-agent-service.json b/ai-agent-service.json index da56340c..d4ea7c3d 100644 --- a/ai-agent-service.json +++ b/ai-agent-service.json @@ -7411,6 +7411,111 @@ ] } }, + "/ai-agents/agent-builder/knowledge-base/uploads/{uniqueId}": { + "delete": { + "description": "Deletes an uploaded file and all associated data from the knowledge base by its unique ID. Use this endpoint to permanently remove a file that was uploaded via the Initiate File Uploads endpoint.\n\n**Cleanup:** Removes the file, associated embeddings, and any agent references to this file.", + "operationId": "RagController_deleteUploadedFile", + "parameters": [ + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique upload ID to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Uploaded file deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "File and all associated data deleted successfully" + }, + "data": { + "type": "object", + "properties": { + "uploadId": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "deletedFromAgents": { + "type": "boolean" + }, + "vectorsDeleted": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — uploaded file with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete Uploaded File", + "tags": [ + "knowledge-base" + ] + } + }, "/ai-agents/agent-builder/knowledge-base/text": { "post": { "description": "Creates a new text-based knowledge base entry. Use this endpoint to add custom text content that agents can reference during conversations.\n\n**Processing:** Accepts a title and text content, converts it to a Markdown file, and adds it to the knowledge base for indexing.", @@ -7721,14 +7826,14 @@ ] }, "delete": { - "description": "Deletes a text-based knowledge base entry by its unique ID. Use this endpoint to remove text content from the knowledge base.\n\n**Cleanup:** The associated upload record and stored content are also removed.", - "operationId": "RagController_deleteTextDetail", + "description": "Deletes a text-based knowledge base entry and all associated data by its unique ID. Use this endpoint to permanently remove a text entry from the knowledge base.\n\n**Cleanup:** Removes the text content, associated embeddings, and any agent references to this entry.", + "operationId": "RagController_deleteText", "parameters": [ { "name": "uniqueId", "required": true, "in": "path", - "description": "Unique text detail ID to delete", + "description": "Unique text entry ID to delete", "schema": { "type": "string" } @@ -7736,7 +7841,7 @@ ], "responses": { "200": { - "description": "Text detail and all associated data deleted successfully", + "description": "Text entry deleted successfully", "content": { "application/json": { "schema": { @@ -7754,28 +7859,16 @@ "type": "object", "properties": { "uniqueId": { - "type": "string", - "description": "Unique identifier of the deleted text detail" + "type": "string" }, "fileName": { - "type": "string", - "description": "Name of the deleted file" - }, - "uniqueFileId": { - "type": "string", - "description": "Unique file identifier" + "type": "string" }, "deletedFromAgents": { - "type": "boolean", - "description": "Whether the file reference was removed from agents" + "type": "boolean" }, "vectorsDeleted": { - "type": "boolean", - "description": "Whether associated vector embeddings were deleted" - }, - "s3FileDeleted": { - "type": "boolean", - "description": "Whether the S3 file was deleted" + "type": "boolean" } } } @@ -7785,7 +7878,7 @@ } }, "400": { - "description": "Bad Request — missing appId header or uniqueId parameter.", + "description": "Bad Request.", "content": { "application/json": { "schema": { @@ -7805,7 +7898,7 @@ } }, "404": { - "description": "Not Found — text detail with the given uniqueId does not exist.", + "description": "Not Found — text entry with the given ID does not exist.", "content": { "application/json": { "schema": { @@ -9088,6 +9181,108 @@ "crawl-web-pages" ] } + }, + "/ai-agents/agent-builder/knowledge-base/website/{uniqueId}": { + "delete": { + "description": "Deletes a website crawl and all associated data from the knowledge base by its unique ID. Use this endpoint to permanently remove a website source that was added via the Scrape Website endpoint.\n\n**Cleanup:** Removes all crawled pages, associated embeddings, and any agent references to this website.", + "operationId": "CrawlWebPagesController_deleteWebsite", + "parameters": [ + { + "name": "uniqueId", + "required": true, + "in": "path", + "description": "Unique website crawl ID to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Website and all associated data deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Website and all associated data deleted successfully" + }, + "data": { + "type": "object", + "properties": { + "uniqueId": { + "type": "string" + }, + "deletedFromAgents": { + "type": "boolean" + }, + "vectorsDeleted": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found — website with the given ID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "Delete Website", + "tags": [ + "knowledge-base" + ] + } } }, "info": { diff --git a/docs.json b/docs.json index 5ad31363..754069bc 100644 --- a/docs.json +++ b/docs.json @@ -5225,13 +5225,16 @@ "ai-agents/apis/get-source-pages", "ai-agents/apis/resync-knowledge-base-source", "ai-agents/apis/initiate-file-uploads", + "ai-agents/apis/delete-uploaded-file", "ai-agents/apis/create-text-detail", "ai-agents/apis/update-text-detail", + "ai-agents/apis/delete-text-detail", "ai-agents/apis/poll-knowledge-base-status", "ai-agents/apis/add-knowledge-base-files", "ai-agents/apis/remove-knowledge-base-files", "ai-agents/apis/scrape-website", "ai-agents/apis/scrape-single-page", + "ai-agents/apis/delete-website", "ai-agents/apis/get-discovered-urls", "ai-agents/apis/process-discovered-urls", "ai-agents/apis/poll-discovered-urls-status",