Skip to main content
POST
/
v1
/
agent
/
{agent_id}
Update Agent
curl --request POST \
  --url https://api-spectra.duplik.cn/v1/agent/{agent_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "category": "sales",
  "conversation": {
    "background_color": "#FFFFFF",
    "background_image": "",
    "copyright": "",
    "enabled": true,
    "greeting_message": "",
    "guiding_questions": [
      "string"
    ],
    "recommended_related_questions_prompt": "",
    "show_answer_source": true,
    "show_answer_source_data": true,
    "text_color": "#000000"
  },
  "description": "You are a helpful assist",
  "icon": "https://example.com/analysis-icon.png",
  "llm": {
    "completion_params": {
      "max_memory": 2048,
      "max_memory_num": 5,
      "max_tokens": 2048,
      "temperature": 0.7
    },
    "model_name": "qwen2.5-72b-instruct",
    "model_provider": "aliyun"
  },
  "mode": "advanced_single",
  "name": "advanced_single_agent use kb and other tools",
  "orchestration": {
    "instruction": {
      "enabled": true,
      "rewriting_count": 3,
      "rewriting_prompt": "rewriting prompt"
    },
    "knowledge_list": [
      {
        "folders": [
          {
            "folder_id": "xxx",
            "name": "xxx"
          }
        ],
        "knowledge_id": "631506272047205"
      }
    ],
    "tools": [
      {
        "tool_apis": [
          {
            "api_id": "631506271514745"
          }
        ],
        "tool_id": "631506271912031"
      },
      {
        "tool_id": "631506271912032",
        "tool_llm": {
          "llm_id": "631506271514746"
        }
      }
    ],
    "voice": {
      "enabled": false,
      "input_enabled": false,
      "output_enabled": false
    }
  },
  "prompt": "You are a helpful assist",
  "publish_status": 1,
  "status": 1
}
'
{
  "created_at": 123,
  "updated_at": 123,
  "org_id": "<string>",
  "user_id": "<string>",
  "agent_id": "<string>",
  "name": "<string>",
  "mode": "<string>",
  "icon": "<string>",
  "description": "<string>",
  "category": "<string>",
  "prompt": "<string>",
  "status": 123,
  "publish_status": 123,
  "orchestration": {
    "instruction": {
      "enabled": true,
      "rewriting_count": 2,
      "rewriting_prompt": "<string>"
    },
    "knowledge_tools_mode": "smart",
    "knowledge_list": [
      {
        "knowledge_id": "<string>",
        "dataset_id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "icon": "<string>",
        "folders": [
          {
            "folder_id": "<string>",
            "name": "<string>"
          }
        ]
      }
    ],
    "tools": [
      {
        "description": "Updated tool description",
        "icon": "https://example.com/icon.png",
        "name": "Updated Tool Name",
        "status": 2,
        "tool_llm": {
          "description": "Updated llm tool description",
          "icon": "https://example.com/icon.png",
          "name": "Updated llm Tool Name",
          "params": [
            {
              "description": "content",
              "key": "content",
              "required": true,
              "test_data": "蛇年小蛇绕树枝"
            }
          ],
          "prompt": "你是一位英语翻译专家,请翻译如下内容,{content}"
        }
      }
    ],
    "voice": {
      "enabled": false,
      "input_enabled": false,
      "output_enabled": false
    },
    "multi_mode": "<string>",
    "member_agents": [
      {}
    ],
    "recursion_limit": 25,
    "intent_enabled": false,
    "intent_prompt": "<string>"
  },
  "llm": {
    "model_provider": "<string>",
    "model_name": "<string>",
    "completion_params": {
      "temperature": 0.1,
      "max_tokens": 2048,
      "max_memory": 2048,
      "max_memory_num": 5,
      "stop_sequences": [
        "<string>"
      ]
    },
    "model_description": "<string>"
  },
  "conversation": {
    "enabled": true,
    "greeting_message": "",
    "guiding_questions": [
      "<string>"
    ],
    "copyright": "",
    "background_color": "rgba(0, 114, 255, 0.10)",
    "text_color": "#313D4F",
    "background_image": "",
    "show_answer_source": false,
    "show_answer_source_data": false,
    "recommend_related_questions": true,
    "recommended_related_questions_prompt": ""
  },
  "created_by": "<string>",
  "permission_types": [],
  "message_count": 0
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string
required

Query Parameters

user_id
string

用户ID

Body

application/json
name
string | null

Name of the Agent

Maximum string length: 256
mode
string | null

Working mode of the Agent

icon
string | null

URL of the Agent's icon

Maximum string length: 1024
description
string | null

Detailed description of the Agent

category
string | null

Category of the Agent

prompt
string | null

System prompt for the Agent

status
integer | null

Enable status of the Agent

publish_status
integer | null

Publication status of the Agent, 0: draft, 1: published

orchestration
OrchestrationConfig · object

Orchestration configuration of the Agent

llm
LLMConfig · object

Language model configuration of the Agent

conversation
ConversationConfig · object

Conversation configuration of the Agent

created_by
string | null

Agent created by

Response

Successful Response

Agent read model

created_at
integer | null
required
updated_at
integer | null
required
org_id
string
required
user_id
string
required
agent_id
string
required
name
string | null

Name of the Agent

Maximum string length: 256
mode
string | null

Working mode of the Agent

icon
string | null

URL of the Agent's icon

Maximum string length: 1024
description
string | null

Detailed description of the Agent

category
string | null

Category of the Agent

prompt
string | null

System prompt for the Agent

status
integer | null

Enable status of the Agent

publish_status
integer | null

Publication status of the Agent, 0: draft, 1: published

orchestration
OrchestrationConfig · object

Orchestration configuration of the Agent

llm
LLMConfig · object

Language model configuration of the Agent

conversation
ConversationConfig · object

Conversation configuration of the Agent

created_by
string | null
permission_types
string[]
message_count
integer | null
default:0