智能体

部分更新智能体

Changed on

只修改请求中出现的字段,其余配置保持不变。 支持名称、描述、运行模式、系统提示词、对话模型、知识库、MCP、技能范围、联网搜索、多轮对话。 agent_mode 取 quick-answer 或 smart-reasoning。MCP 与技能只在 smart-reasoning 下运行,切到该模式会打开多轮对话。 传 knowledge_bases、mcp_services 或 selected_skills 而不传对应模式时,切换为 selected。 技能模式 all/none 清空技能列表;启用技能须先在编辑器选择沙箱,selected 名称须可用,否则返回 400。

patch/agents/{id}

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/agents/{id}
  • Auth
    • API key in header Authorization
    • or API key in header X-API-Key

Path parameters

idstring required

智能体ID

Request body

agent_mode'quick-answer' | 'smart-reasoning'

Running mode: quick-answer is RAG; smart-reasoning calls tools, MCP and skills

descriptionstring

What the agent is for

kb_selection_mode'all' | 'selected' | 'none'

Knowledge bases searched: all, selected (knowledge_bases) or none

knowledge_basesstring[]

Selected knowledge bases, replacing the current ones; without kb_selection_mode it also switches the mode to selected

mcp_selection_mode'all' | 'selected' | 'none'

MCP services used: all, selected (mcp_services) or none

mcp_servicesstring[]

Selected MCP services, replacing the current ones; without mcp_selection_mode it also switches the mode to selected

model_idstring

Chat model the agent answers with

multi_turn_enabledboolean

Whether earlier turns are kept in the conversation context

namestring

Agent name

selected_skillsstring[]

Selected skill names, replacing the current ones; without skills_selection_mode it also switches the mode to selected

skills_selection_mode'all' | 'selected' | 'none'

Skills used: all, selected (selected_skills) or none

system_promptstring

The whole system prompt

web_search_enabledboolean

Whether the agent may search the web

web_search_provider_idstring

Empty follows the workspace default; changing the provider does not enable search.

Response

更新后的智能体

successboolean

Example response

{
  "success": true
}

Changes