Agent Flows

Manage conversational flows for agents. Use these APIs to create, update, retrieve, publish, list, and run draft flows. Ideal for designing, testing, and deploying multi-step agent behaviors.

Create Or Update Draft Flow Tool

post
路径参数
tool_idstring · uuid必填

Tool id

查询参数
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可选
请求体
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可选
owner_idany of可选

The ID of the flow this definition belongs to

Example: uuid-of-flow
string可选
null可选
owner_typeany of可选

Type of flow [flow, tool]

Example: flow
object可选
null可选
modeany of可选

Flow mode, e.g., chat or job

Example: job
string可选
null可选
versionany of可选

Version of the flow

Example: draft
string可选
null可选
graphobject · Graph可选

Flow graph

Default: {}Example: {}
featuresany of可选

Additional features for the flow

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

Environment variables for the flow

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

Conversation variables for the flow

Example: {}
null可选
响应
chevron-right
201

Successful Response

application/json
post
/admin/api/v2/tools/{tool_id}/flows

Get Draft

get

Get the DRAFT version of a flow

路径参数
agent_idstring · uuid必填
查询参数
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可选
响应
get
/admin/api/v2/agents/{agent_id}/flows/draft

Publish

post

Publish the current DRAFT version as a formal version

路径参数
agent_idstring · uuid必填
查询参数
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可选
响应
post
/admin/api/v2/agents/{agent_id}/flows/publish

List Versions

get

Get a list of all versions for a specific flow

路径参数
agent_idstring · uuid必填

Agent id

查询参数
page_numinteger可选

Current page number

Default: 1
page_sizeinteger可选

Items per page

Default: 20
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可选
响应
get
/admin/api/v2/agents/{agent_id}/flows

Run Draft Workflow

post

Run the draft version of the workflow

路径参数
agent_idstring · uuid必填Example: 22a976a1-4f6d-4357-a167-26684daa60c5
查询参数
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可选
请求体
响应
post
/admin/api/v2/agents/{agent_id}/flows/draft/runs

最后更新于

这有帮助吗?