{
  "updatedAt": "2025-09-05T17:53:31.000Z",
  "createdAt": "2025-09-05T02:30:36.355Z",
  "id": "7T2qd74nFjSejuxt",
  "name": "Child Agent",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "style"
            },
            {
              "name": "idea"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "9704cfc6-5d76-4650-b464-7baeb6050200",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.style }}\n{{ $json.idea }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=### Role:\n\nYou are a master at creating image pronpts that are very easily understood by image generation LLM models.\n\n### Tasks:\n\nYou will analyze the user queries related to style and the idea, and create 5 image prompts.\n\n### Output:\n\n{\n  \"prompts\": {\n    \"image_1\": \"image 1 prompt\",\n    \"image_2\": \"image 2 prompt\",\n    \"image_3\": \"image 3 prompt\",\n    \"image_4\": \"image 4 prompt\",\n    \"image_5\": \"image 5 prompt\"\n  }\n}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        208,
        0
      ],
      "id": "b346929f-be1c-4ab2-b779-5fe123a2918d",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-4-20250514",
          "mode": "list",
          "cachedResultName": "Claude Sonnet 4"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        80,
        208
      ],
      "id": "db224405-c030-4634-9ac5-207b1e20bd59",
      "name": "Anthropic Chat Model",
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('When Executed by Another Workflow').item.json.style }}\n{{ $('When Executed by Another Workflow').item.json.idea }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        224,
        208
      ],
      "id": "ba6cd270-c0b6-4b0e-aa2f-041409a6823f",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n  \"prompts\": {\n    \"image_1\": \"image 1 prompt\",\n    \"image_2\": \"image 2 prompt\",\n    \"image_3\": \"image 3 prompt\",\n    \"image_4\": \"image 4 prompt\",\n    \"image_5\": \"image 5 prompt\"\n  }\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        448,
        208
      ],
      "id": "399f514c-8230-4fd4-ad40-996aa1bf8d27",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "fieldToSplitOut": "output.prompts",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        560,
        0
      ],
      "id": "84220df7-be4e-4857-b51c-705a598201c4",
      "name": "Split Out"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        768,
        0
      ],
      "id": "4d5404a5-5f2d-4b31-ac69-4fb6af29b243",
      "name": "Loop Over Items"
    }
  ],
  "connections": {
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        []
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "c8cda246-bcce-4baf-b820-fca1aa6db12f",
  "activeVersionId": null,
  "triggerCount": 0,
  "shared": [
    {
      "updatedAt": "2025-09-05T02:30:36.358Z",
      "createdAt": "2025-09-05T02:30:36.358Z",
      "role": "workflow:owner",
      "workflowId": "7T2qd74nFjSejuxt",
      "projectId": "Jb2DFpuDeQFonpJH"
    }
  ],
  "activeVersion": null,
  "tags": []
}