dgi.intent_recognition ​
AI-powered intent recognition
AI-powered intent recognition for DGI conversations.
Uses AI to analyze user messages and determine their intent with better accuracy than keyword-based matching.
Inputs:
- message: The user's message (required)
- history: Previous messages in conversation (optional)
- available_workflows: List of workflow IDs to consider (optional)
- model: Optional model ID override (default: plugin.default_model)
Outputs (terminal state_data):
- recognized_intent: The identified intent (e.g., "deploy_site", "provision_ec2")
- intent_confidence: Confidence score (0.0-1.0)
- intent_params: Extracted parameters from the message
- suggested_workflow: Recommended workflow ID or null
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 |
|---|---|---|---|---|
message | string | Yes | — | User's message |
history | list | No | — | Previous messages in conversation |
available_workflows | list | No | — | List of workflow IDs to consider |
model | string | No | — | Model ID override |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
message | string | No | — | — |
history | list | No | — | — |
available_workflows | list | No | — | — |
model | string | No | — | — |
intent_confidence | float | No | — | — |
intent_params | dict | No | — | — |
intent_raw_response | dict | No | — | — |
recognized_intent | string | No | — | — |
suggested_workflow | 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.intent_recognition",
"initial_data": {
"message": "value"
}
}