diff --git a/ai-agent-service.json b/ai-agent-service.json new file mode 100644 index 000000000..d4ea7c3d3 --- /dev/null +++ b/ai-agent-service.json @@ -0,0 +1,10994 @@ +{ + "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" + } + } + } + } + } + } + } + }, + "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": "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", + "parameters": [], + "responses": { + "200": { + "description": "List of agents", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetAgentDetailDto" + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "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}": { + "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": "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", + "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": "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": { + "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" + } + } + } + } + } + }, + "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": "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", + "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" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "tags": [ + "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}": { + "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" + }, + "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": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ], + "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", + "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" + }, + "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": [ + { + "apiKey": [] + } + ], + "tags": [ + "Tools" + ], + "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", + "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": "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": { + "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. 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", + "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" + } + } + } + }, + "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": "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": { + "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 + } + } + } + } + } + } + }, + "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": "List Available Models", + "tags": [ + "Agent Builder" + ], + "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": { + "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": [] + } + } + ] + } + } + } + }, + "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": "List All Variables", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent Tools", + "tags": [ + "Agent Builder" + ], + "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": { + "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" + } + } + } + } + } + } + }, + "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", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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", + "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" + } + } + }, + "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": "List Agents", + "tags": [ + "Agent Builder" + ], + "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}": { + "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" + }, + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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", + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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", + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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 Agent", + "tags": [ + "Agent Builder" + ], + "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": { + "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": "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": { + "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": "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": { + "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": "List Custom Variables", + "tags": [ + "Agent Builder" + ], + "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", + "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 Custom Variable", + "tags": [ + "Agent Builder" + ], + "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}": { + "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 Custom Variable", + "tags": [ + "Agent Builder" + ], + "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", + "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 Custom Variable", + "tags": [ + "Agent Builder" + ], + "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": { + "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": "List API Tools", + "tags": [ + "Agent Builder API Tools" + ], + "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", + "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. 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}": { + "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 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", + "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": "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", + "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": "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": { + "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": "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", + "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": "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}": { + "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": "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", + "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": "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", + "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": "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}": { + "get": { + "operationId": "ReadyToUseToolsController_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 tool integrations retrieved successfully", + "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": "List Tool Integrations", + "tags": [ + "Agent Builder Ready to Use Tools" + ], + "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": { + "get": { + "operationId": "ReadyToUseToolsController_getAvailableToolsForAgent", + "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 tool actions retrieved successfully" + } + }, + "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": "ReadyToUseToolsController_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 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": { + "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": { + "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": "List Frontend Actions", + "tags": [ + "Agent Builder Frontend Actions" + ], + "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", + "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 Frontend Action", + "tags": [ + "Agent Builder Frontend Actions" + ], + "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}": { + "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" + }, + "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 Frontend Action", + "tags": [ + "Agent Builder Frontend Actions" + ], + "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", + "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" + }, + "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 Frontend Action", + "tags": [ + "Agent Builder Frontend Actions" + ], + "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", + "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 Frontend Action", + "tags": [ + "Agent Builder Frontend Actions" + ], + "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": "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": { + "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/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.", + "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 Entry", + "tags": [ + "knowledge-base" + ] + }, + "get": { + "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": { + "200": { + "description": "Text details retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ], + "summary": "List Text Entries", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/text/{uniqueId}": { + "get": { + "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": [ + { + "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 Text Entry", + "tags": [ + "knowledge-base" + ] + }, + "patch": { + "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": [ + { + "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 Text Entry", + "tags": [ + "knowledge-base" + ] + }, + "delete": { + "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 entry ID to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Text entry 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" + }, + "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 — text entry 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 Text Entry", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base": { + "get": { + "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": [ + { + "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": "List Knowledge Base Records", + "tags": [ + "knowledge-base" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/pages": { + "get": { + "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": [ + { + "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 Source Pages", + "tags": [ + "knowledge-base" + ] + } + }, + "/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 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": [ + { + "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 sync", + "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": "Sync Knowledge Base 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": "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": { + "post": { + "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": { + "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 Website", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/individual-page": { + "post": { + "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": { + "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 Single Page", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls": { + "get": { + "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": [ + { + "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", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process": { + "post": { + "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": [ + { + "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", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/status/poll": { + "post": { + "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": [ + { + "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": "Poll Discovered URLs Status", + "tags": [ + "crawl-web-pages" + ] + } + }, + "/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/sync": { + "patch": { + "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": [ + { + "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 Discovered URLs", + "tags": [ + "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": { + "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" + ] + }, + "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" + ] + } + } + } +} diff --git a/ai-agents/api-explorer.mdx b/ai-agents/api-explorer.mdx new file mode 100644 index 000000000..741ba6ee5 --- /dev/null +++ b/ai-agents/api-explorer.mdx @@ -0,0 +1,27 @@ +--- +title: "Agent Builder APIs" +sidebarTitle: "Overview" +--- + +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 Agent Builder APIs: + +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. + +--- + +## Authentication + +All Agent Builder 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/ai-agents/apis/add-api-tools-to-agent.mdx b/ai-agents/apis/add-api-tools-to-agent.mdx new file mode 100644 index 000000000..4ce051d37 --- /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 000000000..625ac296d --- /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 000000000..42012b753 --- /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 000000000..5a55fa451 --- /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 000000000..db2a3e1fd --- /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 000000000..57ec53ea6 --- /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 000000000..ea136b527 --- /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 000000000..833a8214b --- /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-byo-agent.mdx b/ai-agents/apis/create-byo-agent.mdx new file mode 100644 index 000000000..15246a836 --- /dev/null +++ b/ai-agents/apis/create-byo-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /ai-agents/agents +--- diff --git a/ai-agents/apis/create-custom-variable.mdx b/ai-agents/apis/create-custom-variable.mdx new file mode 100644 index 000000000..dbe5b6e56 --- /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 000000000..6ba5b596d --- /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 000000000..b93e051dd --- /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 000000000..564affd3c --- /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 000000000..eb1bd241f --- /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 000000000..c6fe50b21 --- /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-tool.mdx b/ai-agents/apis/create-tool.mdx new file mode 100644 index 000000000..535d26a45 --- /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 000000000..7ab99dc89 --- /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 000000000..bf04a9cd8 --- /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-byo-agent.mdx b/ai-agents/apis/delete-byo-agent.mdx new file mode 100644 index 000000000..933f56f31 --- /dev/null +++ b/ai-agents/apis/delete-byo-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /ai-agents/agents/{id} +--- diff --git a/ai-agents/apis/delete-custom-variable.mdx b/ai-agents/apis/delete-custom-variable.mdx new file mode 100644 index 000000000..7bec4b90e --- /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 000000000..196fc06aa --- /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 000000000..23745cf7c --- /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 000000000..7c6422e2b --- /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-tool.mdx b/ai-agents/apis/delete-tool.mdx new file mode 100644 index 000000000..424e4cb0e --- /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 000000000..f53ec6901 --- /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 000000000..9fff82254 --- /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 000000000..82e3a09e2 --- /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 000000000..e6b0efa43 --- /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 000000000..067a15f78 --- /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 000000000..4872f7750 --- /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 000000000..a9008230f --- /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 000000000..93766e4ed --- /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 000000000..4d8427cd0 --- /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 000000000..30114fdd0 --- /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 000000000..dfd5288e6 --- /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 000000000..c2f3bb5c3 --- /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 000000000..ee77362a3 --- /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 000000000..4eca2cf69 --- /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 000000000..61a21129d --- /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 000000000..22d5de3d7 --- /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 000000000..7070ced9c --- /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 000000000..eafbc6d65 --- /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 000000000..e29338e1b --- /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 000000000..7063cb29e --- /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 000000000..2f8b40045 --- /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 000000000..9cb5ff7c5 --- /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 000000000..7f3f00096 --- /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 000000000..5d4659edc --- /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 000000000..2a2888e5d --- /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 000000000..2c3b702c0 --- /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 000000000..6622aa86a --- /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 000000000..17063e41c --- /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 000000000..6317fda22 --- /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 000000000..c3c56a07a --- /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 000000000..72baf1a9f --- /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 000000000..249fff08e --- /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 000000000..5bea618f5 --- /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 000000000..a97b82ac8 --- /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 000000000..04acaf303 --- /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 000000000..2fcfb4ba6 --- /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 000000000..0f281a265 --- /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 000000000..ed4d944d3 --- /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 000000000..ff05facb4 --- /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 000000000..83c5d0c0f --- /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 000000000..e9ea65da8 --- /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-byo-agents.mdx b/ai-agents/apis/list-byo-agents.mdx new file mode 100644 index 000000000..471474bb6 --- /dev/null +++ b/ai-agents/apis/list-byo-agents.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /ai-agents/agents +--- diff --git a/ai-agents/apis/list-frontend-actions.mdx b/ai-agents/apis/list-frontend-actions.mdx new file mode 100644 index 000000000..4b4e15540 --- /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 000000000..1285ca240 --- /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 000000000..5586a048a --- /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 000000000..013fdd6d8 --- /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 000000000..3423ee219 --- /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-tools.mdx b/ai-agents/apis/list-tools.mdx new file mode 100644 index 000000000..e5c6b459a --- /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 000000000..0c74f4bfc --- /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 000000000..b28e053de --- /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 000000000..a8d419d0c --- /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 000000000..9b561e5e6 --- /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 000000000..c2ae8c5f7 --- /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 000000000..7c0556c6d --- /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 000000000..bc733cd63 --- /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 000000000..e7fbe2720 --- /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 000000000..0091876ca --- /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 000000000..562304b23 --- /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 000000000..c1da30244 --- /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 000000000..12ac66e7b --- /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 000000000..4e87ff062 --- /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 000000000..268a6a959 --- /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 000000000..91f50ab37 --- /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 000000000..2ffc6b3de --- /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-byo-agent.mdx b/ai-agents/apis/test-byo-agent.mdx new file mode 100644 index 000000000..dd2390d0d --- /dev/null +++ b/ai-agents/apis/test-byo-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 000000000..3c2af5af0 --- /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 000000000..d9ab3815c --- /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 000000000..5ce342fff --- /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-byo-agent.mdx b/ai-agents/apis/update-byo-agent.mdx new file mode 100644 index 000000000..19b403752 --- /dev/null +++ b/ai-agents/apis/update-byo-agent.mdx @@ -0,0 +1,3 @@ +--- +openapi: patch /ai-agents/agents/{id} +--- diff --git a/ai-agents/apis/update-custom-variable.mdx b/ai-agents/apis/update-custom-variable.mdx new file mode 100644 index 000000000..7a2c2b0ec --- /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 000000000..2b97786bb --- /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 000000000..423e86acb --- /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 000000000..425a8ca64 --- /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 000000000..3424307ae --- /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 000000000..28dfd41a3 --- /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-tool.mdx b/ai-agents/apis/update-tool.mdx new file mode 100644 index 000000000..551844389 --- /dev/null +++ b/ai-agents/apis/update-tool.mdx @@ -0,0 +1,3 @@ +--- +openapi: put /ai-agents/tools/{name} +--- diff --git a/ai-agents/byo-api-explorer.mdx b/ai-agents/byo-api-explorer.mdx new file mode 100644 index 000000000..257205124 --- /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 5e6b79214..754069bc6 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": [ { @@ -213,7 +220,7 @@ "pages": [ "fundamentals/webhooks-overview", "fundamentals/webhooks-management", - "fundamentals/webhooks-events", + "fundamentals/webhooks-events", "fundamentals/webhooks-legacy" ] }, @@ -240,11 +247,11 @@ "pages": [ "/widget/html/overview", "/widget/html/integration", - "/widget/html/advanced", + "/widget/html/advanced", { "group": " ", "pages": [ - "/widget/html/legacy" + "/widget/html/legacy" ] } ] @@ -891,7 +898,7 @@ "icon": "/images/icons/react.svg", "versions": [ { - "version": "v5\u200e", + "version": "v5‎", "groups": [ { "group": " ", @@ -978,7 +985,7 @@ ] }, { - "version": "v4\u200e", + "version": "v4‎", "groups": [ { "group": " ", @@ -1141,7 +1148,7 @@ ] }, { - "version": "v3\u200e", + "version": "v3‎", "groups": [ { "group": " ", @@ -1163,7 +1170,7 @@ ] }, { - "version": "v2\u200e", + "version": "v2‎", "groups": [ { "group": " ", @@ -1191,7 +1198,7 @@ "icon": "/images/icons/swift.svg", "versions": [ { - "version": "v5\u200e\u200e", + "version": "v5‎‎", "groups": [ { "group": " ", @@ -1296,7 +1303,7 @@ ] }, { - "version": "v4\u200e\u200e", + "version": "v4‎‎", "groups": [ { "group": " ", @@ -1460,7 +1467,7 @@ ] }, { - "version": "v3\u200e\u200e", + "version": "v3‎‎", "groups": [ { "group": " ", @@ -1482,7 +1489,7 @@ ] }, { - "version": "v2\u200e\u200e", + "version": "v2‎‎", "groups": [ { "group": " ", @@ -1510,7 +1517,7 @@ "icon": "/images/icons/android.svg", "versions": [ { - "version": "v5\u200e\u200e\u200e", + "version": "v5‎‎‎", "groups": [ { "group": " ", @@ -1613,7 +1620,7 @@ ] }, { - "version": "v4\u200e\u200e\u200e", + "version": "v4‎‎‎", "groups": [ { "group": " ", @@ -1770,7 +1777,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e", + "version": "v3‎‎‎", "groups": [ { "group": " ", @@ -1795,7 +1802,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e", + "version": "v2‎‎‎", "groups": [ { "group": " ", @@ -1824,7 +1831,7 @@ "icon": "/images/icons/flutter.svg", "versions": [ { - "version": "v5\u200e\u200e\u200e\u200e", + "version": "v5‎‎‎‎", "groups": [ { "group": " ", @@ -1931,7 +1938,7 @@ ] }, { - "version": "v4\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎", "groups": [ { "group": " ", @@ -2107,7 +2114,7 @@ "icon": "/images/icons/angular.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎", "groups": [ { "group": " ", @@ -2297,7 +2304,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎", "groups": [ { "group": " ", @@ -2318,7 +2325,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎", "groups": [ { "group": " ", @@ -2345,7 +2352,7 @@ "icon": "/images/icons/vuejs.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2438,7 +2445,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2460,7 +2467,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2492,7 +2499,7 @@ "icon": "/images/icons/js.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2625,7 +2632,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2748,7 +2755,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2851,7 +2858,7 @@ "icon": "/images/icons/react.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -2967,7 +2974,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3081,7 +3088,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3183,7 +3190,7 @@ "icon": "/images/icons/swift.svg", "versions": [ { - "version": "v4\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v4‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3306,7 +3313,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3424,7 +3431,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3531,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": " ", @@ -3646,7 +3653,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3766,7 +3773,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -3869,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": " ", @@ -3983,7 +3990,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -4088,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": " ", @@ -4196,7 +4203,7 @@ ] }, { - "version": "v3\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v3‎‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -4306,7 +4313,7 @@ ] }, { - "version": "v2\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e\u200e", + "version": "v2‎‎‎‎‎‎‎‎‎‎‎‎", "groups": [ { "group": " ", @@ -5096,6 +5103,158 @@ "/ai-chatbots/ai-bots/instructions", "/ai-chatbots/ai-bots/bots" ] + }, + { + "tab": "APIs", + "groups": [ + { + "group": "BYO Agent APIs", + "pages": [ + "ai-agents/byo-api-explorer", + { + "group": "BYO Agents", + "expanded": false, + "icon": "robot", + "pages": [ + "ai-agents/apis/create-byo-agent", + "ai-agents/apis/list-byo-agents", + "ai-agents/apis/update-byo-agent", + "ai-agents/apis/delete-byo-agent" + ] + }, + { + "group": "Tools", + "expanded": false, + "icon": "wrench", + "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", + "expanded": false, + "icon": "plug", + "pages": [ + "ai-agents/apis/list-integrations" + ] + } + ] + }, + { + "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", + "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", + "expanded": false, + "icon": "wrench", + "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", + "expanded": false, + "icon": "code", + "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", + "expanded": false, + "icon": "window", + "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", + "expanded": false, + "icon": "server", + "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", + "expanded": false, + "icon": "book", + "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/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", + "ai-agents/apis/sync-discovered-urls" + ] + }, + { + "group": "Variables", + "expanded": false, + "icon": "brackets-curly", + "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" + ] + } + ] + } + ] } ] }, @@ -5158,7 +5317,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" @@ -5894,62 +6053,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": { @@ -5962,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" } },