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-f1cc23a1184cTenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589Request 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
#FFFWorkflow mode, e.g., chat or job
jobPossible values: Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated
single-agentPossible values: Workflow name
test_workflow_nameWorkflow description
""Example: test_descriptionList of tags
[]Example: test_tagIndicates if the item is marked as favorite
falseExtend properties
{}Successful Response
Response model for created workflow, which includes all fields of AgentItem.
Source type: 'emoji' or 'url'
Raw icon value: emoji char, full URL, or gallery key
Hex background color behind the icon
#FFFWorkflow mode, e.g., chat or job
jobPossible values: Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated
single-agentWorkflow name
test_workflow_nameWorkflow description
""Example: test_descriptionList of tags
[]Example: test_tagIndicates if the item is marked as favorite
falseExtend properties
{}Workflow ID
22a976a1-4f6d-4357-a167-26684daa60c5Tenant ID of creator
40d39c4b-9585-4123-8fd4-f1cc23a1184cTenant Unit ID of creator
da114de3-d7e6-4161-bc55-0ce85dbee589Workflow status
ACTIVEExample: ACTIVEWorkflow status
Definition id
definition_type
AB test config ID
Indicates if AB testing is enabled
falseUsage guide
Resource visibility
Agent definition entity
Variables
Validation Error
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": "2026-01-01T00:00:00.000Z",
"updated_time": "2026-01-01T00:00:00.000Z",
"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
1Items per page
20Filter 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'
recentExclude draft agents
falseFilter by agent ids
Filter by agent type ('single-agent' | 'multi-agent')
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184cTenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589Successful Response
Paginated response for flows.
Current page number
Number of items per page
Total number of items
Total number of pages
Whether there is a next page
Validation Error
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": "2026-01-01T00:00:00.000Z",
"updated_time": "2026-01-01T00:00:00.000Z",
"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-f1cc23a1184cTenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589Successful Response
Response model for created workflow, which includes all fields of AgentItem.
Source type: 'emoji' or 'url'
Raw icon value: emoji char, full URL, or gallery key
Hex background color behind the icon
#FFFWorkflow mode, e.g., chat or job
jobPossible values: Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated
single-agentWorkflow name
test_workflow_nameWorkflow description
""Example: test_descriptionList of tags
[]Example: test_tagIndicates if the item is marked as favorite
falseExtend properties
{}Workflow ID
22a976a1-4f6d-4357-a167-26684daa60c5Tenant ID of creator
40d39c4b-9585-4123-8fd4-f1cc23a1184cTenant Unit ID of creator
da114de3-d7e6-4161-bc55-0ce85dbee589Workflow status
ACTIVEExample: ACTIVEWorkflow status
Definition id
definition_type
AB test config ID
Indicates if AB testing is enabled
falseUsage guide
Resource visibility
Agent definition entity
Variables
Validation Error
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": "2026-01-01T00:00:00.000Z",
"updated_time": "2026-01-01T00:00:00.000Z",
"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
Successful Response
Response model for created workflow, which includes all fields of AgentItem.
Source type: 'emoji' or 'url'
Raw icon value: emoji char, full URL, or gallery key
Hex background color behind the icon
#FFFWorkflow mode, e.g., chat or job
jobPossible values: Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated
single-agentWorkflow name
test_workflow_nameWorkflow description
""Example: test_descriptionList of tags
[]Example: test_tagIndicates if the item is marked as favorite
falseExtend properties
{}Workflow ID
22a976a1-4f6d-4357-a167-26684daa60c5Tenant ID of creator
40d39c4b-9585-4123-8fd4-f1cc23a1184cTenant Unit ID of creator
da114de3-d7e6-4161-bc55-0ce85dbee589Workflow status
ACTIVEExample: ACTIVEWorkflow status
Definition id
definition_type
AB test config ID
Indicates if AB testing is enabled
falseUsage guide
Resource visibility
Agent definition entity
Variables
Validation Error
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": "2026-01-01T00:00:00.000Z",
"updated_time": "2026-01-01T00:00:00.000Z",
"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-f1cc23a1184cTenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589Type of icon used
emojiIcon representation
🤖Background color of the icon
#EFF1F5Workflow name
test_workflow_nameWorkflow description
test_descriptionList of tags
test_tagIndicates if the item is marked as favorite
Workflow status
ACTIVEAB test config ID
Indicates if AB testing is enabled
Extend properties
{}Usage guide
Successful Response
Response model for created workflow, which includes all fields of AgentItem.
Source type: 'emoji' or 'url'
Raw icon value: emoji char, full URL, or gallery key
Hex background color behind the icon
#FFFWorkflow mode, e.g., chat or job
jobPossible values: Agent type (single-agent, multi-agent) - legacy types (flow, instruction, tool) are deprecated
single-agentWorkflow name
test_workflow_nameWorkflow description
""Example: test_descriptionList of tags
[]Example: test_tagIndicates if the item is marked as favorite
falseExtend properties
{}Workflow ID
22a976a1-4f6d-4357-a167-26684daa60c5Tenant ID of creator
40d39c4b-9585-4123-8fd4-f1cc23a1184cTenant Unit ID of creator
da114de3-d7e6-4161-bc55-0ce85dbee589Workflow status
ACTIVEExample: ACTIVEWorkflow status
Definition id
definition_type
AB test config ID
Indicates if AB testing is enabled
falseUsage guide
Resource visibility
Agent definition entity
Variables
Validation Error
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": "2026-01-01T00:00:00.000Z",
"updated_time": "2026-01-01T00:00:00.000Z",
"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-f1cc23a1184cTenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589Successful Response
Validation Error
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-f1cc23a1184cTenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589""Input variables
{"var1":"1","var2":2}false[]wfx{}Successful Response
Validation Error
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"
}textAPI Layer: Resume Invoke a Agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184cTenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589""Input variables
{"var1":"1","var2":2}false[]wfx{}Successful Response
Validation Error
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"
}textAPI Layer: Invoke a Agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184cTenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589""Input variables
{"var1":"1","var2":2}false[]wfx{}Successful Response
Validation Error
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"
}textLast updated
Was this helpful?