Skip to content
Proud to collaborate with Microsoft for Startups

dgi.synapse.validate ​

Self-correct: review DAG for consistency

Validate and self-correct the constructed DAG.

The fifth and final synapse. Reviews the virtual_workflow from build_dag for consistency issues and can return a corrected version.

Inputs:

  • virtual_workflow: dict from dgi.synapse.build_dag (required)
  • understanding: dict from dgi.synapse.understand (required)
  • operations: list from dgi.synapse.decompose (required)

Outputs (terminal state_data):

  • is_valid: bool — whether the DAG passed validation
  • issues: list of issue dicts
  • virtual_workflow: dict — corrected workflow if fixes applied, else original
  • validation_summary: str — human-readable validation summary
  • input_tokens: int
  • output_tokens: int

Plugin required: context.get_plugin("ai")

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-dgi
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—Explicit AI CloudConnection UUID — threaded to ai.chat.complete so synapse uses the org's resolved connection (org-context-free)
modelstringNo—Optional model override threaded to ai.chat.complete
virtual_workflowjsonYes—Virtual workflow from build_dag
understandingjsonYes—Understanding from understand
operationsjsonYes—Operations from decompose

Output Schema ​

FieldTypeRequiredDefaultDescription
input_tokensintegerNo——
is_validbooleanNo——
issueslistNo——
output_tokensintegerNo——
validation_summarydictNo——
virtual_workflowjsonNo——
connection_uuiduuidNo——
modelstringNo——
operationsjsonNo——
understandingjsonNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "dgi.synapse.validate",
  "initial_data": {
    "virtual_workflow": "value",
    "understanding": "value",
    "operations": "value"
  }
}