{
  "name": "TjMakeBot OpenClaw Agent-native Workflow",
  "version": "3.0.2",
  "description": "Agent-native OpenClaw workflow: create workflow session -> read human task -> handoff to hosted editor -> complete human review -> let the agent resume training/export -> inspect events and final artifact.",
  "inputs": {
    "projectId": "pj_openclaw_demo",
    "datasetUri": "s3://bucket/dataset.zip",
    "mode": "2d",
    "annotationObjectsJson": "[\"person\",\"car\",\"traffic-light\"]",
    "annotationInstructions": "Only label complete visible targets. Occluded targets should still be marked.",
    "model": "yolo11s",
    "epochs": "120",
    "batchSize": "16",
    "imageSize": "640",
    "optimizer": "adamw",
    "learningRate": "0.001",
    "mixedPrecision": "true",
    "exportFormat": "onnx",
    "callbackUrl": "https://openclaw.example/workflow-events",
    "humanReviewNotes": "Human review completed in the hosted TjMakeBot editor."
  },
  "notes": [
    "This template represents the recommended production path for OpenClaw agents.",
    "Use only the hosted gateway baseUrl. Do not place App-Id, Salt, Sign, or apiSecretKey in OpenClaw public config or browser-side nodes.",
    "The human-review step is explicit: read the human task, open editorUrl for the human, then complete the task so the workflow can continue.",
    "If auto-resume stalls at ready_for_training or ready_for_export, call the resume endpoint with resumeToken.",
    "Template inputs stay strict JSON by sending numbers, booleans, and arrays as strings; the TjMakeBot OpenClaw gateway accepts both strict and stringified values."
  ],
  "nodes": [
    {
      "id": "createWorkflow",
      "type": "http",
      "name": "Create Agent Workflow Session",
      "request": {
        "method": "POST",
        "url": "{{baseUrl}}/api/openclaw-gateway/workflows",
        "json": {
          "projectId": "{{inputs.projectId}}",
          "datasetUri": "{{inputs.datasetUri}}",
          "mode": "{{inputs.mode}}",
          "annotationObjects": "{{inputs.annotationObjectsJson}}",
          "annotationInstructions": "{{inputs.annotationInstructions}}",
          "model": "{{inputs.model}}",
          "epochs": "{{inputs.epochs}}",
          "batchSize": "{{inputs.batchSize}}",
          "imageSize": "{{inputs.imageSize}}",
          "optimizer": "{{inputs.optimizer}}",
          "learningRate": "{{inputs.learningRate}}",
          "mixedPrecision": "{{inputs.mixedPrecision}}",
          "format": "{{inputs.exportFormat}}",
          "callbackUrl": "{{inputs.callbackUrl}}",
          "automation": {
            "mode": "agent",
            "autoStartTrainingAfterReview": true,
            "autoExportAfterTraining": true,
            "statusCallbackUrl": "{{inputs.callbackUrl}}"
          }
        }
      }
    },
    {
      "id": "getHumanTask",
      "type": "http",
      "name": "Get Human Review Task",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/api/openclaw-gateway/workflows/{{nodes.createWorkflow.response.workflowId}}/human-task"
      }
    },
    {
      "id": "completeHumanTask",
      "type": "http",
      "name": "Complete Human Review And Return Control To Agent",
      "request": {
        "method": "POST",
        "url": "{{baseUrl}}/api/openclaw-gateway/workflows/{{nodes.createWorkflow.response.workflowId}}/human-task/complete",
        "json": {
          "decision": "approved",
          "completedBy": "openclaw-agent",
          "autoResume": true,
          "notes": "{{inputs.humanReviewNotes}}"
        }
      }
    },
    {
      "id": "getWorkflow",
      "type": "http",
      "name": "Read Workflow State",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/api/openclaw-gateway/workflows/{{nodes.createWorkflow.response.workflowId}}"
      }
    },
    {
      "id": "resumeIfPaused",
      "type": "http",
      "name": "Resume If The Workflow Paused",
      "request": {
        "method": "POST",
        "url": "{{baseUrl}}/api/openclaw-gateway/workflows/{{nodes.createWorkflow.response.workflowId}}/resume",
        "json": {
          "resumeToken": "{{nodes.getWorkflow.response.agent.resumeToken}}",
          "completedBy": "openclaw-agent",
          "trigger": "manual-resume-fallback"
        }
      }
    },
    {
      "id": "getEvents",
      "type": "http",
      "name": "Get Workflow Events",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/api/openclaw-gateway/workflows/{{nodes.createWorkflow.response.workflowId}}/events"
      }
    }
  ]
}
