Agent Instructions
Manage Agent Instructions, which are agents configured directly via conversation prompts. These endpoints allow you to create, retrieve, publish, and execute draft Agent instructions.
Upsert the draft version of the instruction
The UUID of the agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
The request body
Configuration for the LLM model_name
Structured prompt in JSON format
Textual prompt for the agent
Mode of operation for the agent
Configuration for the product retrieval used
Additional features in JSON format
Variables in JSON format
PUT /admin/api/v2/agents/{agent_id}/instructions/draft HTTP/1.1
Host: api.workfx.ai
Content-Type: application/json
Accept: */*
Content-Length: 655
{
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:48:58.980Z",
"updated_time": "2025-07-16T16:48:58.980Z",
"llm_config": {},
"structured_prompt": {},
"text_prompt": "text",
"tools_config": [
{
"tool": {
"tool_type": {},
"vendor_id": "text",
"resource_id": "text",
"tool_name": "text",
"tool_parameters": {}
},
"prompt": "text",
"approval_mode": "text",
"approval_condition": {},
"enable": true
}
],
"agent_mode": "text",
"dataset_retrieval_config": {
"datasets": [
{
"id": "text",
"name": "text",
"enable": true
}
],
"top_k": 1,
"retrieval_mode": "text",
"tool_enabled": false
},
"product_retrieval_config": {},
"features": {},
"variables": [
{}
]
}
{
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:48:58.980Z",
"updated_time": "2025-07-16T16:48:58.980Z",
"llm_config": {},
"structured_prompt": {},
"text_prompt": "text",
"tools_config": [
{
"tool": {
"tool_type": {},
"vendor_id": "text",
"resource_id": "text",
"tool_name": "text",
"tool_parameters": {}
},
"prompt": "text",
"approval_mode": "text",
"approval_condition": {},
"enable": true
}
],
"agent_mode": "text",
"dataset_retrieval_config": {
"datasets": [
{
"id": "text",
"name": "text",
"enable": true
}
],
"top_k": 1,
"retrieval_mode": "text",
"tool_enabled": false
},
"product_retrieval_config": {},
"features": {},
"variables": [
{}
],
"id": "text",
"tenant_id": "text",
"tenant_unit_id": "text",
"agent_id": "text",
"version": "text",
"is_deleted": true
}
Get the draft version of the instruction
The UUID of the agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
GET /admin/api/v2/agents/{agent_id}/instructions/draft HTTP/1.1
Host: api.workfx.ai
Accept: */*
{
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:48:58.980Z",
"updated_time": "2025-07-16T16:48:58.980Z",
"llm_config": {},
"structured_prompt": {},
"text_prompt": "text",
"tools_config": [
{
"tool": {
"tool_type": {},
"vendor_id": "text",
"resource_id": "text",
"tool_name": "text",
"tool_parameters": {}
},
"prompt": "text",
"approval_mode": "text",
"approval_condition": {},
"enable": true
}
],
"agent_mode": "text",
"dataset_retrieval_config": {
"datasets": [
{
"id": "text",
"name": "text",
"enable": true
}
],
"top_k": 1,
"retrieval_mode": "text",
"tool_enabled": false
},
"product_retrieval_config": {},
"features": {},
"variables": [
{}
],
"id": "text",
"tenant_id": "text",
"tenant_unit_id": "text",
"agent_id": "text",
"version": "text",
"is_deleted": true
}
Get the draft version of the instruction
The UUID of the agent
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
POST /admin/api/v2/agents/{agent_id}/instructions/publish HTTP/1.1
Host: api.workfx.ai
Accept: */*
{
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:48:58.980Z",
"updated_time": "2025-07-16T16:48:58.980Z",
"llm_config": {},
"structured_prompt": {},
"text_prompt": "text",
"tools_config": [
{
"tool": {
"tool_type": {},
"vendor_id": "text",
"resource_id": "text",
"tool_name": "text",
"tool_parameters": {}
},
"prompt": "text",
"approval_mode": "text",
"approval_condition": {},
"enable": true
}
],
"agent_mode": "text",
"dataset_retrieval_config": {
"datasets": [
{
"id": "text",
"name": "text",
"enable": true
}
],
"top_k": 1,
"retrieval_mode": "text",
"tool_enabled": false
},
"product_retrieval_config": {},
"features": {},
"variables": [
{}
],
"id": "text",
"tenant_id": "text",
"tenant_unit_id": "text",
"agent_id": "text",
"version": "text",
"is_deleted": true
}
The UUID of the agent
The page number
1
The number of items per page
10
Tenant Id
40d39c4b-9585-4123-8fd4-f1cc23a1184c
Tenant Unit ID
da114de3-d7e6-4161-bc55-0ce85dbee589
GET /admin/api/v2/agents/{agent_id}/instructions 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": [
{
"created_by": "text",
"updated_by": "text",
"created_by_role": "text",
"updated_by_role": "text",
"created_time": "2025-07-16T16:48:58.980Z",
"updated_time": "2025-07-16T16:48:58.980Z",
"llm_config": {},
"structured_prompt": {},
"text_prompt": "text",
"tools_config": [
{
"tool": {
"tool_type": {},
"vendor_id": "text",
"resource_id": "text",
"tool_name": "text",
"tool_parameters": {}
},
"prompt": "text",
"approval_mode": "text",
"approval_condition": {},
"enable": true
}
],
"agent_mode": "text",
"dataset_retrieval_config": {
"datasets": [
{
"id": "text",
"name": "text",
"enable": true
}
],
"top_k": 1,
"retrieval_mode": "text",
"tool_enabled": false
},
"product_retrieval_config": {},
"features": {},
"variables": [
{}
],
"id": "text",
"tenant_id": "text",
"tenant_unit_id": "text",
"agent_id": "text",
"version": "text",
"is_deleted": true
}
]
}
Run a specific instruction by ID
e06f8e4f-fb57-450d-a8f1-661c7d655769
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}/instructions/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?