### Start Command Example Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/cli/index.md Start the local development server using the `start` command. You can specify the host and port for the server. Note that uppercase flags `-H` and `-P` are used to avoid conflicts with the built-in help flag. ```bash python run.py start -H 0.0.0.0 -P 8080 ``` -------------------------------- ### Complete Example: AI Assistant Application Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/guide/building-apps.md A full example demonstrating tool registration, agent creation, app configuration, and starting the application with a custom orchestrator. ```python from agenticai_core.designtime.models import App, Agent, OrchestratorType from agenticai_core.designtime.models.llm_model import LlmModel, LlmModelConfig from agenticai_core.designtime.models.prompt import Prompt from agenticai_core.designtime.models.tool import Tool, ToolsRegistry from agenticai_core.runtime.agents.abstract_orchestrator import AbstractOrchestrator # 1. Register tools @Tool.register(name="search", description="Search knowledge base") def search(query: str): return {"results": []} # 2. Create agents agent = Agent( name="Assistant", description="General purpose assistant", role="WORKER", sub_type="REACT", type="AUTONOMOUS", llm_model=LlmModel( model="gpt-4o", provider="Open AI", connection_name="Default", modelConfig=LlmModelConfig(temperature=0.7, max_tokens=1600) ), prompt=Prompt( system="You are a helpful assistant.", custom="Help users with their questions." ) ) # 3. Create app app = App( name="My App", description="AI Assistant Application", orchestrationType=OrchestratorType.CUSTOM_SUPERVISOR, agents=[agent] ) # 4. Create orchestrator class MyOrchestrator(AbstractOrchestrator): def __init__(self, agents): super().__init__(name="MyOrchestrator", agents=agents) # 5. Start if __name__ == "__main__": app.start( orchestrator_cls=MyOrchestrator, port=8080 ) ``` -------------------------------- ### Install agenticai-core from Local Wheel Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/getting-started/installation.md Install the agenticai-core library directly from a local wheel file if you need to install it separately from the workspace setup. ```bash pip install ./lib/agenticai_core-0.1.0-py3-none-any.whl ``` -------------------------------- ### Run BotKit SDK Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/app-settings/integrations/agents/how-to-configure-agent-transfer.md Execute this command in your terminal to start the BotKit SDK server. Ensure all necessary modules are installed beforehand. ```bash node app.js ``` -------------------------------- ### Manual Workspace Setup Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/getting-started/installation.md Manually set up the virtual environment and install dependencies using pip. Ensure the virtual environment is named '.venv'. ```bash # Create virtual environment (IMPORTANT: use .venv) python3.10 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install dependencies (includes agenticai-core from lib/) pip install -r requirements.txt ``` -------------------------------- ### Example Debug Log Entry - Post Processor Initiation Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/fetch-debug-logs.md This log entry indicates the initiation of a post-processor script. ```json { "timestamp": "2025-12-22T13:15:40.880Z", "debugTitle": "welcomeAgent", "debugMessage": "PostProcessor script initiated", "debugLevel": "info", "metaInfo": { "channel": "rtm", "identity": "u-c5bfe2af-49f2-58a7-8d10-d08abbcxxxxx" } } ``` -------------------------------- ### Example Debug Log Entry Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/fetch-debug-logs.md This is an example of a debug log entry showing a tool call response. It includes details about the tool name, description, and parameters. ```json { "timestamp": "2025-12-22T14:02:59.387Z", "debugTitle": "welcomeAgent", "debugMessage": "Post Processor script intiated", "debugLevel": "info", "metaInfo": { "channel": "rtm", "identity": "u-c5bfe2af-49f2-58a7-8d10-d08abbcxxxxx" } } ``` -------------------------------- ### Example Debug Log Entry - Agent Welcome Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/fetch-debug-logs.md This log entry indicates the initiation of a post-processor script for the agent welcome process. ```json { "timestamp": "2025-12-22T13:15:40.867Z", "debugTitle": "welcomeAgent", "debugMessage": "Post Processor script intiated", "debugLevel": "info", "metaInfo": { "channel": "rtm", "identity": "u-c5bfe2af-49f2-58a7-8d10-d08abbcxxxxx" } } ``` -------------------------------- ### Example Debug Log Entry - Post Processor Success Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/fetch-debug-logs.md This log entry confirms the successful execution of a post-processor script. ```json { "timestamp": "2025-12-22T13:15:40.962Z", "debugTitle": "welcomeAgent", "debugMessage": "PostProcessor script execution successful", "debugLevel": "info" } ``` -------------------------------- ### Sample Debug Log Response Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/fetch-debug-logs.md This is an example of a debug log entry, showing information like debug level, metadata, timestamp, title, message, and detailed context. ```json { "debugLevel": "info", "metaInfo": { "channel": "korevg", "identity": "cs-45de6016-4b37-55a5-b144-614b481xxxxx/592bd709-a1ac-4a18-be3c-74ce263xxxxx" } }, { "timestamp": "2025-12-23T12:40:33.103Z", "debugTitle": "initWelcomeIntent", "debugMessage": "Script node execution successful", "debugLevel": "info", "debugDetail": "{\"title\": \" \",\"body\":\"\",\"updatedContext\":{\"bot\": \" Test Bot\",\"botid\":\"st-1ce792c9-cd4e-50e0-8f1b-6cb543cxxxxx\",\"taskid\":\"dg-17bf6dd3-de9a-5b5c-b4ea-ff786e1xxxxx\",\"intent\":\"Welcome IVR Flow\",\"intentType\":\"dialog\",\"intentDescription\":\"The first IVR interaction that greets callers, identifies the intent, and directs them to the appropriate service path.\",\"invocationSource\":{\"type\":\"nlMeta\"},\"entities\":{},\"entityErrorCount\":{},\"amendEntities\":{},\"history\":[],\"ccId\":\"u-1ddc34dc-8c63-548d-b26f-79a56888a127:st-1ce792c9-cd4e-50e0-8f1b-6cb543cxxxxx\",\"currentLanguage\":\"en\",\"onHoldTasks\":[],\"session\":{\"EnterpriseContext\":{},\"BotContext\":{},\"UserContext\":{\"workinghours\":{\"workdays\":\"mon,tue,wed,thu,fri\",\"workstart\":\"8:00 AM\",\"workend\":\"5:00 PM\"},\"profImage\":\"no-avatar\",\"profColour\":\"#2e8b57\",\"jTitle\": \"\",\"dept\": \"\",\"activationStatus\":\"active\",\"firstName\": \"\",\"lastName\": \"\",\"orgId\":\"o-e31a1a45-c24a-5074-b4b7-d44396exxxxx\",\"_id\":\"u-1ddc34dc-8c63-548d-b26f-79a56888a127\",\"identities\":[{\"val\":\"cs-45de6016-4b37-55a5-b144-614b481xxxxx/592bd709-a1ac-4a18-be3c-74ce263xxxxx\",\"type\":\"mapped\"},{\"val\":\"68c9083841342df378exxxxx/korevg/592bd709-a1ac-4a18-be3c-74ce263xxxxx\",\"type\":\"mapped\"}]},\"UserSession\":{\"isRepeatedVoiceUser\":true},\"BotUserSession\":{\"channels\":[{\"type\":\"korevg\",\"to\":\"+150004xxxxx\",\"from\":\"cs-45de6016-4b37-55a5-b144-614b481xxxxx/592bd709-a1ac-4a18-be3c-74ce263xxxxx\",\"fromId\":\"592bd709-a1ac-4a18-be3c-74ce263xxxxx\",\"eventData\":{\"sip\":{\"headers\":{\"via\":\"SIP/2.0/UDP 3.224.189.218;rport=5060;branch=z9hG4bK4D3eH9c28Qp4S;received=172.23.10.251\",\"max-forwards\":\"70\",\"from\":\"\"Hyde Park MA\" <sip:+161767xxxxx@3.224.189.218:5060>;tag=1vcFSpmSeQXDN\",\"to\":\"\"xxxxAI\" <sip:+150004xxxxx@savg-sbc1.xxxx.ai>\",\"call-id\":\"68203ea2-5a9f-123f-c4b1-0affe5e7181b\",\"cseq\":\"108693023 INVITE\",\"contact\":\"<sip:172.23.10.251:5060>\",\"user-agent\":\"GENESYS-SIPSERVICE/1.0.0.19810\",\"accept\":\"application/sdp\",\"allow\":\"INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, UPDATE, REFER\",\"supported\":\"norefersub, timer\",\"content-type\":\"application/sdp\",\"content-length\":\"241\",\"X-Account-Sid\":\"d19ea6df-1a17-4e18-91d2-61337cdxxxxx\",\"X-CID\":\"f8d05327-7f14-44eb-8f37-f178d7711c09\",\"X-Forwarded-For\":\"52.32.193.99\",\"X-Originating-Carrier\":\"st-1ce792c9-cd4e-50e0-8f1b-6cb543cxxxxx-17647485xxxxx\",\"X-Voip-Carrier-Sid\":\"d0907051-065c-4eb4-8ffc-6fa8621xxxxx\",\"X-Application-Sid\":\"d3902d83-3542-417b-b6ba-6002befxxxxx\",\"Diversion\":\"\"Hyde Park MA\" <sip:+161767xxxxx@52.32.193.99;user=phone>;reason=unknown, <sip:+150000xxxxx@52.32.193.99;user=phone>;reason=deflection\",\"x-inin-cnv\":\"07eb878e-46a0-435f-8b32-f25f9fc9d2f9\",\"x-user-to-user\": \"1\"},\"raw\":\"INVITE sip:+150004xxxxx@savg-sbc1.xxxx.ai SIP/2.0\r\nVia: SIP/2.0/UDP 3.224.189.218;rport=5060;branch=z9hG4bK4D3eH9c28Qp4S;received=172.23.10.251\r\nMax-Forwards: 70\r\nFrom: \"Hyde Park MA\" <sip:+161767xxxxx@3.224.189.218:5060>;tag=1vcFSpmSeQXDN\r\nTo: \"xxxxAI\" <sip:+150004xxxxx@savg-sbc1.xxxx.ai>\r\nCall-ID: 68203ea2-5a9f-123f-c4b1-0affe5e7181b\r\nCSeq: 108693023 INVITE\r\nContact: <sip:172.23.10.251:5060>\r\nUser-Agent: GENESYS-SIPSERVICE/1.0.0.19810\r\nAccept: application/sdp\r\nAllow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, UPDATE, REFER\r\nSupported: norefersub, timer\r\nContent-Type: application/sdp\r\nContent-Length: 241\r\nX-Account-Sid: d19ea6df-1a17-4e18-91d2-61337cdxxxxx\r\nX-CID: f8d05327-7f14-44eb-8f37-f178d7711c09\r\nX-Forwarded-For: 52.32.193.99\r\nX-Originating-Carrier: st-1ce792c9-cd4e-50e0-8f1b-6cb543cxxxxx-17647485xxxxx\r\nX-Voip-Carrier-Sid: d0907051-065c-4eb4-8ffc-6fa8621xxxxx\r\nX-Application-Sid: d3902d83-3542-417b-b6ba-6002befxxxxx\r\nDiversion: \"Hyde Park MA\" <sip:+161767xxxxx@52.32.193.99;user=phone>;reason=unknown, <sip:+150000xxxxx@52.32.193.99;user=phone>;reason=deflection\r\nx-inin-cnv: 07eb878e-46a0-435f-8b32-f25f9fc9d2f9\r\nx-user-to-user: 1\r\n\r\nv=0\r\no=- 651045436 3172461980 IN IP4 172.23.11.xxx\r\ns=-\r\nc=IN IP4 172.23.11.xxx\r\nt=0 0\r\nm=audio 48644 RTP/AVP 0 8 102\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:102 telephone-event/8000\r\na=fmtp:102 0-15\r\na=sendrecv\r\na=rtcp:48645\r\n"},"body":"v=0\r\no=- 651045436 3172461980 IN IP4 172.23.11.xxx"} ``` -------------------------------- ### Example Debug Log Entry - Tool Call Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/fetch-debug-logs.md This log entry details a tool call, including the tool's name, description, and parameters. It also shows the response payload from the chat completion. ```json { "timestamp": "2025-12-22T13:15:40.867Z", "debugTitle": "toolCall", "debugMessage": "Tool call: outsideWorkingHour", "debugLevel": "info", "responsePayload": { "id": "chatcmpl-Cpa3AWSuEZRqjZVpUpsuMiwpxxxxx", "object": "chat.completion", "created": 1766409340, "model": "gpt-4o-2024-08-06", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "{\"bot\":\"Thank you for calling the IT Service Desk. This call may be monitored or recorded for quality and training purposes. We’ve upgraded our phone menu to a conversational experience to serve you better. Are you here to report an issue related to Mac hardware or software?\",\"conv_status\":\"ongoing\",\"entities\":[]}", "refusal": null, "annotations": [] }, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 987, "completion_tokens": 67, "total_tokens": 1054, "prompt_tokens_details": { "cached_tokens": 0, "audio_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0, "audio_tokens": 0, "accepted_prediction_tokens": 0, "rejected_prediction_tokens": 0 } }, "service_tier": "default", "system_fingerprint": "fp_a0e9480a2f" }, "metaInfo": { "channel": "rtm", "identity": "u-c5bfe2af-49f2-58a7-8d10-d08abbcxxxxx" } } ``` -------------------------------- ### Example Debug Log Entry - Post Processor Script Execution Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/fetch-debug-logs.md This log entry confirms the successful execution of a post-processor script, including details about the bot's response and conversation status. ```json { "timestamp": "2025-12-22T13:15:40.876Z", "debugTitle": "welcomeAgent", "debugMessage": "Post Processor script execution successful", "debugLevel": "info", "debugDetail": "{\"title\":\" \",\"body\":\"{\\\"toolCalls\\\":[],\\\"bot\\\":\\\"Thank you for calling the IT Service Desk. This call may be monitored or recorded for quality and training purposes. We’ve upgraded our phone menu to a conversational experience to serve you better. Are you here to report an issue related to Mac hardware or software?\\",\\\"conv_status\\\":\\\"ongoing\\\",\\\"entities\\\":[]}\",\"metaTags\":{\"UserLevelTags\":[],\"SessionLevelTags\":[],\"MessageLevelTags\":[],\"referenceLevelTags\":[]},\"contextTags\":[],\"removeContextTags\":[],\"debugLogs\":[],\"textTranslations\":[],\"tokenIdpsToExpire\":[],\"clearAllAuthTokens\":false,\"channelActions\":{}}", "metaInfo": { "channel": "rtm", "identity": "u-c5bfe2af-49f2-58a7-8d10-d08abbcxxxxx" } } ``` -------------------------------- ### SIP INVITE Request Details Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/fetch-debug-logs.md This snippet shows the detailed structure of a SIP INVITE request, including headers and SDP payload. It is useful for understanding call setup and routing information. ```json { "user": "phone?reason=unknown, ;reason=deflection", "x-inin-cnv": "07eb878e-46a0-435f-8b32-f25f9fc9d2f9", "x-user-to-user": "1" },"raw":"INVITE sip:+150004xxxxx@savg-sbc1.xxxx.ai SIP/2.0\r\nVia: SIP/2.0/UDP 3.224.189.218;rport=5060;branch=z9hG4bK4D3eH9c28Qp4S;received=172.23.10.251\r\nMax-Forwards: 70\r\nFrom: \"Hyde Park MA\" <sip:+161767xxxxx@3.224.189.218:5060>;tag=1vcFSpmSeQXDN\r\nTo: \"xxxxAI\" <sip:+150004xxxxx@savg-sbc1.xxxx.ai>\r\nCall-ID: 68203ea2-5a9f-123f-c4b1-0affe5e7181b\r\nCSeq: 108693023 INVITE\r\nContact: <sip:172.23.10.251:5060>\r\nUser-Agent: GENESYS-SIPSERVICE/1.0.0.19810\r\nAccept: application/sdp\r\nAllow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, UPDATE, REFER\r\nSupported: norefersub, timer\r\nContent-Type: application/sdp\r\nContent-Length: 241\r\nX-Account-Sid: d19ea6df-1a17-4e18-91d2-61337cdxxxxx\r\nX-CID: f8d05327-7f14-44eb-8f37-f178d7711c09\r\nX-Forwarded-For: 52.32.193.99\r\nX-Originating-Carrier: st-1ce792c9-cd4e-50e0-8f1b-6cb543cxxxxx-17647485xxxxx\r\nX-Voip-Carrier-Sid: d0907051-065c-4eb4-8ffc-6fa8621xxxxx\r\nX-Application-Sid: d3902d83-3542-417b-b6ba-6002befxxxxx\r\nDiversion: \"Hyde Park MA\" <sip:+161767xxxxx@52.32.193.99;user=phone>;reason=unknown, <sip:+150000xxxxx@52.32.193.99;user=phone>;reason=deflection\r\nx-inin-cnv: 07eb878e-46a0-435f-8b32-f25f9fc9d2f9\r\nx-user-to-user: 1\r\n\r\nv=0\r\no=- 651045436 3172461980 IN IP4 172.23.11.xxx\r\ns=-\r\nc=IN IP4 172.23.11.xxx\r\nt=0 0\r\nm=audio 48644 RTP/AVP 0 8 102\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:102 telephone-event/8000\r\na=fmtp:102 0-15\r\na=sendrecv\r\na=rtcp:48645\r\n","body":"v=0\r\no=- 651045436 3172461980 IN IP4 172.23.11.xxx\r\ns=-\r\nc=IN IP4 172.23.11.xxx\r\nt=0 0\r\nm=audio 48644 RTP/AVP 0 8 102\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:102 telephone-event/8000\r\na=fmtp:102 0-15\r\na=sendrecv\r\na=rtcp:48645\r\n","method":"INVITE","version":"2.0","uri":"sip:+150004xxxxx@savg-sbc1.xxxx.ai","payload":[{"type":"application/sdp","content":"v=0\r\no=- 651045436 3172461980 IN IP4 172.23.11.xxx\r\ns=-\r\nc=IN IP4 172.23.11.xxx\r\nt=0 0\r\nm=audio 48644 RTP/AVP 0 8 102\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:102 telephone-event/8000\r\na=fmtp:102 0-15\r\na=sendrecv\r\na=rtcp:48645\r\n"}]},"direction":"inbound","trace_id":"4557aa914edd50ead4d729bea4e4ca7d","caller_name":"\"Hyde Park MA\"","call_sid":"592bd709-a1ac-4a18-be3c-74ce263xxxxx","account_sid":"d19ea6df-1a17-4e18-91d2-61337cdxxxxx","application_sid":"d3902d83-3542-417b-b6ba-6002befxxxxx","from":"+161767xxxxx","to":"+150004xxxxx","call_id":"68203ea2-5a9f-123f-c4b1-0affe5e7181b","sip_status":100,"sip_reason":"Trying","call_status":"trying","sbc_callid":"f8d05327-7f14-44eb-8f37-f178d7711c09","originating_sip_ip":"52.32.193.99","originating_sip_trunk_name":"st-1ce792c9-cd4e-50e0-8f1b-6cb543cxxxxx-17647485xxxxx","local_sip_address":"172.23.10.106:5060","service_provider_sid":"2708b1b3-2736-40ea-b502-c53d8396247f","defaults":{"synthesizer":{"vendor":"aws","language":"en-US","voice":"Joanna"},"recognizer":{"vendor":"google","language":"en-US"}},"msgid":"4wNJhLdRx93Urhy2LN54WL","type":"session:new","hook":"new","conversation":"592bd709-a1ac-4a18-be3c-74ce263xxxxx","From":"592bd709-a1ac-4a18-be3c-74ce263xxxxx","To":"+150004xxxxx","Caller":"+161767xxxxx","sipHeaders":[{"name":"via","value":"SIP/2.0/UDP 3.224.189.218;rport=5060;branch=z9hG4bK4D3eH9c28Qp4S;received=172.23.10.251"},{"name":"max-forwards","value":"70"},{"name":"from","value":"\"Hyde Park MA\" <sip:+161767xxxxx@3.224.189.218:5060>;tag=1vcFSpmSeQXDN"},{"name":"to","value":"\"xxxxAI\" <sip:+150004xxxxx@savg-sbc1.xxxx.ai>"},{"name":"call-id","value":"68203ea2-5a9f-123f-c4b1-0affe5e7181b"},{"name":"cseq","value":"108693023 INVITE"},{"name":"contact","value":"<sip:172.23.10.251:5060>"},{"name":"user-agent","value":"GENESYS-SIPSERVICE/1.0.0.19810"},{"name":"accept","value":"application/sdp"},{"name":"allow","value":"INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, UPDATE, REFER"},{"name":"supported","value":"norefersub, timer"},{"name":"content-type","value":"application/sdp"},{"name":"content-length","value":"241"},{"name":"X-Account-Sid","value":"d19ea6df-1a17-4e18-91d2-61337cdxxxxx"},{"name":"X-CID","value":"f8d05327-7f14-44eb-8f37-f178d7711c09"},{"name":"X-Forwarded-For","value":"52.32.193.99"},{"name":"X-Originating-Carrier","value":"st-1ce792c9-cd4e-50e0-8f1b-6cb543cxxxxx-17647485xxxxx"},{"name":"X-Voip-Carrie ``` -------------------------------- ### Example Usage of GET and PUT Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/automation/use-cases/alert-tasks-rss-api-request.md Demonstrates practical examples of using the put and get functions for BotContext, UserSession, and UserContext. ```javascript BotContext.put("topicSessionVariable","music",2000); UserSession.put("firstName","Mary",20000); UserContext.get("firstName"); ``` -------------------------------- ### Set Up Development Environment Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/contributing.md Instructions for setting up a Python virtual environment and installing the SDK in development mode with all dependencies. ```bash python3.10 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -e ".[dev,docs]" ``` -------------------------------- ### Example Usage of GET and PUT Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/automation/use-cases/alert-task-rest-api.md Demonstrates practical examples of using the 'put' method for BotContext and UserSession, and the 'get' method for UserContext with specified keys and TTL values. ```javascript BotContext.put("topicSessionVariable","music",2000); UserSession.put("firstName","Mary",20000); UserContext.get("firstName"); ``` -------------------------------- ### Start Local Development Server Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/cli/index.md Use the `start` command to launch a local development server. You can optionally specify the host and port. ```bash python run.py start [-H HOST] [-P PORT] ``` ```bash python run.py start ``` ```bash python run.py start -H 0.0.0.0 -P 8080 ``` -------------------------------- ### Get FAQs Request Example Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/get-faqs-from-knowledge-task.md This example demonstrates how to make a GET request to the Get FAQs API endpoint. It includes common query parameters for filtering and pagination. Ensure you replace placeholders like {{host}}, {{bot_id}}, and {{YOUR_JWT_ACCESS_TOKEN}} with your actual values. ```curl curl -X GET \ 'https://{{host}}/api/public/bot/{{bot_id}}/faqs?ktId=5afxxxxxf&limit=30&offset=0&parentId=xxxxx-xxx-xxx-xxx-xxxxx&withallchild=true&type=all&language=en' \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json' ``` -------------------------------- ### Configure and Deploy Application Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/cli/index.md These commands demonstrate the process of configuring your application for a specific environment (e.g., 'dev') and then deploying it. Ensure your `.env` file is correctly set up before running these commands. ```bash # Set config and deploy python run.py config -u dev python run.py deploy -f bin/myProject/application.kar ``` -------------------------------- ### Example: Get Caller from User Session Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/flows/node-types/utils.md An example of retrieving the 'Caller' value from the user session. ```javascript userSessionUtils.get('Caller'); ``` -------------------------------- ### App Class Initialization Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/api/designtime/app.md Demonstrates how to create an App instance by providing its core properties like name, description, orchestration type, AI model configuration, and agents. ```APIDOC ## App Initialization ### Description Instantiate the `App` class to define a new application. This involves specifying its unique name, a descriptive text, the orchestration strategy, the AI model to be used, and the agents that will form part of the application. ### Class Signature ```python App( name: str, description: str, orchestrationType: OrchestratorType, ai_model: LlmModel, agents: list[Agent], ... ) ``` ### Parameters - **name** (str) - Required - The unique name of the application. - **description** (str) - Required - A brief explanation of the application's purpose. - **orchestrationType** (OrchestratorType) - Required - Specifies the type of orchestration to be used (e.g., `OrchestratorType.CUSTOM_SUPERVISOR`). - **ai_model** (LlmModel) - Required - Configuration for the Language Model to be used by the application. - **agents** (list[Agent]) - Required - A list of `Agent` objects that will perform tasks within the application. ### Request Example ```python from agenticai_core.designtime.models.app import App, OrchestratorType from agenticai_core.designtime.models.agent import Agent from agenticai_core.designtime.models.llm_model import LlmModel, LlmModelConfig app = App( name="Personal Banker", description="Banking assistant application", orchestrationType=OrchestratorType.CUSTOM_SUPERVISOR, ai_model=LlmModel( model="gpt-4o", provider="Open AI", connection_name="Default Connection", modelConfig=LlmModelConfig(temperature=0.7, max_tokens=1600) ), agents=[ Agent(name="FinanceAssist", ...) ] ) ``` ``` -------------------------------- ### Example Supervisor Prompt with Metadata Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/how-tos/share-metadata-ais-to-agent-platform.md An example of a supervisor prompt that uses customer tier metadata to guide assistance. ```handlebars Assist the agent based on customer tier: {{memory.sessionMeta.metadata.customerTier}}. ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/koredotcom/docs/blob/dev/docs/agent-platform/sdk/contributing.md Command to build and preview the project documentation locally using mkdocs. ```bash mkdocs serve ``` -------------------------------- ### Client Event Request: User Typing Started Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/sdk/sdk-events.md Example JSON request payload for the 'on_client_event' to indicate that a user has started typing. ```json { "resourceid": "/bot.clientEvent", "preDefinedEvent" : { "type": "TYPING_STARTED" }, "customEvent": {"test":"test"}, "botInfo": {"chatBot":"", "taskBotId":""} } ``` -------------------------------- ### Get Dashboard Widget Data (GET) Source: https://github.com/koredotcom/docs/blob/dev/docs/xo/apis/automation/get-dashboard-widget-data.md Retrieves widget data using GET request. Requires bot ID, dashboard name, widget name, start date, and end date. ```APIDOC ## GET /api/public/bot/{{BotID}}/dashboard/{{dashboardName}}/widget/{{widgetName}} ### Description Retrieves the data associated with a specific custom widget within a dashboard. ### Method GET ### Endpoint `https://{{host}}/api/public/bot/{{BotID}}/dashboard/{{dashboardName}}/widget/{{widgetName}}?startDate={{startDate}}&endDate={{endDate}}&limit={{limit}}` ### Parameters #### Path Parameters - **host** (string) - Required - Environment URL, for example, https://platform.kore.ai - **BotID** (string) - Required - Bot ID or Stream ID. You can access it from the General Settings page of the bot. #### Query Parameters - **dashboardName** (string) - Required - Name of the Custom Dashboard containing the required Widget. - **widgetName** (string) - Required - Name of the Widget whose data needs to be retrieved. - **startDate** (string) - Required - The start date from which you want to see the changes. Enter the date in ISO date format. For example, March 30, 2020 would be 2020-03-30. - **endDate** (string) - Required - The end date up to which you want to see the changes. Enter the date in ISO date format. For example, March 30, 2020 would be 2020-03-30. - **limit** (integer) - Optional - The number of records to fetch. The maximum applicable limit is 50. ### Request Example ```json curl -X GET \ "https://{{host}}/api/public/bot/{{bot_id}}/dashboard/{{dashboardName}}/widget/{{widgetName}}?startDate={{startDate}}&endDate={{endDate}}" \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json' \ ``` ### Response #### Success Response (200) - **data** (object) - Contains the widget data. - **message** (string) - Success message. - **status** (string) - Status of the response. ```