> For the complete documentation index, see [llms.txt](https://api.docs.blockbrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.docs.blockbrain.ai/getting-started/getting-started/create-knowledge-bot/create-knowledge-bot.md).

# Create Knowledge Bot (by API)

## Custom Knowledge Bots

A custom Knowledge Bots is only accessible by the creator. It is useful for testing your own configuration before deploying it to workshop and rolling out for all users in your organization.

Read the deep-dive of [Knowledge Bots](/concepts/knowledge-bots.md) in the [Broken mention](broken://pages/wJmnH4N2QokcpzWuN7QE) section to gain a deeper understanding.

## Creating a Custom Knowledge Bot via API

Use this example request to create a new custom bot:

## POST /cortex/bot

> Create Cortex Bot

```json
{"openapi":"3.1.0","info":{"title":"Blockbrain Knowledge Bots","version":"0.2.6"},"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"BotCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iconurl"},"systemMessage":{"type":"string","title":"Systemmessage"},"defaultGreetings":{"type":"string","title":"Defaultgreetings"},"isDefaultBot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isdefaultbot","default":false},"isEnableInitialQuestions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isenableinitialquestions","default":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","default":[]},"isPublic":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ispublic","default":false},"followUp":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Followup"},"botTemplate":{"$ref":"#/components/schemas/BotTemplateType","default":"retriever"},"defaultLanguage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultlanguage","default":"English"},"elvLabApiKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elvlabapikey"},"voiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voiceid"},"ttsOption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ttsoption"},"enableVisualRetrieval":{"type":"boolean","title":"Enablevisualretrieval","default":false},"enableVoiceInput":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enablevoiceinput","default":true},"enableInlineCitation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enableinlinecitation","default":false},"isReferencesEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isreferencesenabled","default":true},"searchMethodType":{"anyOf":[{"$ref":"#/components/schemas/SearchMethodType"},{"type":"null"}],"default":1},"model":{"$ref":"#/components/schemas/AIModel"},"modelsFavorites":{"anyOf":[{"items":{"$ref":"#/components/schemas/AIModel"},"type":"array"},{"type":"null"}],"title":"Modelsfavorites"},"agentsFavorites":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agentsfavorites"},"topk":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Topk","default":5},"advanceOptions":{"$ref":"#/components/schemas/ConvoAdvanceOptions","default":{"temperature":0.7,"topP":1,"presencePenalty":0,"frequencyPenalty":0}},"enableDefaultIntentAgent":{"type":"boolean","title":"Enabledefaultintentagent","default":false},"enableDefaultWebSearch":{"type":"boolean","title":"Enabledefaultwebsearch","default":false},"defaultWebSearchConfig":{"anyOf":[{"$ref":"#/components/schemas/DefaultWebSearchConfig"},{"type":"null"}]},"knowledgeBase":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Knowledgebase"},"strategies":{"anyOf":[{"items":{"$ref":"#/components/schemas/CortexStrategyCreateRequest"},"type":"array"},{"type":"null"}],"title":"Strategies","default":[]},"enableAutoResponse":{"type":"boolean","title":"Enableautoresponse","default":false},"followUpPrompt":{"type":"string","title":"Followupprompt"},"summaryPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summaryprompt","default":""},"workflows":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowCreateRequestDTO"},"type":"array"},{"type":"null"}],"title":"Workflows","default":[]},"agentTasks":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentTaskBot"},"type":"array"},{"type":"null"}],"title":"Agenttasks","default":[]},"advancedSetting":{"anyOf":[{"$ref":"#/components/schemas/AdvancedSettingCreateDTO"},{"type":"null"}]},"contributedDatabase":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Contributeddatabase","default":[]},"isTemplate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Istemplate","default":false},"chatMode":{"anyOf":[{"$ref":"#/components/schemas/ChatMode"},{"type":"null"}],"description":"The default chat mode for all new conversations","default":"normal"},"mobileAccessMode":{"anyOf":[{"$ref":"#/components/schemas/MobileAccessMode"},{"type":"null"}],"default":"off"},"dataRetentionConfig":{"anyOf":[{"$ref":"#/components/schemas/DataRetentionConfig"},{"type":"null"}]},"shareConfig":{"anyOf":[{"$ref":"#/components/schemas/ShareConfig"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"agentConfig":{"anyOf":[{"$ref":"#/components/schemas/AgentConfig"},{"type":"null"}]}},"type":"object","required":["name","systemMessage","defaultGreetings","model","followUpPrompt"],"title":"BotCreateRequest"},"BotTemplateType":{"type":"string","enum":["retriever","nexus"],"title":"BotTemplateType"},"SearchMethodType":{"type":"integer","enum":[1,2,3],"title":"SearchMethodType"},"AIModel":{"type":"string","enum":["gpt-3.5-turbo","gpt-4","gpt-4-1106-preview","gpt-4-vision","gpt-4o","gpt-4o-mini","gpt-45","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5-chat","openai-o1","openai-o1-mini","openai-o3-mini","openai-o3","openai-o4-mini","openai-o3-pro","openai-gpt-4o-realtime-audio","azure-gpt-35-turbo","azure-gpt-4","azure-gpt-4-turbo","azure-gpt-4-turbo-vision","azure-gpt-4o","azure-gpt-4o-mini","azure-gpt-41","azure-gpt-41-mini","azure-gpt-41-nano","azure-gpt-5","azure-gpt-5-mini","azure-gpt-5-nano","azure-gpt-5-chat","azure-model-router","azure-openai-o1","azure-openai-o1-mini","azure-openai-o3-mini","azure-openai-o3","azure-openai-o4-mini","azure-openai-o3-pro","azure-gpt-4o-realtime-audio","azure-ai-deepseek-r1-us","anthropic-claude-v3-opus","anthropic-claude-v3-sonnet","anthropic-claude-v3-haiku","anthropic-claude-v3.5-sonnet","anthropic-claude-v3.5-sonnet-v2","anthropic-claude-v3.7-sonnet","anthropic-claude-v3.7-sonnet-thinking-mode","anthropic-claude-opus-4","anthropic-claude-sonnet-4","anthropic-claude-opus-4.1","google-gemini","google-gemini-1.0-vision","google-gemini-1.5-pro","google-gemini-1.5-flash","google-gemini-2.0-flash","google-gemini-2.0-flash-thinking-mode","google-gemini-2.0-flash-lite","google-gemini-2.5-pro","google-gemini-2.5-flash","google-gemini-2.5-flash-lite","google-vertex-gemma-2","google-vertex-mistral-large","google-vertex-mistral-nemo","google-vertex-codestral","google-anthropic-claude-v3-opus","google-anthropic-claude-v3-sonnet","google-anthropic-claude-v3-haiku","google-anthropic-claude-v3.5-sonnet","google-anthropic-claude-v3.5-sonnet-v2","google-anthropic-claude-v3.5-haiku","google-anthropic-claude-v3.7-sonnet","google-anthropic-claude-v3.7-sonnet-thinking-mode","google-anthropic-claude-opus-4","google-anthropic-claude-sonnet-4","google-anthropic-claude-opus-4.1","google-llama-405b-maas","google-llama-70b-maas","google-llama-8b-maas","google-llama-32-90b-vision-maas","google-llama-4-scout-17b-16e-maas","google-llama-4-maverick-17b-128e-maas","google-vertex-ai21-jamba-large","google-vertex-ai21-jamba-mini","deepseek-chat-v3","deepseek-reasoner","nebius-deepseek-chat-v3","nebius-deepseek-r1","xai-grok-3","xai-grok-3-mini","xai-grok-3-mini-thinking-mode","xai-grok-2-vision","xai-grok-4","mistral-medium","mistral-small","mistral-large","magistral-medium"],"title":"AIModel"},"ConvoAdvanceOptions":{"properties":{"temperature":{"type":"number","maximum":2,"minimum":0,"title":"Temperature","default":0.7},"topP":{"type":"number","maximum":1,"minimum":0,"title":"Topp","default":1},"presencePenalty":{"type":"number","maximum":2,"minimum":-2,"title":"Presencepenalty","default":0},"frequencyPenalty":{"type":"number","maximum":2,"minimum":-2,"title":"Frequencypenalty","default":0}},"type":"object","title":"ConvoAdvanceOptions"},"DefaultWebSearchConfig":{"properties":{"webSearchProvider":{"$ref":"#/components/schemas/WebSearchProvider","default":"linkup_normal_web_search"}},"type":"object","title":"DefaultWebSearchConfig"},"WebSearchProvider":{"type":"string","enum":["linkup_normal_web_search","linkup_pro_web_search","linkup_pro_r_web_search","tavily_normal_web_search","tavily_pro_web_search","tavily_pro_r_web_search","perplexity_normal_web_search","perplexity_pro_web_search"],"title":"WebSearchProvider"},"CortexStrategyCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"icon":{"type":"string","title":"Icon","description":"icon key from heroicons","default":""},"actions":{"items":{"$ref":"#/components/schemas/CortextActionCreateRequest"},"type":"array","title":"Actions"},"scopes":{"items":{"$ref":"#/components/schemas/CortexStrategyScope"},"type":"array","title":"Scopes","default":["scope-bot","scope-user"]},"isDefault":{"type":"boolean","title":"Isdefault","default":true},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","required":["name","actions"],"title":"CortexStrategyCreateRequest"},"CortextActionCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"prompt":{"type":"string","title":"Prompt"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"icon key from heroicons","default":""},"isDefault":{"type":"boolean","title":"Isdefault","default":true},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","required":["name","prompt"],"title":"CortextActionCreateRequest"},"CortexStrategyScope":{"type":"string","enum":["scope-user","scope-bot"],"title":"CortexStrategyScope"},"WorkflowCreateRequestDTO":{"properties":{"botId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botid"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"isDefault":{"type":"boolean","title":"Isdefault","default":false},"runModeDefault":{"$ref":"#/components/schemas/WorkFlowRunMode","default":"run_all_step"},"workflowSteps":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/WorkflowPromptStepCreateRequestDTO"},{"$ref":"#/components/schemas/WorkflowIntegrationStepCreateRequestDTO"}]},"type":"array"},{"type":"null"}],"title":"Workflowsteps","default":[]}},"additionalProperties":true,"type":"object","required":["name","description"],"title":"WorkflowCreateRequestDTO"},"WorkFlowRunMode":{"type":"string","enum":["step_by_step","run_all_step"],"title":"WorkFlowRunMode"},"WorkflowPromptStepCreateRequestDTO":{"properties":{"workflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflowid"},"stepType":{"$ref":"#/components/schemas/WorkflowStepType","description":"Type of the step, e.g., 'prompt' or 'integration'","default":"prompt"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the step, applicable to 'prompt' steps"},"runModeDefault":{"$ref":"#/components/schemas/WorkFlowStepRunMode","default":"run_all_step"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Prompt for the user, applicable to 'prompt' steps"},"model":{"anyOf":[{"$ref":"#/components/schemas/AIModel"},{"type":"null"}],"description":"Applicable only to 'prompt' steps"},"advanceOptions":{"$ref":"#/components/schemas/AdvanceOptions","default":{"temperature":0.7,"topP":1,"presencePenalty":0,"frequencyPenalty":0}},"isWebSearchEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Iswebsearchenabled","default":false},"webSearchType":{"anyOf":[{"$ref":"#/components/schemas/WebSearchType"},{"type":"null"}],"default":"normal_web_search"},"webSearchConfig":{"anyOf":[{"$ref":"#/components/schemas/WebSearchConfig"},{"type":"null"}]}},"type":"object","title":"WorkflowPromptStepCreateRequestDTO"},"WorkflowStepType":{"type":"string","enum":["prompt","integration"],"title":"WorkflowStepType"},"WorkFlowStepRunMode":{"type":"string","enum":["step_by_step","run_all_step"],"title":"WorkFlowStepRunMode"},"AdvanceOptions":{"properties":{"temperature":{"type":"number","maximum":2,"minimum":0,"title":"Temperature","default":0.7},"topP":{"type":"number","maximum":1,"minimum":0,"title":"Topp","default":1},"presencePenalty":{"type":"number","maximum":2,"minimum":-2,"title":"Presencepenalty","default":0},"frequencyPenalty":{"type":"number","maximum":2,"minimum":-2,"title":"Frequencypenalty","default":0}},"type":"object","title":"AdvanceOptions"},"WebSearchType":{"type":"string","enum":["normal_web_search","pro_web_search","pro_r_web_search"],"title":"WebSearchType"},"WebSearchConfig":{"properties":{"webSearchProvider":{"$ref":"#/components/schemas/WebSearchProvider","default":"linkup_normal_web_search"},"isLinkupDeepSearch":{"type":"boolean","title":"Islinkupdeepsearch","default":false}},"type":"object","title":"WebSearchConfig"},"WorkflowIntegrationStepCreateRequestDTO":{"properties":{"workflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflowid"},"stepType":{"$ref":"#/components/schemas/WorkflowStepType","description":"Type of the step, e.g., 'prompt' or 'integration'","default":"prompt"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the step, applicable to 'prompt' steps"},"runModeDefault":{"$ref":"#/components/schemas/WorkFlowStepRunMode","default":"run_all_step"},"apiUrl":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Apiurl","description":"The endpoint URL for the integration API."},"attachPreviousStepOutput":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attachpreviousstepoutput","description":"Attach previous step output.","default":false},"auth":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/WorkflowIntegrationStepAuthenticationBasic"},{"$ref":"#/components/schemas/WorkflowIntegrationStepAuthenticationBearer"}],"discriminator":{"propertyName":"type","mapping":{"basic":"#/components/schemas/WorkflowIntegrationStepAuthenticationBasic","bearer":"#/components/schemas/WorkflowIntegrationStepAuthenticationBearer"}}},{"type":"null"}],"title":"Auth","description":"Authentication details for the integration API."},"headers":{"items":{"$ref":"#/components/schemas/WorkflowIntegrationStepHeader"},"type":"array","title":"Headers","description":"Optional headers to include in the API request.","default":[]},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload","description":"Optional payload to include in the API request."},"queryParams":{"items":{"$ref":"#/components/schemas/WorkflowIntegrationStepQueryParam"},"type":"array","title":"Queryparams","description":"Optional query parameters to include in the API request.","default":[]},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE","OPTIONS","HEAD"],"title":"Method","description":"HTTP method to use, e.g., 'GET', 'POST'.","default":"GET"},"timeout":{"type":"integer","title":"Timeout","description":"Timeout for the API request in seconds.","default":10},"retries":{"type":"integer","title":"Retries","description":"Number of retries for the API request.","default":3}},"type":"object","required":["apiUrl"],"title":"WorkflowIntegrationStepCreateRequestDTO"},"WorkflowIntegrationStepAuthenticationBasic":{"properties":{"type":{"type":"string","const":"basic","title":"Type","description":"The authentication type.","default":"basic"},"username":{"type":"string","title":"Username","description":"The username for basic authentication."},"password":{"type":"string","title":"Password","description":"The password for basic authentication."}},"type":"object","required":["username","password"],"title":"WorkflowIntegrationStepAuthenticationBasic"},"WorkflowIntegrationStepAuthenticationBearer":{"properties":{"type":{"type":"string","const":"bearer","title":"Type","description":"The authentication type.","default":"bearer"},"token":{"type":"string","title":"Token","description":"The token for bearer authentication."}},"type":"object","required":["token"],"title":"WorkflowIntegrationStepAuthenticationBearer"},"WorkflowIntegrationStepHeader":{"properties":{"key":{"type":"string","title":"Key","description":"The header key."},"value":{"type":"string","title":"Value","description":"The header value."},"isActive":{"type":"boolean","title":"Isactive","description":"Whether the header should be activated.","default":true}},"type":"object","required":["key","value"],"title":"WorkflowIntegrationStepHeader"},"WorkflowIntegrationStepQueryParam":{"properties":{"key":{"type":"string","title":"Key","description":"The header key."},"value":{"type":"string","title":"Value","description":"The header value."},"isActive":{"type":"boolean","title":"Isactive","description":"Whether the header should be activated.","default":true}},"type":"object","required":["key","value"],"title":"WorkflowIntegrationStepQueryParam"},"AgentTaskBot":{"properties":{"agentTaskId":{"type":"string","title":"Agenttaskid"},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive"},"isSelected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isselected"}},"type":"object","required":["agentTaskId"],"title":"AgentTaskBot"},"AdvancedSettingCreateDTO":{"properties":{"botId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botid"},"isBotTemplate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isbottemplate","default":false},"advancedFeatures":{"items":{"$ref":"#/components/schemas/AdvancedFeatureDTO"},"type":"array","title":"Advancedfeatures","default":[]},"actionButtons":{"items":{"$ref":"#/components/schemas/ActionButtonDTO"},"type":"array","title":"Actionbuttons","default":[]}},"type":"object","title":"AdvancedSettingCreateDTO"},"AdvancedFeatureDTO":{"properties":{"key":{"type":"string","title":"Key"},"isActive":{"type":"boolean","title":"Isactive","default":false}},"type":"object","required":["key"],"title":"AdvancedFeatureDTO"},"ActionButtonDTO":{"properties":{"key":{"type":"string","title":"Key"},"isRight":{"type":"boolean","title":"Isright","default":false},"index":{"type":"number","title":"Index"},"isActive":{"type":"boolean","title":"Isactive","default":false}},"type":"object","required":["key","index"],"title":"ActionButtonDTO"},"ChatMode":{"type":"string","enum":["normal","system_agent","code_interpreter","schunk_sap_agent","harting_agent"],"title":"ChatMode"},"MobileAccessMode":{"type":"string","enum":["off","on_v1","on_v2"],"title":"MobileAccessMode"},"DataRetentionConfig":{"properties":{"isTemporary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Istemporary"},"retentionPeriodDay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retentionperiodday"},"enableDataRetention":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabledataretention"}},"type":"object","title":"DataRetentionConfig"},"ShareConfig":{"properties":{"accessMode":{"$ref":"#/components/schemas/BotAccessMode","default":"private"},"userAccess":{"anyOf":[{"items":{"$ref":"#/components/schemas/BotUserAccessCreateRequest"},"type":"array"},{"type":"null"}],"title":"Useraccess","default":[]},"groupAccess":{"anyOf":[{"items":{"$ref":"#/components/schemas/BotGroupAccessCreateRequest"},"type":"array"},{"type":"null"}],"title":"Groupaccess","default":[]}},"type":"object","title":"ShareConfig"},"BotAccessMode":{"type":"string","enum":["private","restricted","any-one-with-link"],"title":"BotAccessMode"},"BotUserAccessCreateRequest":{"properties":{"userId":{"type":"string","title":"Userid"},"accessLevel":{"$ref":"#/components/schemas/BotAccessLevel"}},"type":"object","required":["userId","accessLevel"],"title":"BotUserAccessCreateRequest"},"BotAccessLevel":{"type":"string","enum":["owner","editor","user"],"title":"BotAccessLevel"},"BotGroupAccessCreateRequest":{"properties":{"groupId":{"type":"string","title":"Groupid"},"accessLevel":{"$ref":"#/components/schemas/BotAccessLevel"}},"type":"object","required":["groupId","accessLevel"],"title":"BotGroupAccessCreateRequest"},"AgentConfig":{"properties":{"capabilities":{"additionalProperties":{"$ref":"#/components/schemas/AgentConfigCapability"},"type":"object","title":"Capabilities"}},"type":"object","title":"AgentConfig"},"AgentConfigCapability":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"AgentConfigCapability"},"CortexBot":{"properties":{"_id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid"},"parentCortexBot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcortexbot"},"name":{"type":"string","title":"Name"},"iconUrl":{"type":"string","title":"Iconurl"},"systemMessage":{"type":"string","title":"Systemmessage"},"defaultGreetings":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultgreetings","default":""},"isDefaultBot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isdefaultbot","default":false},"isEnableInitialQuestions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isenableinitialquestions","default":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","default":[]},"isPublic":{"type":"boolean","title":"Ispublic","description":"Sharing Preference","default":false},"followUp":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Followup"},"botTemplate":{"$ref":"#/components/schemas/BotTemplateType","default":"nexus"},"elvLabApiKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elvlabapikey"},"voiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voiceid"},"ttsOption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ttsoption"},"enableVisualRetrieval":{"type":"boolean","title":"Enablevisualretrieval","default":false},"enableVoiceInput":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enablevoiceinput","default":true},"enableInlineCitation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enableinlinecitation","default":false},"isReferencesEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isreferencesenabled","default":true},"searchMethodType":{"anyOf":[{"$ref":"#/components/schemas/SearchMethodType"},{"type":"null"}],"default":1},"model":{"$ref":"#/components/schemas/AIModel","default":"azure-gpt-4o"},"modelsFavorites":{"anyOf":[{"items":{"$ref":"#/components/schemas/AIModel"},"type":"array"},{"type":"null"}],"title":"Modelsfavorites"},"agentsFavorites":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agentsfavorites"},"topk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Topk","default":6},"advanceOptions":{"$ref":"#/components/schemas/ConvoAdvanceOptions","default":{"temperature":0.7,"topP":1,"presencePenalty":0,"frequencyPenalty":0}},"knowledgeBase":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Knowledgebase"},"contributedDatabase":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Contributeddatabase","default":[]},"strategies":{"anyOf":[{"items":{"$ref":"#/components/schemas/CortexStrategy"},"type":"array"},{"type":"null"}],"title":"Strategies","default":[]},"enableAutoResponse":{"type":"boolean","title":"Enableautoresponse","default":false},"followUpPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Followupprompt","default":""},"summaryPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summaryprompt","default":""},"isArchived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isarchived","default":false},"archivedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archivedby"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archivedat"},"isOwnerArchived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isownerarchived","default":false},"chatMode":{"anyOf":[{"$ref":"#/components/schemas/ChatMode"},{"type":"null"}],"default":"normal"},"isTemplate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Istemplate","default":false},"enableDefaultIntentAgent":{"type":"boolean","title":"Enabledefaultintentagent","default":false},"enableDefaultWebSearch":{"type":"boolean","title":"Enabledefaultwebsearch","default":false},"defaultWebSearchConfig":{"anyOf":[{"$ref":"#/components/schemas/DefaultWebSearchConfig"},{"type":"null"}]},"mobileAccessMode":{"anyOf":[{"$ref":"#/components/schemas/MobileAccessMode"},{"type":"null"}],"default":"off"},"dataRetentionConfig":{"anyOf":[{"$ref":"#/components/schemas/DataRetentionConfig"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"agentsConfig":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AgentConfig"},"type":"object"},{"type":"null"}],"title":"Agentsconfig"}},"type":"object","required":["name","systemMessage"],"title":"CortexBot"},"CortexStrategy":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"icon":{"type":"string","title":"Icon","description":"icon key from heroicons","default":""},"actions":{"items":{"$ref":"#/components/schemas/CortextAction"},"type":"array","title":"Actions"},"scopes":{"items":{"$ref":"#/components/schemas/CortexStrategyScope"},"type":"array","title":"Scopes","default":["scope-bot","scope-user"]},"isDefault":{"type":"boolean","title":"Isdefault","default":true}},"type":"object","required":["name","actions"],"title":"CortexStrategy"},"CortextAction":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"icon key from heroicons","default":""},"prompt":{"type":"string","title":"Prompt"},"isDefault":{"type":"boolean","title":"Isdefault","default":true}},"type":"object","required":["name","prompt"],"title":"CortextAction"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/cortex/bot":{"post":{"tags":["cortex","cortex bot"],"summary":"Create Cortex Bot","operationId":"create_cortex_bot_cortex_bot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CortexBot"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

Once your new bot created, you can use the `_id` field, to request infos about your new bot.

## GET /cortex/active-bot/{bot\_id}

> Get Active Bot Details

```json
{"openapi":"3.1.0","info":{"title":"Blockbrain Knowledge Bots","version":"0.2.6"},"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"SelectedActiveBotDetail":{"properties":{"_id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"},"name":{"type":"string","title":"Name"},"iconSignedUrl":{"type":"string","title":"Iconsignedurl"},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iconurl"},"voiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voiceid"},"parentCortexBot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcortexbot"},"strategies":{"anyOf":[{"items":{"$ref":"#/components/schemas/CortexStrategyResponse"},"type":"array"},{"type":"null"}],"title":"Strategies","default":[]},"enableVoiceInput":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enablevoiceinput","default":true},"model":{"$ref":"#/components/schemas/AIModel"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"agentsConfig":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AgentConfig"},"type":"object"},{"type":"null"}],"title":"Agentsconfig"},"modelsFavorites":{"anyOf":[{"items":{"$ref":"#/components/schemas/AIModel"},"type":"array"},{"type":"null"}],"title":"Modelsfavorites"},"agentsFavorites":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agentsfavorites"},"searchMethodType":{"anyOf":[{"$ref":"#/components/schemas/SearchMethodType"},{"type":"null"}],"default":1},"agentTaskCategories":{"items":{"$ref":"#/components/schemas/AgentTaskGroupByCategoryDetailedDTO"},"type":"array","title":"Agenttaskcategories","default":[]},"workflows":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowDetailedDTO"},"type":"array"},{"type":"null"}],"title":"Workflows","default":[]},"draft_note":{"anyOf":[{"$ref":"#/components/schemas/DraftNote"},{"type":"null"}]},"botTemplate":{"$ref":"#/components/schemas/BotTemplateType"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archivedat"},"knowledgeBase":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Knowledgebase"},"contributedDatabase":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Contributeddatabase","default":[]},"advancedSetting":{"anyOf":[{"$ref":"#/components/schemas/AdvancedSettingDetailedDTO"},{"type":"null"}]},"isPublic":{"type":"boolean","title":"Ispublic","description":"Sharing Preference","default":false},"isEditor":{"type":"boolean","title":"Iseditor","default":false},"chatMode":{"$ref":"#/components/schemas/ChatMode","default":"normal"},"enableReranker":{"type":"boolean","title":"Enablereranker","default":true},"enableAgentRetrieval":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enableagentretrieval","default":false},"isTemplate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Istemplate","default":false},"enableDefaultIntentAgent":{"type":"boolean","title":"Enabledefaultintentagent","default":false},"enableDefaultWebSearch":{"type":"boolean","title":"Enabledefaultwebsearch","default":false},"defaultWebSearchConfig":{"anyOf":[{"$ref":"#/components/schemas/DefaultWebSearchConfig"},{"type":"null"}]},"dataRetentionConfig":{"anyOf":[{"$ref":"#/components/schemas/DataRetentionConfig"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/BotStatus"},{"type":"null"}],"default":"active"},"keysNotification":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keysnotification","default":[]},"mobileAccessMode":{"anyOf":[{"$ref":"#/components/schemas/MobileAccessMode"},{"type":"null"}],"default":"off"},"parentAccessMode":{"$ref":"#/components/schemas/BotAccessMode","default":"private"},"isCompanyGptBot":{"type":"boolean","title":"Iscompanygptbot","default":false}},"type":"object","required":["_id","createdAt","modifiedAt","name","iconSignedUrl","iconUrl","model","botTemplate","knowledgeBase"],"title":"SelectedActiveBotDetail"},"CortexStrategyResponse":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"icon":{"type":"string","title":"Icon","description":"icon key from heroicons","default":""},"actions":{"items":{"$ref":"#/components/schemas/CortextActionResponse"},"type":"array","title":"Actions"},"scopes":{"items":{"$ref":"#/components/schemas/CortexStrategyScope"},"type":"array","title":"Scopes","default":["scope-bot","scope-user"]},"isDefault":{"type":"boolean","title":"Isdefault","default":true}},"type":"object","required":["name","actions"],"title":"CortexStrategyResponse"},"CortextActionResponse":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug","default":""},"prompt":{"type":"string","title":"Prompt","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"icon key from heroicons","default":""},"isDefault":{"type":"boolean","title":"Isdefault","default":true}},"type":"object","required":["name"],"title":"CortextActionResponse"},"CortexStrategyScope":{"type":"string","enum":["scope-user","scope-bot"],"title":"CortexStrategyScope"},"AIModel":{"type":"string","enum":["gpt-3.5-turbo","gpt-4","gpt-4-1106-preview","gpt-4-vision","gpt-4o","gpt-4o-mini","gpt-45","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5-chat","openai-o1","openai-o1-mini","openai-o3-mini","openai-o3","openai-o4-mini","openai-o3-pro","openai-gpt-4o-realtime-audio","azure-gpt-35-turbo","azure-gpt-4","azure-gpt-4-turbo","azure-gpt-4-turbo-vision","azure-gpt-4o","azure-gpt-4o-mini","azure-gpt-41","azure-gpt-41-mini","azure-gpt-41-nano","azure-gpt-5","azure-gpt-5-mini","azure-gpt-5-nano","azure-gpt-5-chat","azure-model-router","azure-openai-o1","azure-openai-o1-mini","azure-openai-o3-mini","azure-openai-o3","azure-openai-o4-mini","azure-openai-o3-pro","azure-gpt-4o-realtime-audio","azure-ai-deepseek-r1-us","anthropic-claude-v3-opus","anthropic-claude-v3-sonnet","anthropic-claude-v3-haiku","anthropic-claude-v3.5-sonnet","anthropic-claude-v3.5-sonnet-v2","anthropic-claude-v3.7-sonnet","anthropic-claude-v3.7-sonnet-thinking-mode","anthropic-claude-opus-4","anthropic-claude-sonnet-4","anthropic-claude-opus-4.1","google-gemini","google-gemini-1.0-vision","google-gemini-1.5-pro","google-gemini-1.5-flash","google-gemini-2.0-flash","google-gemini-2.0-flash-thinking-mode","google-gemini-2.0-flash-lite","google-gemini-2.5-pro","google-gemini-2.5-flash","google-gemini-2.5-flash-lite","google-vertex-gemma-2","google-vertex-mistral-large","google-vertex-mistral-nemo","google-vertex-codestral","google-anthropic-claude-v3-opus","google-anthropic-claude-v3-sonnet","google-anthropic-claude-v3-haiku","google-anthropic-claude-v3.5-sonnet","google-anthropic-claude-v3.5-sonnet-v2","google-anthropic-claude-v3.5-haiku","google-anthropic-claude-v3.7-sonnet","google-anthropic-claude-v3.7-sonnet-thinking-mode","google-anthropic-claude-opus-4","google-anthropic-claude-sonnet-4","google-anthropic-claude-opus-4.1","google-llama-405b-maas","google-llama-70b-maas","google-llama-8b-maas","google-llama-32-90b-vision-maas","google-llama-4-scout-17b-16e-maas","google-llama-4-maverick-17b-128e-maas","google-vertex-ai21-jamba-large","google-vertex-ai21-jamba-mini","deepseek-chat-v3","deepseek-reasoner","nebius-deepseek-chat-v3","nebius-deepseek-r1","xai-grok-3","xai-grok-3-mini","xai-grok-3-mini-thinking-mode","xai-grok-2-vision","xai-grok-4","mistral-medium","mistral-small","mistral-large","magistral-medium"],"title":"AIModel"},"AgentConfig":{"properties":{"capabilities":{"additionalProperties":{"$ref":"#/components/schemas/AgentConfigCapability"},"type":"object","title":"Capabilities"}},"type":"object","title":"AgentConfig"},"AgentConfigCapability":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"AgentConfigCapability"},"SearchMethodType":{"type":"integer","enum":[1,2,3],"title":"SearchMethodType"},"AgentTaskGroupByCategoryDetailedDTO":{"properties":{"category":{"anyOf":[{"$ref":"#/components/schemas/AgentCategoryDetailedDTO"},{"type":"null"}]},"agentTasks":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentDetailDTO"},"type":"array"},{"type":"null"}],"title":"Agenttasks","default":[]}},"type":"object","title":"AgentTaskGroupByCategoryDetailedDTO"},"AgentCategoryDetailedDTO":{"properties":{"_id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"},"icon":{"type":"string","title":"Icon"},"name":{"type":"string","title":"Name"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"isPublic":{"type":"boolean","title":"Ispublic","default":false},"isTemplate":{"type":"boolean","title":"Istemplate","default":false}},"type":"object","required":["_id","createdAt","modifiedAt","icon","name"],"title":"AgentCategoryDetailedDTO"},"AgentDetailDTO":{"properties":{"_id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"$ref":"#/components/schemas/AgentTaskType","default":"custom"},"isFavorite":{"type":"boolean","title":"Isfavorite","default":false},"isSelected":{"type":"boolean","title":"Isselected","default":false},"isActive":{"type":"boolean","title":"Isactive","default":false}},"type":"object","required":["_id","createdAt","modifiedAt","name"],"title":"AgentDetailDTO"},"AgentTaskType":{"type":"string","enum":["custom","template","tenant"],"title":"AgentTaskType"},"WorkflowDetailedDTO":{"properties":{"_id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"},"botId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botid"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"isDefault":{"type":"boolean","title":"Isdefault","default":false},"runModeDefault":{"$ref":"#/components/schemas/WorkFlowRunMode","default":"run_all_step"},"isDefaultContext":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isdefaultcontext","default":false},"workflowSteps":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/WorkflowIntegrationStepDetailedDTO"},{"$ref":"#/components/schemas/WorkflowPromptStepDetailedDTO"}]},"type":"array"},{"type":"null"}],"title":"Workflowsteps","default":[]}},"type":"object","required":["_id","createdAt","modifiedAt","name","description"],"title":"WorkflowDetailedDTO"},"WorkFlowRunMode":{"type":"string","enum":["step_by_step","run_all_step"],"title":"WorkFlowRunMode"},"WorkflowIntegrationStepDetailedDTO":{"properties":{"workflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflowid"},"stepType":{"$ref":"#/components/schemas/WorkflowStepType","description":"Type of the step, e.g., 'prompt' or 'integration'","default":"prompt"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the step, applicable to 'prompt' steps"},"runModeDefault":{"$ref":"#/components/schemas/WorkFlowStepRunMode","default":"run_all_step"},"apiUrl":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Apiurl","description":"The endpoint URL for the integration API."},"attachPreviousStepOutput":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attachpreviousstepoutput","description":"Attach previous step output.","default":false},"auth":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/WorkflowIntegrationStepAuthenticationBasic"},{"$ref":"#/components/schemas/WorkflowIntegrationStepAuthenticationBearer"}],"discriminator":{"propertyName":"type","mapping":{"basic":"#/components/schemas/WorkflowIntegrationStepAuthenticationBasic","bearer":"#/components/schemas/WorkflowIntegrationStepAuthenticationBearer"}}},{"type":"null"}],"title":"Auth","description":"Authentication details for the integration API."},"headers":{"items":{"$ref":"#/components/schemas/WorkflowIntegrationStepHeader"},"type":"array","title":"Headers","description":"Optional headers to include in the API request.","default":[]},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload","description":"Optional payload to include in the API request."},"queryParams":{"items":{"$ref":"#/components/schemas/WorkflowIntegrationStepQueryParam"},"type":"array","title":"Queryparams","description":"Optional query parameters to include in the API request.","default":[]},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE","OPTIONS","HEAD"],"title":"Method","description":"HTTP method to use, e.g., 'GET', 'POST'.","default":"GET"},"timeout":{"type":"integer","title":"Timeout","description":"Timeout for the API request in seconds.","default":10},"retries":{"type":"integer","title":"Retries","description":"Number of retries for the API request.","default":3},"_id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"}},"type":"object","required":["apiUrl","_id","createdAt","modifiedAt"],"title":"WorkflowIntegrationStepDetailedDTO"},"WorkflowStepType":{"type":"string","enum":["prompt","integration"],"title":"WorkflowStepType"},"WorkFlowStepRunMode":{"type":"string","enum":["step_by_step","run_all_step"],"title":"WorkFlowStepRunMode"},"WorkflowIntegrationStepAuthenticationBasic":{"properties":{"type":{"type":"string","const":"basic","title":"Type","description":"The authentication type.","default":"basic"},"username":{"type":"string","title":"Username","description":"The username for basic authentication."},"password":{"type":"string","title":"Password","description":"The password for basic authentication."}},"type":"object","required":["username","password"],"title":"WorkflowIntegrationStepAuthenticationBasic"},"WorkflowIntegrationStepAuthenticationBearer":{"properties":{"type":{"type":"string","const":"bearer","title":"Type","description":"The authentication type.","default":"bearer"},"token":{"type":"string","title":"Token","description":"The token for bearer authentication."}},"type":"object","required":["token"],"title":"WorkflowIntegrationStepAuthenticationBearer"},"WorkflowIntegrationStepHeader":{"properties":{"key":{"type":"string","title":"Key","description":"The header key."},"value":{"type":"string","title":"Value","description":"The header value."},"isActive":{"type":"boolean","title":"Isactive","description":"Whether the header should be activated.","default":true}},"type":"object","required":["key","value"],"title":"WorkflowIntegrationStepHeader"},"WorkflowIntegrationStepQueryParam":{"properties":{"key":{"type":"string","title":"Key","description":"The header key."},"value":{"type":"string","title":"Value","description":"The header value."},"isActive":{"type":"boolean","title":"Isactive","description":"Whether the header should be activated.","default":true}},"type":"object","required":["key","value"],"title":"WorkflowIntegrationStepQueryParam"},"WorkflowPromptStepDetailedDTO":{"properties":{"workflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflowid"},"stepType":{"$ref":"#/components/schemas/WorkflowStepType","description":"Type of the step, e.g., 'prompt' or 'integration'","default":"prompt"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the step, applicable to 'prompt' steps"},"runModeDefault":{"$ref":"#/components/schemas/WorkFlowStepRunMode","default":"run_all_step"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Prompt for the user, applicable to 'prompt' steps"},"model":{"anyOf":[{"$ref":"#/components/schemas/AIModel"},{"type":"null"}],"description":"Applicable only to 'prompt' steps"},"advanceOptions":{"$ref":"#/components/schemas/AdvanceOptions","default":{"temperature":0.7,"topP":1,"presencePenalty":0,"frequencyPenalty":0}},"isWebSearchEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Iswebsearchenabled","default":false},"webSearchType":{"anyOf":[{"$ref":"#/components/schemas/WebSearchType"},{"type":"null"}],"default":"normal_web_search"},"webSearchConfig":{"anyOf":[{"$ref":"#/components/schemas/WebSearchConfig"},{"type":"null"}]},"_id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"}},"type":"object","required":["_id","createdAt","modifiedAt"],"title":"WorkflowPromptStepDetailedDTO"},"AdvanceOptions":{"properties":{"temperature":{"type":"number","maximum":2,"minimum":0,"title":"Temperature","default":0.7},"topP":{"type":"number","maximum":1,"minimum":0,"title":"Topp","default":1},"presencePenalty":{"type":"number","maximum":2,"minimum":-2,"title":"Presencepenalty","default":0},"frequencyPenalty":{"type":"number","maximum":2,"minimum":-2,"title":"Frequencypenalty","default":0}},"type":"object","title":"AdvanceOptions"},"WebSearchType":{"type":"string","enum":["normal_web_search","pro_web_search","pro_r_web_search"],"title":"WebSearchType"},"WebSearchConfig":{"properties":{"webSearchProvider":{"$ref":"#/components/schemas/WebSearchProvider","default":"linkup_normal_web_search"},"isLinkupDeepSearch":{"type":"boolean","title":"Islinkupdeepsearch","default":false}},"type":"object","title":"WebSearchConfig"},"WebSearchProvider":{"type":"string","enum":["linkup_normal_web_search","linkup_pro_web_search","linkup_pro_r_web_search","tavily_normal_web_search","tavily_pro_web_search","tavily_pro_r_web_search","perplexity_normal_web_search","perplexity_pro_web_search"],"title":"WebSearchProvider"},"DraftNote":{"properties":{"targetMessageId":{"type":"string","title":"Targetmessageid"},"convoId":{"type":"string","title":"Convoid"},"summary":{"type":"string","title":"Summary"},"title":{"type":"string","title":"Title","default":"New Note"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"}},"type":"object","required":["targetMessageId","convoId","summary"],"title":"DraftNote"},"BotTemplateType":{"type":"string","enum":["retriever","nexus"],"title":"BotTemplateType"},"AdvancedSettingDetailedDTO":{"properties":{"botId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botid"},"advancedFeatures":{"items":{"$ref":"#/components/schemas/AdvancedFeatureDTO"},"type":"array","title":"Advancedfeatures","default":[]},"actionButtons":{"items":{"$ref":"#/components/schemas/ActionButtonDTO"},"type":"array","title":"Actionbuttons","default":[]}},"type":"object","title":"AdvancedSettingDetailedDTO"},"AdvancedFeatureDTO":{"properties":{"key":{"type":"string","title":"Key"},"isActive":{"type":"boolean","title":"Isactive","default":false}},"type":"object","required":["key"],"title":"AdvancedFeatureDTO"},"ActionButtonDTO":{"properties":{"key":{"type":"string","title":"Key"},"isRight":{"type":"boolean","title":"Isright","default":false},"index":{"type":"number","title":"Index"},"isActive":{"type":"boolean","title":"Isactive","default":false}},"type":"object","required":["key","index"],"title":"ActionButtonDTO"},"ChatMode":{"type":"string","enum":["normal","system_agent","code_interpreter","schunk_sap_agent","harting_agent"],"title":"ChatMode"},"DefaultWebSearchConfig":{"properties":{"webSearchProvider":{"$ref":"#/components/schemas/WebSearchProvider","default":"linkup_normal_web_search"}},"type":"object","title":"DefaultWebSearchConfig"},"DataRetentionConfig":{"properties":{"isTemporary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Istemporary"},"retentionPeriodDay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retentionperiodday"},"enableDataRetention":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabledataretention"}},"type":"object","title":"DataRetentionConfig"},"BotStatus":{"type":"string","enum":["active","inactive"],"title":"BotStatus"},"MobileAccessMode":{"type":"string","enum":["off","on_v1","on_v2"],"title":"MobileAccessMode"},"BotAccessMode":{"type":"string","enum":["private","restricted","any-one-with-link"],"title":"BotAccessMode"},"CustomActiveBotDetail":{"properties":{"_id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"modifiedAt":{"type":"string","format":"date-time","title":"Modifiedat"},"name":{"type":"string","title":"Name"},"iconSignedUrl":{"type":"string","title":"Iconsignedurl"},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iconurl"},"voiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voiceid"},"parentCortexBot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentcortexbot"},"strategies":{"anyOf":[{"items":{"$ref":"#/components/schemas/CortexStrategyResponse"},"type":"array"},{"type":"null"}],"title":"Strategies","default":[]},"enableVoiceInput":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enablevoiceinput","default":true},"model":{"$ref":"#/components/schemas/AIModel"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"agentsConfig":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AgentConfig"},"type":"object"},{"type":"null"}],"title":"Agentsconfig"},"modelsFavorites":{"anyOf":[{"items":{"$ref":"#/components/schemas/AIModel"},"type":"array"},{"type":"null"}],"title":"Modelsfavorites"},"agentsFavorites":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agentsfavorites"},"searchMethodType":{"anyOf":[{"$ref":"#/components/schemas/SearchMethodType"},{"type":"null"}],"default":1},"agentTaskCategories":{"items":{"$ref":"#/components/schemas/AgentTaskGroupByCategoryDetailedDTO"},"type":"array","title":"Agenttaskcategories","default":[]},"workflows":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowDetailedDTO"},"type":"array"},{"type":"null"}],"title":"Workflows","default":[]},"draft_note":{"anyOf":[{"$ref":"#/components/schemas/DraftNote"},{"type":"null"}]},"botTemplate":{"$ref":"#/components/schemas/BotTemplateType"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archivedat"},"knowledgeBase":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Knowledgebase"},"contributedDatabase":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Contributeddatabase","default":[]},"advancedSetting":{"anyOf":[{"$ref":"#/components/schemas/AdvancedSettingDetailedDTO"},{"type":"null"}]},"isPublic":{"type":"boolean","title":"Ispublic","description":"Sharing Preference","default":false},"isEditor":{"type":"boolean","title":"Iseditor","default":false},"chatMode":{"$ref":"#/components/schemas/ChatMode","default":"normal"},"enableReranker":{"type":"boolean","title":"Enablereranker","default":true},"enableAgentRetrieval":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enableagentretrieval","default":false},"isTemplate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Istemplate","default":false},"enableDefaultIntentAgent":{"type":"boolean","title":"Enabledefaultintentagent","default":false},"enableDefaultWebSearch":{"type":"boolean","title":"Enabledefaultwebsearch","default":false},"defaultWebSearchConfig":{"anyOf":[{"$ref":"#/components/schemas/DefaultWebSearchConfig"},{"type":"null"}]},"dataRetentionConfig":{"anyOf":[{"$ref":"#/components/schemas/DataRetentionConfig"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/BotStatus"},{"type":"null"}],"default":"active"},"keysNotification":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keysnotification","default":[]},"mobileAccessMode":{"anyOf":[{"$ref":"#/components/schemas/MobileAccessMode"},{"type":"null"}],"default":"off"},"parentAccessMode":{"$ref":"#/components/schemas/BotAccessMode","default":"private"},"isCompanyGptBot":{"type":"boolean","title":"Iscompanygptbot","default":false},"defaultGreetings":{"type":"string","title":"Defaultgreetings"},"systemMessage":{"type":"string","title":"Systemmessage"},"followUpPrompt":{"type":"string","title":"Followupprompt"},"isEnableEditSummary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isenableeditsummary","default":false},"selectedNotes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selectednotes","default":[]},"topk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Topk"},"enableAutoResponse":{"type":"boolean","title":"Enableautoresponse","default":false},"enableVisualRetrieval":{"type":"boolean","title":"Enablevisualretrieval","default":false},"summaryPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summaryprompt","default":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"followUp":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Followup"},"advanceOptions":{"$ref":"#/components/schemas/ConvoAdvanceOptions","default":{"temperature":0.7,"topP":1,"presencePenalty":0,"frequencyPenalty":0}},"elvLabApiKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Elvlabapikey"},"isEnableInitialQuestions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isenableinitialquestions","default":false},"ttsOption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ttsoption"},"enableInlineCitation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enableinlinecitation","default":false},"isReferencesEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isreferencesenabled","default":true}},"type":"object","required":["_id","createdAt","modifiedAt","name","iconSignedUrl","iconUrl","model","botTemplate","knowledgeBase","defaultGreetings","systemMessage","followUpPrompt","topk","elvLabApiKey","ttsOption"],"title":"CustomActiveBotDetail"},"ConvoAdvanceOptions":{"properties":{"temperature":{"type":"number","maximum":2,"minimum":0,"title":"Temperature","default":0.7},"topP":{"type":"number","maximum":1,"minimum":0,"title":"Topp","default":1},"presencePenalty":{"type":"number","maximum":2,"minimum":-2,"title":"Presencepenalty","default":0},"frequencyPenalty":{"type":"number","maximum":2,"minimum":-2,"title":"Frequencypenalty","default":0}},"type":"object","title":"ConvoAdvanceOptions"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/cortex/active-bot/{bot_id}":{"get":{"tags":["cortex","cortex active-bot"],"summary":"Get Active Bot Details","operationId":"get_active_bot_details_cortex_active_bot__bot_id__get","parameters":[{"name":"bot_id","in":"path","required":true,"schema":{"type":"string","title":"Bot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SelectedActiveBotDetail"},{"$ref":"#/components/schemas/CustomActiveBotDetail"}],"title":"Response Get Active Bot Details Cortex Active Bot  Bot Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

Remember to copy the `_id` field, as we will need it to [Create a Dataroom](/getting-started/getting-started/add-convo-to-bot.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.docs.blockbrain.ai/getting-started/getting-started/create-knowledge-bot/create-knowledge-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
