Workflows & Tools
Workflows are LangGraph-powered agent graphs that enable multi-step reasoning, tool calling, and complex decision flows. Assign a workflow to an AI assistant to give it agentic superpowers.
How workflows work
A workflow is a directed graph of nodes. Each node is one of:
inputEntry point — receives the user message
llmLLM call — runs a prompt with context injection
toolTool call — executes a registered tool or REST connection
conditionRouter — branches based on output
outputFinal response node
Creating a workflow
POST /workflows/
Authorization: Bearer <token>
{
"name": "Customer Support Flow",
"description": "Handles support queries with escalation",
"nodes": [
{ "id": "start", "type": "input" },
{ "id": "classify", "type": "llm", "prompt": "Classify this query..." },
{ "id": "lookup", "type": "tool", "tool": "searchKnowledgeBase" },
{ "id": "respond", "type": "llm", "prompt": "Respond based on..." }
],
"edges": [
{ "from": "start", "to": "classify" },
{ "from": "classify", "to": "lookup" },
{ "from": "lookup", "to": "respond" }
]
}Testing workflows
Test a draft before saving, or test a saved workflow with a specific input:
POST /workflows/test-draft
Authorization: Bearer <token>
{
"workflowDraft": { /* workflow definition */ },
"testInput": "I need help with my order"
}Tool calls in chat streams
When a workflow node calls a tool, the chat stream emits a tool_call event. Your integration must execute the tool and return the result:
// When a streaming chat emits a tool_call event:
data: {"type":"tool_call","tool":"searchInventory","args":{"query":"order 1234"},"callId":"tc_abc"}
// Your frontend/backend executes the tool, then submits the result:
POST /tools/result
Authorization: Bearer <token>
{
"callId": "tc_abc",
"threadId": "thread_xyz",
"result": { "items": [{ "id": "ord_1234", "status": "shipped" }] }
}REST API Connections as tools
Any REST API Connection can be enabled as a tool — the AI assistant will call external APIs as part of its workflow. Configure them at POST /rest-api-connections/ and enable via POST /rest-api-connections/refresh-tools.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /workflows/ | List workflows |
| GET | /workflows/:workflowId | Get workflow details |
| POST | /workflows/ | Create a new workflow |
| PUT | /workflows/:workflowId | Update workflow |
| DELETE | /workflows/:workflowId | Delete workflow |
| POST | /workflows/test-draft | Test a workflow draft without saving |
| POST | /workflows/:workflowId/duplicate | Duplicate a workflow |
| POST | /workflows/:workflowId/test | Test a saved workflow |
| GET | /workflows/:workflowId/assignments | View workflow assignments |
| POST | /workflows/:workflowId/assign | Assign workflow to an assistant |
| DELETE | /workflows/assignments/:assignmentId | Remove assignment |
| GET | /workflows/:workflowId/analytics | Workflow execution analytics |
| GET | /tools/ | List all registered tools |
| GET | /tools/categories | Tools grouped by category |
| GET | /tools/available | Tools available in user context |
| POST | /tools/result | Submit tool execution result |
| GET | /tools/pending/:threadId | Pending tool calls for a thread |
| PATCH | /tools/:name/toggle | Enable/disable a tool |