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.
Tool id
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
The ID of the flow this definition belongs to
uuid-of-flow
Type of flow [flow, tool]
flow
Flow mode, e.g., chat or job
job
Version of the flow
draft
Flow graph
{}
Example: {}
Additional features for the flow
{}
Environment variables for the flow
{}
Conversation variables for the flow
{}
POST /admin/api/v2/tools/{tool_id}/flows HTTP/1.1
Host: api.workfx.ai
Content-Type: application/json
Accept: */*
Content-Length: 12
{
"graph": {}
}
{
"created_by": "user123",
"updated_by": "user124",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:48:59.022Z",
"updated_time": "2025-07-16T16:48:59.022Z",
"owner_id": "uuid-of-flow",
"owner_type": "flow",
"mode": "job",
"version": "draft",
"graph": {},
"features": {},
"flow_variables": {},
"conversation_variables": {},
"id": "uuid-of-definition",
"tenant_id": "uuid-of-tenant",
"tenant_unit_id": "tenant-unit-id"
}
Get the DRAFT version of a flow
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
GET /admin/api/v2/agents/{agent_id}/flows/draft HTTP/1.1
Host: api.workfx.ai
Accept: */*
{
"created_by": "user123",
"updated_by": "user124",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:48:59.022Z",
"updated_time": "2025-07-16T16:48:59.022Z",
"owner_id": "uuid-of-flow",
"owner_type": "flow",
"mode": "job",
"version": "draft",
"graph": {},
"features": {},
"flow_variables": {},
"conversation_variables": {},
"id": "uuid-of-definition",
"tenant_id": "uuid-of-tenant",
"tenant_unit_id": "tenant-unit-id"
}
Publish the current DRAFT version as a formal version
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
POST /admin/api/v2/agents/{agent_id}/flows/publish HTTP/1.1
Host: api.workfx.ai
Accept: */*
{
"created_by": "user123",
"updated_by": "user124",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:48:59.022Z",
"updated_time": "2025-07-16T16:48:59.022Z",
"owner_id": "uuid-of-flow",
"owner_type": "flow",
"mode": "job",
"version": "draft",
"graph": {},
"features": {},
"flow_variables": {},
"conversation_variables": {},
"id": "uuid-of-definition",
"tenant_id": "uuid-of-tenant",
"tenant_unit_id": "tenant-unit-id"
}
Get a list of all versions for a specific flow
Agent id
Current page number
1
Items per page
20
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
GET /admin/api/v2/agents/{agent_id}/flows HTTP/1.1
Host: api.workfx.ai
Accept: */*
{
"page_num": 1,
"page_size": 1,
"total_count": 1,
"has_next_page": true,
"data": [
{}
]
}
Run the draft version of the workflow
22a976a1-4f6d-4357-a167-26684daa60c5
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
POST /admin/api/v2/agents/{agent_id}/flows/draft/runs HTTP/1.1
Host: api.workfx.ai
Content-Type: application/json
Accept: */*
Content-Length: 142
{
"query": "",
"inputs": {
"var1": "1",
"var2": 2
},
"streaming": false,
"files": [
"text"
],
"response_type": "wfx",
"wfx_context": {},
"conversation_id": "text"
}
text
Last updated
Was this helpful?