Agent Operations
Manageand operate agents. These endpoints allow you to create, retrieve, update, delete, and interact with agents through chats and background tasks.
API Layer: Create a new Agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
Request model for creating a workflow. Only includes fields that should be provided by the frontend.
Source type: 'emoji' or 'url'
Raw icon value: emoji char, full URL, or gallery key
Hex background color behind the icon
#FFF
Workflow mode, e.g., chat or job
job
Possible values: Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated
single-agent
Possible values: Workflow name
test_workflow_name
Workflow description
""
Example: test_description
List of tags
[]
Example: test_tag
Indicates if the item is marked as favorite
false
Extend properties
{}
POST /admin/api/v2/agents HTTP/1.1
Host: api.workfx.ai
Content-Type: application/json
Accept: */*
Content-Length: 260
{
"description": "A standard chat flow agent for general purposes",
"icon": "🤖",
"icon_background": "#EFF1F5",
"icon_type": "emoji",
"is_favorite": false,
"mode": "flow-chat",
"name": "Standard Chat Flow Agent",
"tags": [
"flow",
"chat",
"single-agent"
],
"type": "single-agent"
}
{
"icon_type": "emoji",
"icon": "text",
"icon_background": "#FFF",
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:58:58.331Z",
"updated_time": "2025-07-16T16:58:58.331Z",
"mode": "job",
"type": "single-agent",
"name": "test_workflow_name",
"description": "test_description",
"abilities": {
"file_upload": {
"enabled": true
}
},
"tags": "test_tag",
"is_favorite": false,
"extend_properties": {},
"id": "22a976a1-4f6d-4357-a167-26684daa60c5",
"tenant_id": "40d39c4b-9585-4123-8fd4-f1cc23a1184c",
"tenant_unit_id": "da114de3-d7e6-4161-bc55-0ce85dbee589",
"status": "ACTIVE",
"code": "text",
"definition_id": "text",
"definition_type": "flow",
"ab_test_id": "text",
"ab_test_enabled": false,
"usage_guide": "text",
"visibility": {},
"agent_definition_entity": {},
"variables": [
{}
],
"icon_url": "text"
}
API Layer: Retrieve a list of Agents with pagination and filtering.
Current page number
1
Items per page
20
Filter by favorite status
Filter by tags
Filter by mode (flow-chat | flow-job | instruction-chat | multi-agent-flow-chat | multi-agent-flow-job | multi-agent-instruction-chat)
Filter by name (fuzzy match)
order by: 'recent'(default) or 'oldest'
recent
Exclude draft agents
false
Filter by agent ids
Filter by agent type ('single-agent' | 'multi-agent')
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
GET /admin/api/v2/agents HTTP/1.1
Host: api.workfx.ai
Accept: */*
{
"page_num": 1,
"page_size": 1,
"total_count": 1,
"total_pages": 1,
"has_next_page": true,
"data": [
{
"icon_type": "emoji",
"icon": "text",
"icon_background": "#FFF",
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:58:58.331Z",
"updated_time": "2025-07-16T16:58:58.331Z",
"mode": "job",
"type": "single-agent",
"name": "test_workflow_name",
"description": "test_description",
"abilities": {
"file_upload": {
"enabled": true
}
},
"tags": "test_tag",
"is_favorite": false,
"extend_properties": {},
"id": "22a976a1-4f6d-4357-a167-26684daa60c5",
"tenant_id": "40d39c4b-9585-4123-8fd4-f1cc23a1184c",
"tenant_unit_id": "da114de3-d7e6-4161-bc55-0ce85dbee589",
"status": "ACTIVE",
"code": "text",
"definition_id": "text",
"definition_type": "flow",
"ab_test_id": "text",
"ab_test_enabled": false,
"usage_guide": "text",
"visibility": {},
"agent_definition_entity": {},
"variables": [
{}
],
"icon_url": "text"
}
]
}
API Layer: Retrieve a Agent by ID
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
GET /admin/api/v2/agents/{agent_id} HTTP/1.1
Host: api.workfx.ai
Accept: */*
{
"icon_type": "emoji",
"icon": "text",
"icon_background": "#FFF",
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:58:58.331Z",
"updated_time": "2025-07-16T16:58:58.331Z",
"mode": "job",
"type": "single-agent",
"name": "test_workflow_name",
"description": "test_description",
"abilities": {
"file_upload": {
"enabled": true
}
},
"tags": "test_tag",
"is_favorite": false,
"extend_properties": {},
"id": "22a976a1-4f6d-4357-a167-26684daa60c5",
"tenant_id": "40d39c4b-9585-4123-8fd4-f1cc23a1184c",
"tenant_unit_id": "da114de3-d7e6-4161-bc55-0ce85dbee589",
"status": "ACTIVE",
"code": "text",
"definition_id": "text",
"definition_type": "flow",
"ab_test_id": "text",
"ab_test_enabled": false,
"usage_guide": "text",
"visibility": {},
"agent_definition_entity": {},
"variables": [
{}
],
"icon_url": "text"
}
API Layer: Retrieve a Agent by code
GET /admin/api/v2/agents/code/{agent_code} HTTP/1.1
Host: api.workfx.ai
Accept: */*
{
"icon_type": "emoji",
"icon": "text",
"icon_background": "#FFF",
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:58:58.331Z",
"updated_time": "2025-07-16T16:58:58.331Z",
"mode": "job",
"type": "single-agent",
"name": "test_workflow_name",
"description": "test_description",
"abilities": {
"file_upload": {
"enabled": true
}
},
"tags": "test_tag",
"is_favorite": false,
"extend_properties": {},
"id": "22a976a1-4f6d-4357-a167-26684daa60c5",
"tenant_id": "40d39c4b-9585-4123-8fd4-f1cc23a1184c",
"tenant_unit_id": "da114de3-d7e6-4161-bc55-0ce85dbee589",
"status": "ACTIVE",
"code": "text",
"definition_id": "text",
"definition_type": "flow",
"ab_test_id": "text",
"ab_test_enabled": false,
"usage_guide": "text",
"visibility": {},
"agent_definition_entity": {},
"variables": [
{}
],
"icon_url": "text"
}
API Layer: Update an existing Agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
Type of icon used
emoji
Icon representation
🤖
Background color of the icon
#EFF1F5
Workflow name
test_workflow_name
Workflow description
test_description
List of tags
test_tag
Indicates if the item is marked as favorite
Workflow status
ACTIVE
AB test config ID
Indicates if AB testing is enabled
Extend properties
{}
Usage guide
PUT /admin/api/v2/agents/{agent_id} HTTP/1.1
Host: api.workfx.ai
Content-Type: application/json
Accept: */*
Content-Length: 300
{
"icon_type": "emoji",
"icon": "🤖",
"icon_background": "#EFF1F5",
"name": "test_workflow_name",
"description": "test_description",
"tags": "test_tag",
"is_favorite": false,
"status": "ACTIVE",
"ab_test_id": "123e4567-e89b-12d3-a456-426614174000",
"ab_test_enabled": false,
"extend_properties": {},
"usage_guide": "text"
}
{
"icon_type": "emoji",
"icon": "text",
"icon_background": "#FFF",
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:58:58.331Z",
"updated_time": "2025-07-16T16:58:58.331Z",
"mode": "job",
"type": "single-agent",
"name": "test_workflow_name",
"description": "test_description",
"abilities": {
"file_upload": {
"enabled": true
}
},
"tags": "test_tag",
"is_favorite": false,
"extend_properties": {},
"id": "22a976a1-4f6d-4357-a167-26684daa60c5",
"tenant_id": "40d39c4b-9585-4123-8fd4-f1cc23a1184c",
"tenant_unit_id": "da114de3-d7e6-4161-bc55-0ce85dbee589",
"status": "ACTIVE",
"code": "text",
"definition_id": "text",
"definition_type": "flow",
"ab_test_id": "text",
"ab_test_enabled": false,
"usage_guide": "text",
"visibility": {},
"agent_definition_entity": {},
"variables": [
{}
],
"icon_url": "text"
}
API Layer: Delete a Agent by ID
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
DELETE /admin/api/v2/agents/{agent_id} HTTP/1.1
Host: api.workfx.ai
Accept: */*
{}
API Layer: Invoke a Agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
""
Input variables
{"var1":"1","var2":2}
false
[]
wfx
{}
POST /admin/api/v2/agents/{agent_id}/chat 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
API Layer: Resume Invoke a Agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
""
Input variables
{"var1":"1","var2":2}
false
[]
wfx
{}
POST /admin/api/v2/agents/{agent_id}/chat/resume HTTP/1.1
Host: api.workfx.ai
Content-Type: application/json
Accept: */*
Content-Length: 207
{
"query": "",
"inputs": {
"var1": "1",
"var2": 2
},
"streaming": false,
"files": [
"text"
],
"response_type": "wfx",
"wfx_context": {},
"conversation_id": "text",
"interrupt_inputs": {},
"is_interrupted": true,
"flow_run_id": "text"
}
text
API Layer: Invoke a Agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
""
Input variables
{"var1":"1","var2":2}
false
[]
wfx
{}
POST /admin/api/v2/agents/{agent_id}/job 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?