dgi.workflow_builder ​
AI-powered workflow building
AI-powered workflow building for DGI.
Converts user intent and parameters into a structured virtual workflow that can be executed by the workflow engine.
Inputs:
- intent: The recognized user intent (required)
- params: Gathered parameters from the user (required)
- available_workflows: List of available workflow templates (optional)
- conversation_context: Recent conversation messages (optional)
- model: Optional model ID override (default: plugin.default_model)
Outputs (terminal state_data):
- virtual_workflow: Complete workflow specification
- workflow_type: The workflow type to execute
- workflow_name: Human-readable name
- steps: Ordered list of workflow steps
- required_connections: List of required connection types
- is_valid: Whether a valid workflow could be built
Plugin required: context.get_plugin("ai")
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-dgi |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
intent | string | Yes | — | Recognized user intent |
params | json | Yes | — | Gathered parameters |
available_workflows | list | No | — | Available workflow templates |
conversation_context | list | No | — | Recent conversation messages |
model | string | No | — | Model ID override |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
intent | string | No | — | — |
params | json | No | — | — |
available_workflows | list | No | — | — |
conversation_context | list | No | — | — |
model | string | No | — | — |
is_valid | boolean | No | — | — |
message | string | No | — | — |
required_connections | list | No | — | — |
steps | list | No | — | — |
virtual_workflow | dict | No | — | — |
workflow_name | string | No | — | — |
workflow_type | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "dgi.workflow_builder",
"initial_data": {
"intent": "value",
"params": "value"
}
}