Skip to content

Update an Agent

Update an Agent

PUT /agents/{agentId}

curl --location --request PUT 'https://ekoai.ekoapp.com/agents/{agentId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
"id": "{cleintId}",
"name": "API assistant",
"networkId": "{networkId}",
"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": {assistantId},
"description": "Knowledge Base 1",
"assistant_secret": "{assistantSecret}",
"language": "en"
}
]
}
}
},
"systemPrompt": "String",
"model": "gpt-4o",
"channels": [
{
"channelType": "eko",
"clientId": "{clientId}",
"clientSecret": "{clientSecret}",
"ekoaiUrl": "https://ekogreen-h1.ekoapp.com",
"channelId": "{clientId}"
}
],
"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

FieldTypeDescription
id*StringThe unique identifier for the agent.
name*StringThe name of the agent.
networkId*StringThe ID of the network to which the agent belongs.
type*String

  • ‘tools’: Indicates that the agent uses a set of tools.
  • ‘botsplus’: Indicates that the agent uses the BotsPlus configuration.
  • ‘ekoaistudio’: Indicates that the agent uses the EkoaiStudio configuration.
toolsObjectsAn 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’.
botsplusConfigObjects

An object containing the configuration for the BotsPlus agent. It is only needed when the type is set to ‘botsplus’. It includes the following fields:

  • secret (string): The secret key for authenticating with the BotsPlus service.
  • endpoint (string, optional): The endpoint URL for the BotsPlus service.
ekoaiStudioConfigObjects

An object containing the configuration for the EkoaiStudio agent. It is only needed when the type is set to ‘ekoaistudio’. It includes the following fields:

  • secret (string): The secret key for authenticating with the EkoaiStudio service.
  • endpoint (string, optional): The endpoint URL for the EkoaiStudio service.
  • workflow (string): The workflow identifier for the EkoaiStudio agent to interact with.
loggingObjects

An object containing the logging configuration for the agent. It includes the following field:

  • line_notify_token (string, optional): The token for sending notifications via LINE Notify on all request response of the agent
systemPromptStringThe system prompt used by the agent to provide instructions or context.
modelAgentModel

The configuration for the agent’s language model. Available options include:

  • ‘gpt-3.5-turbo-0125’
  • ‘gpt-4-0125-preview’
  • ‘claude-3-haiku-20240307’
  • ‘claude-3-sonnet-20240229’
  • ‘claude-3-opus-20240229’
  • ‘accounts/fireworks/models/llama-v3-70b-instruct’
  • ‘accounts/fireworks/models/dbrx-instruct’
channelsArray of Objects

An array of channel configurations for the agent, specifying the channels through which the agent can communicate. Currently only supports eko channel with the following JSON format

  • {
    “clientId”: <clientId of eko bot>,
    “channelType”: “eko”,
    “clientSecret”: <client secret of eko bot>,
    “ekoaiUrl”: <api endpoint of eko bot>,
    “channelId”: <any random ID>
    }
featureObjects

Set of feature flags and configuration to enable / disable for the assistant:

  • generative_dashboard - set to true to enable Generative Dashboard feature for all conversation between all users and this assistant
  • inner_thought - set to true to enable chain-of-thought process before providing response. This allow bots to handle more complex answer and tool chaining
  • secure_report - set to true to secure any report generated from this assistant. User will need to have access to the same Eko network.

Response

{
"id": "{agentId}",
"name": "API assistant",
"networkId": "{networkId}",
"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": {assistantId},
"description": "Knowledge Base 1",
"assistant_secret": "{assistantSecret}",
"language": "en"
}
]
}
}
},
"systemPrompt": "String",
"model": "gpt-4o",
"channels": [
{
"channelType": "eko",
"clientId": "{clientId}",
"clientSecret": "{clientSecret}",
"ekoaiUrl": "https://ekogreen-h1.ekoapp.com",
"channelId": "{clientId}"
}
],
"homeScreen": {
"title": "",
"description": "",
"predefinedPrompts": [
{
"title": "Text me message",
"text": "send me some message",
"icon": {
"color": "#ffb400",
"id": "comment"
}
}
]
}
}