Get AI Agent
Section titled “Get AI Agent”GET /agents/{agentId}
Get AI Agent based on Id
curl --location 'https://ekoai.ekoapp.com/agents/{agentId}' \--header 'Authorization: Bearer {token}'Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Response
{ "name": "EkoAI_ekoai_demo_ai_assistant", "type": "tools", "tools": { "report_builder": { "toolName": "report_builder", "config": { "timezone": "Asia/Bangkok" } }, "research": { "toolName": "research", "config": { "allowedResearchTypes": [ "web_search", "news", "images", "videos", "shopping", "places" ] } }, "web_scraper": { "toolName": "web_scraper" }, "image_generator": { "toolName": "image_generator", "config": { "image_preference": "" } } }, "features": { "generative_dashboard": true, "inner_thought": true, "secure_report": false, "suggested_questions": true }, "homeScreen": { "title": "", "description": "", "predefinedPrompts": [ { "title": "Text me message", "text": "send me some message", "icon": { "color": "#ffb400", "id": "comment" } } ] }, "systemPrompt": "\n You're a female internal AI assistant to answer employee enquiries within a company called \"Amity\" - a company in Thailand. \n Answer Guidelines:\n Guidelines:\n - You may use markdown syntax to format your responses.\n - Provide comprehensive and detailed answer to the question.\n - [IMPORTANT] Never mention any tool name you are calling - just call the tool using <tool> xml tags and get the result.\n - [IMPORTANT] NEVER make up data or provide false information - always use data returned from the tool.\n\t\t\t- If you're asked about some topic or news, use 'research' tool to perform google search and provide the information using <tool> xml tag\n - Format your response in markdown language - and you can use any markdown table, bold text, or any other markdown syntax as needed.\n \nContext:\n\n## บทสรุปผู้บริหาร\n\nรายงานนี้นำเสนอการวิเคราะห์ยอด stock สินค้าของสาขา 5032 ในวันที่ 1 กุมภาพันธ์ 2024 โดยเปรียบเทียบกับช่วงเวลาต่างๆ และแบ่งตามหมวดหมู่ต่างๆ\n\n**ประเด็นสำคัญ:**\n\n* ยอดขายรวมวันที่ 1 กุมภาพันธ์ 2024: coke zero 1800 ขวด\n* เพิ่มขึ้น 10% เมื่อเทียบกับเมื่อวาน\n\nผลการวิเคราะห์แสดงให้เห็นถึงการเติบโตของยอดขายเมื่อเทียบกับปีก่อน แต่ยังต่ำกว่าเป้าหมายรายสัปดาห์ ซึ่งชี้ให้เห็นถึงโอกาสในการปรับปรุงและเพิ่มยอดขายในช่วงเวลาที่เหลือของสัปดาห์\n\n## การวิเคราะห์ยอดขายรายวัน\n\nยอดขายของสาขา 5032 ในวันที่ 1 กุมภาพันธ์ 2024 coke zero 800 ขวด\n\nเมื่อเปรียบเทียบกับเป้าหมายยอดขายรายสัปดาห์ที่ 2000 ขวด พบว่ายอดขายวันที่ 1 กุมภาพันธ์ 2024 ต่ำกว่าเป้าหมายอยู่ที่ 200 ขวด\n\n## สินค้าคงเหลือ\n\nเมื่อเทียบกับสินค้าใน stock ที่เหลืออยู่ 65 ขวด\n\nและของใน stock ต้องมีมากกว่า 300 ขวด หมายความว่า พนักงานราค้าจะต้องสั่ง 235 ขวดเป็นอย่างต่ำ\n\nอย่างไรก็ตามพนักงานต้องสั่งเป็นแพ็คซึ่งมี 12 ขวด หมายความว่าพนักงานต้อง สั่ง 20 แพ็ค หรือเท่ากับ 240 ขวด\n\n\n## Reference Data\n\n### Data Set 1\n\n| total\\_sales\\_amount |\n| --- |\n| 1800|\n\n### Data Set 2\n\n| SALES\\_TY | WEEKLY\\_TARGET | DIFFERENCE |\n| --- | --- | --- |\n| 1800 | 2000 | -200 |", "id": "{clientId}", "networkId": "{networkId}", "model": "gpt-4o", "channels": [ { "channelType": "eko", "clientId": "{clientId}", "clientSecret": "{clientSecret}", "ekoaiUrl": "https://ekogreen-h1.ekoapp.com", "channelId": "{clientId}" } ], "_ts": 1738210137}{ "name": "Studio Local", "type": "ekoaistudio", "tools": {}, "id": "76203fa0-0fb2-441a-9de8-3f09376e689f", "channels": [ { "clientId": "76203fa0-0fb2-441a-9de8-3f09376e689f", "channelType": "eko", "clientSecret": "<CLIENT_SECRET>", "channelId": "Y5Q01KE2", "ekoaiUrl": "https://sea-staging-h1.ekoapp.com" } ], "networkId": "76203fa0-0fb2-441a-9de8-3f09376e689f", "ekoaiStudioConfig": { "secret": "NOTUSED", "workflow": "content" }, "_rid": "uuAPALnak8wHAAAAAAAAAA==", "_self": "dbs/uuAPAA==/colls/uuAPALnak8w=/docs/uuAPALnak8wHAAAAAAAAAA==/", "_etag": "\"0e001895-0000-1800-0000-665486ee0000\"", "_attachments": "attachments/", "_ts": 1716815598}{ "name": "LMWN-Staging", "type": "botsplus", "id": "2da913f3-717c-4c2f-9ef3-81ea28956b91", "channels": [ { "clientId": "2da913f3-717c-4c2f-9ef3-81ea28956b91", "channelType": "eko", "clientSecret": "<CLIENT_SECRET>", "ekoaiUrl": "https://sea-staging-h1.ekoapp.com", "channelId": "1NBM9VYH" } ], "logging": { "line_notify_token": "XQjYYwrCf1BrDlyfrHvVDC8cuZ5bN0jgMVn5LBmZkTF" }, "networkId": "2da913f3-717c-4c2f-9ef3-81ea28956b91", "botsplusConfig": { "secret": "<SECRET>" }, "_rid": "uuAPALnak8wEAAAAAAAAAA==", "_self": "dbs/uuAPAA==/colls/uuAPALnak8w=/docs/uuAPALnak8wEAAAAAAAAAA==/", "_etag": "\"0d008be6-0000-1800-0000-66540b250000\"", "_attachments": "attachments/", "_ts": 1716783909}Create and Update agent
Section titled “Create and Update agent”POST ``/agents
Create or Update agent tools
curl --location 'https://ekoai.ekoapp.com/agents' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer {token}' \--data '{ "id": "9009e401-cbc7-4963-8932-134873f7d8dd", "name": "API assistant", "networkId": "679349450241866197fd98ff", "type": "tools", "tools": { "report_builder": { "toolName": "report_builder", "config": { "timezone": "Asia/Bangkok" } }, "research": { "toolName": "research", "config": { "allowedResearchTypes": [ "web_search", "news", "images", "videos", "shopping", "places" ] } }, "web_scraper": { "toolName": "web_scraper" }, "image_generator": { "toolName": "image_generator", "config": { "image_preference": "" } }, "query_knowledge_base": { "toolName": "query_knowledge_base", "config": { "knowledgebases": [ { "id": 5158, "description": "Knowledge Base 1", "assistant_secret": "9df85eae23a34a8e635097c9616e1c8cf9d11357bae97ff4d6b2fdf9de1a5399", "language": "en" } ] } } }, "systemPrompt": "Act as agent in following conversation example. Write answer without prefix '\''agent'\''.When the user requests private, sensitive, or dynamic information (e.g., PII or transient values like prices, dates, or events), represent such information using placeholder tags in the format <value>.Example dynamic information:user: ticket price today.agent: Today'\''s ticket price is <ticket_price>.<CONTEXT>", "model": "gpt-4o", "channels": [ { "channelType": "eko", "clientId": "9009e401-cbc7-4963-8932-134873f7d8dd", "clientSecret": "<CLIENT_SECRET>", "ekoaiUrl": "https://ekogreen-h1.ekoapp.com", "channelId": "9009e401-cbc7-4963-8932-134873f7d8dd" } ], "homeScreen": { "title": "", "description": "", "predefinedPrompts": [ { "title": "Text me message", "text": "send me some message", "icon": { "color": "#ffb400", "id": "comment" } } ] }}'Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Body
| Field | Type | Description |
|---|---|---|
| id* | String | The unique identifier for the agent. |
| name* | String | The name of the agent. |
| networkId* | String | The ID of the network to which the agent belongs. |
| type* | String |
|
| tools | Objects | An object containing the configuration for the tools used by the agent. Each key in the object represents a tool name, and the corresponding value is a ToolAssistantConfig object. This field is only applicable when the type is set to ‘tools’. |
| botsplusConfig | Objects | An object containing the configuration for the BotsPlus agent. It is only needed when the
|
| ekoaiStudioConfig | Objects | An object containing the configuration for the EkoaiStudio agent. It is only needed when the
|
| logging | Objects | An object containing the logging configuration for the agent. It includes the following field:
|
| systemPrompt | String | The system prompt used by the agent to provide instructions or context. |
| model | AgentModel | The configuration for the agent’s language model. Available options include:
|
| channels | Array of Objects | An array of channel configurations for the agent, specifying the channels through which the agent can communicate. Currently only supports
|
| feature | Objects | Set of feature flags and configuration to enable / disable for the assistant:
|
Response
{ "status": "success"}Was this page helpful?
Thank you for your feedback!