Agent Operations

Manageand operate agents. These endpoints allow you to create, retrieve, update, delete, and interact with agents through chats and background tasks.

Create Agent

post

API Layer: Create a new Agent

查询参数
tenant_idany of可选

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
string可选
null可选
tenant_unit_idany of可选

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
string可选
null可选
请求体

Request model for creating a workflow. Only includes fields that should be provided by the frontend.

icon_typeany of可选

Source type: 'emoji' or 'url'

string · enum可选可能的值:
null可选
iconany of可选

Raw icon value: emoji char, full URL, or gallery key

string可选
null可选
icon_backgroundany of可选

Hex background color behind the icon

Default: #FFF
string可选
null可选
created_byany of可选
string可选
null可选
updated_byany of可选
string可选
null可选
created_by_roleany of可选
string可选
null可选
updated_by_roleany of可选
string可选
null可选
created_timeany of可选
string · date-time可选
null可选
updated_timeany of可选
string · date-time可选
null可选
modestring · enum必填

Workflow mode, e.g., chat or job

Example: job可能的值:
typestring · enum必填

Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated

Example: single-agent可能的值:
namestring必填

Workflow name

Example: test_workflow_name
descriptionany of可选

Workflow description

Default: ""Example: test_description
string可选
null可选
tagsstring[]可选

List of tags

Default: []Example: test_tag
is_favoriteboolean可选

Indicates if the item is marked as favorite

Default: false
extend_propertiesany of可选

Extend properties

Example: {}
object可选
null可选
响应
post
/admin/api/v2/agents

List Agents

get

API Layer: Retrieve a list of Agents with pagination and filtering.

查询参数
page_numinteger可选

Current page number

Default: 1
page_sizeinteger可选

Items per page

Default: 20
is_favoriteany of可选

Filter by favorite status

boolean可选
null可选
tagsany of可选

Filter by tags

string[]可选
null可选
modeany of可选

Filter by mode (flow-chat | flow-job | instruction-chat | multi-agent-flow-chat | multi-agent-flow-job | multi-agent-instruction-chat)

string可选
null可选
nameany of可选

Filter by name (fuzzy match)

string可选
null可选
orderany of可选

order by: 'recent'(default) or 'oldest'

Default: recent
string可选
null可选
exclude_draftany of可选

Exclude draft agents

Default: false
boolean可选
null可选
agent_idsany of可选

Filter by agent ids

string[]可选
null可选
typeany of可选

Filter by agent type ('single-agent' | 'multi-agent')

string可选
null可选
tenant_idany of可选

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
string可选
null可选
tenant_unit_idany of可选

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
string可选
null可选
响应
chevron-right
200

Successful Response

application/json

Paginated response for flows.

page_numinteger必填

Current page number

page_sizeinteger必填

Number of items per page

total_countinteger必填

Total number of items

total_pagesinteger必填

Total number of pages

has_next_pageboolean必填

Whether there is a next page

get
/admin/api/v2/agents

Get Agent

get

API Layer: Retrieve a Agent by ID

路径参数
agent_idstring必填
查询参数
tenant_idany of可选

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
string可选
null可选
tenant_unit_idany of可选

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
string可选
null可选
响应
chevron-right
200

Successful Response

application/json

Response model for created workflow, which includes all fields of AgentItem.

icon_typeany of可选

Source type: 'emoji' or 'url'

string · enum可选可能的值:
null可选
iconany of可选

Raw icon value: emoji char, full URL, or gallery key

string可选
null可选
icon_backgroundany of可选

Hex background color behind the icon

Default: #FFF
string可选
null可选
created_byany of可选
string可选
null可选
updated_byany of可选
string可选
null可选
created_by_roleany of可选
string可选
null可选
updated_by_roleany of可选
string可选
null可选
created_timeany of可选
string · date-time可选
null可选
updated_timeany of可选
string · date-time可选
null可选
modestring · enum必填

Workflow mode, e.g., chat or job

Example: job可能的值:
typestring必填

Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated

Example: single-agent
namestring必填

Workflow name

Example: test_workflow_name
descriptionany of可选

Workflow description

Default: ""Example: test_description
string可选
null可选
abilitiesany of可选

Extend properties

Default: {"opening_statement":"","suggested_questions":[],"suggested_questions_after_answer":{"enabled":false},"text_to_speech":{"enabled":false,"language":"","voice":""},"speech_to_text":{"enabled":false},"retriever_resource":{"enabled":false},"sensitive_word_avoidance":{"enabled":false},"file_upload":{"allowed_file_extensions":[],"allowed_file_types":["image","video","audio","document"],"allowed_file_upload_methods":["local_file","remote_url"],"enabled":true,"fileUploadConfig":{"audio_file_size_limit":50,"batch_count_limit":5,"file_size_limit":15,"image_file_size_limit":10,"video_file_size_limit":100,"workflow_file_upload_limit":10},"image_config":{"detail":"low"},"number_limits":4}}Example: {"file_upload":{"enabled":true}}
null可选
tagsstring[]可选

List of tags

Default: []Example: test_tag
is_favoriteboolean可选

Indicates if the item is marked as favorite

Default: false
extend_propertiesany of可选

Extend properties

Example: {}
object可选
null可选
idany of可选

Workflow ID

Example: 22a976a1-4f6d-4357-a167-26684daa60c5
string可选
null可选
tenant_idstring必填

Tenant ID of creator

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
tenant_unit_idstring必填

Tenant Unit ID of creator

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
statusstring可选

Workflow status

Default: ACTIVEExample: ACTIVE
codeany of可选

Workflow status

string可选
null可选
definition_idany of可选

Definition id

string可选
null可选
definition_typeany of可选

definition_type

string · enum可选可能的值:
null可选
ab_test_idany of可选

AB test config ID

string可选
null可选
ab_test_enabledany of可选

Indicates if AB testing is enabled

Default: false
boolean可选
null可选
usage_guideany of可选

Usage guide

string可选
null可选
visibilityany of可选

Resource visibility

object可选
null可选
agent_definition_entityany of可选

Agent definition entity

object可选
null可选
variablesany of可选

Variables

object[]可选
null可选
icon_urlany of只读必填
string可选
null可选
get
/admin/api/v2/agents/{agent_id}

Get Agent By Code

get

API Layer: Retrieve a Agent by code

路径参数
agent_codestring必填
响应
chevron-right
200

Successful Response

application/json

Response model for created workflow, which includes all fields of AgentItem.

icon_typeany of可选

Source type: 'emoji' or 'url'

string · enum可选可能的值:
null可选
iconany of可选

Raw icon value: emoji char, full URL, or gallery key

string可选
null可选
icon_backgroundany of可选

Hex background color behind the icon

Default: #FFF
string可选
null可选
created_byany of可选
string可选
null可选
updated_byany of可选
string可选
null可选
created_by_roleany of可选
string可选
null可选
updated_by_roleany of可选
string可选
null可选
created_timeany of可选
string · date-time可选
null可选
updated_timeany of可选
string · date-time可选
null可选
modestring · enum必填

Workflow mode, e.g., chat or job

Example: job可能的值:
typestring必填

Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated

Example: single-agent
namestring必填

Workflow name

Example: test_workflow_name
descriptionany of可选

Workflow description

Default: ""Example: test_description
string可选
null可选
abilitiesany of可选

Extend properties

Default: {"opening_statement":"","suggested_questions":[],"suggested_questions_after_answer":{"enabled":false},"text_to_speech":{"enabled":false,"language":"","voice":""},"speech_to_text":{"enabled":false},"retriever_resource":{"enabled":false},"sensitive_word_avoidance":{"enabled":false},"file_upload":{"allowed_file_extensions":[],"allowed_file_types":["image","video","audio","document"],"allowed_file_upload_methods":["local_file","remote_url"],"enabled":true,"fileUploadConfig":{"audio_file_size_limit":50,"batch_count_limit":5,"file_size_limit":15,"image_file_size_limit":10,"video_file_size_limit":100,"workflow_file_upload_limit":10},"image_config":{"detail":"low"},"number_limits":4}}Example: {"file_upload":{"enabled":true}}
null可选
tagsstring[]可选

List of tags

Default: []Example: test_tag
is_favoriteboolean可选

Indicates if the item is marked as favorite

Default: false
extend_propertiesany of可选

Extend properties

Example: {}
object可选
null可选
idany of可选

Workflow ID

Example: 22a976a1-4f6d-4357-a167-26684daa60c5
string可选
null可选
tenant_idstring必填

Tenant ID of creator

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
tenant_unit_idstring必填

Tenant Unit ID of creator

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
statusstring可选

Workflow status

Default: ACTIVEExample: ACTIVE
codeany of可选

Workflow status

string可选
null可选
definition_idany of可选

Definition id

string可选
null可选
definition_typeany of可选

definition_type

string · enum可选可能的值:
null可选
ab_test_idany of可选

AB test config ID

string可选
null可选
ab_test_enabledany of可选

Indicates if AB testing is enabled

Default: false
boolean可选
null可选
usage_guideany of可选

Usage guide

string可选
null可选
visibilityany of可选

Resource visibility

object可选
null可选
agent_definition_entityany of可选

Agent definition entity

object可选
null可选
variablesany of可选

Variables

object[]可选
null可选
icon_urlany of只读必填
string可选
null可选
get
/admin/api/v2/agents/code/{agent_code}

Update Agent

put

API Layer: Update an existing Agent

路径参数
agent_idstring必填
查询参数
tenant_idany of可选

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
string可选
null可选
tenant_unit_idany of可选

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
string可选
null可选
请求体
icon_typeany of可选

Type of icon used

Example: emoji
string可选
null可选
iconany of可选

Icon representation

Example: 🤖
string可选
null可选
icon_backgroundany of可选

Background color of the icon

Example: #EFF1F5
string可选
null可选
nameany of可选

Workflow name

Example: test_workflow_name
string可选
null可选
descriptionany of可选

Workflow description

Example: test_description
string可选
null可选
tagsany of可选

List of tags

Example: test_tag
string[]可选
null可选
is_favoriteany of可选

Indicates if the item is marked as favorite

boolean可选
null可选
statusany of可选

Workflow status

Example: ACTIVE
string可选
null可选
ab_test_idany of可选

AB test config ID

string · uuid可选
null可选
ab_test_enabledany of可选

Indicates if AB testing is enabled

boolean可选
null可选
extend_propertiesany of可选

Extend properties

Example: {}
object可选
null可选
usage_guideany of可选

Usage guide

string可选
null可选
响应
chevron-right
200

Successful Response

application/json

Response model for created workflow, which includes all fields of AgentItem.

icon_typeany of可选

Source type: 'emoji' or 'url'

string · enum可选可能的值:
null可选
iconany of可选

Raw icon value: emoji char, full URL, or gallery key

string可选
null可选
icon_backgroundany of可选

Hex background color behind the icon

Default: #FFF
string可选
null可选
created_byany of可选
string可选
null可选
updated_byany of可选
string可选
null可选
created_by_roleany of可选
string可选
null可选
updated_by_roleany of可选
string可选
null可选
created_timeany of可选
string · date-time可选
null可选
updated_timeany of可选
string · date-time可选
null可选
modestring · enum必填

Workflow mode, e.g., chat or job

Example: job可能的值:
typestring必填

Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated

Example: single-agent
namestring必填

Workflow name

Example: test_workflow_name
descriptionany of可选

Workflow description

Default: ""Example: test_description
string可选
null可选
abilitiesany of可选

Extend properties

Default: {"opening_statement":"","suggested_questions":[],"suggested_questions_after_answer":{"enabled":false},"text_to_speech":{"enabled":false,"language":"","voice":""},"speech_to_text":{"enabled":false},"retriever_resource":{"enabled":false},"sensitive_word_avoidance":{"enabled":false},"file_upload":{"allowed_file_extensions":[],"allowed_file_types":["image","video","audio","document"],"allowed_file_upload_methods":["local_file","remote_url"],"enabled":true,"fileUploadConfig":{"audio_file_size_limit":50,"batch_count_limit":5,"file_size_limit":15,"image_file_size_limit":10,"video_file_size_limit":100,"workflow_file_upload_limit":10},"image_config":{"detail":"low"},"number_limits":4}}Example: {"file_upload":{"enabled":true}}
null可选
tagsstring[]可选

List of tags

Default: []Example: test_tag
is_favoriteboolean可选

Indicates if the item is marked as favorite

Default: false
extend_propertiesany of可选

Extend properties

Example: {}
object可选
null可选
idany of可选

Workflow ID

Example: 22a976a1-4f6d-4357-a167-26684daa60c5
string可选
null可选
tenant_idstring必填

Tenant ID of creator

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
tenant_unit_idstring必填

Tenant Unit ID of creator

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
statusstring可选

Workflow status

Default: ACTIVEExample: ACTIVE
codeany of可选

Workflow status

string可选
null可选
definition_idany of可选

Definition id

string可选
null可选
definition_typeany of可选

definition_type

string · enum可选可能的值:
null可选
ab_test_idany of可选

AB test config ID

string可选
null可选
ab_test_enabledany of可选

Indicates if AB testing is enabled

Default: false
boolean可选
null可选
usage_guideany of可选

Usage guide

string可选
null可选
visibilityany of可选

Resource visibility

object可选
null可选
agent_definition_entityany of可选

Agent definition entity

object可选
null可选
variablesany of可选

Variables

object[]可选
null可选
icon_urlany of只读必填
string可选
null可选
put
/admin/api/v2/agents/{agent_id}

Delete Agent

delete

API Layer: Delete a Agent by ID

路径参数
agent_idstring必填
查询参数
tenant_idany of可选

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
string可选
null可选
tenant_unit_idany of可选

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
string可选
null可选
响应
delete
/admin/api/v2/agents/{agent_id}

Invoke Agent Chat

post

API Layer: Invoke a Agent

路径参数
agent_idstring必填
查询参数
tenant_idany of可选

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
string可选
null可选
tenant_unit_idany of可选

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
string可选
null可选
请求体
queryany of可选Default: ""
string可选
null可选
inputsany of可选

Input variables

Example: {"var1":"1","var2":2}
object可选
null可选
streamingboolean可选Default: false
filesany of可选Default: []
string[]可选
null可选
response_typeany of可选Default: wfx
string可选
null可选
wfx_contextany of可选Default: {}
object可选
null可选
conversation_idany of可选
string可选
null可选
响应
chevron-right
200

Successful Response

application/json
string可选
post
/admin/api/v2/agents/{agent_id}/chat

Resume Invoke Agent Chat

post

API Layer: Resume Invoke a Agent

路径参数
agent_idstring必填
查询参数
tenant_idany of可选

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
string可选
null可选
tenant_unit_idany of可选

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
string可选
null可选
请求体
queryany of可选Default: ""
string可选
null可选
inputsany of可选

Input variables

Example: {"var1":"1","var2":2}
object可选
null可选
streamingboolean可选Default: false
filesany of可选Default: []
string[]可选
null可选
response_typeany of可选Default: wfx
string可选
null可选
wfx_contextany of可选Default: {}
object可选
null可选
conversation_idany of可选
string可选
null可选
interrupt_inputsobject · Interrupt Inputs必填
is_interruptedboolean必填
flow_run_idstring必填
响应
chevron-right
200

Successful Response

application/json
string可选
post
/admin/api/v2/agents/{agent_id}/chat/resume

Invoke Agent Job

post

API Layer: Invoke a Agent

路径参数
agent_idstring必填
查询参数
tenant_idany of可选

Tenant Id

Example: 40d39c4b-9585-4123-8fd4-f1cc23a1184c
string可选
null可选
tenant_unit_idany of可选

Tenant Unit ID

Example: da114de3-d7e6-4161-bc55-0ce85dbee589
string可选
null可选
请求体
queryany of可选Default: ""
string可选
null可选
inputsany of可选

Input variables

Example: {"var1":"1","var2":2}
object可选
null可选
streamingboolean可选Default: false
filesany of可选Default: []
string[]可选
null可选
response_typeany of可选Default: wfx
string可选
null可选
wfx_contextany of可选Default: {}
object可选
null可选
conversation_idany of可选
string可选
null可选
响应
chevron-right
200

Successful Response

application/json
string可选
post
/admin/api/v2/agents/{agent_id}/job

最后更新于

这有帮助吗?