dgi.synapse.decompose ​
Break goal into atomic operations with dependencies
Break a user's goal into atomic operations with dependency relationships.
The second synapse in the DGI reasoning chain. Takes the understanding from synapse.understand and decomposes it into individual operations.
Inputs:
- understanding: Output from dgi.synapse.understand (required)
- available_workflows: List of workflow descriptors from the catalog (required)
Outputs (terminal state_data):
- operations: list of operation dicts with id, action, service, depends_on, etc.
- parameter_flow: dict mapping downstream params to upstream outputs
- reasoning: str explaining the decomposition
- input_tokens: int
- output_tokens: int
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 |
|---|---|---|---|---|
connection_uuid | uuid | No | — | Explicit AI CloudConnection UUID — threaded to ai.chat.complete so synapse uses the org's resolved connection (org-context-free) |
model | string | No | — | Optional model override threaded to ai.chat.complete |
understanding | json | Yes | — | Output from dgi.synapse.understand |
available_workflows | json | Yes | — | List of workflow descriptors from catalog |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
input_tokens | integer | No | — | — |
operations | list | No | — | — |
output_tokens | integer | No | — | — |
parameter_flow | dict | No | — | — |
reasoning | string | No | — | — |
available_workflows | json | No | — | — |
connection_uuid | uuid | No | — | — |
model | string | No | — | — |
understanding | json | 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.synapse.decompose",
"initial_data": {
"understanding": "value",
"available_workflows": "value"
}
}