{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        208
      ],
      "id": "99429941-e4ee-41f1-b413-7dc4dda2fb75",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "what is ETHUSD state right now, use available tools\nextract only trading decision, and where is address being payed",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        352,
        208
      ],
      "id": "723ab73b-69d5-466c-829a-6268aa536264",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "ai.algo.fit/grok-4-1-fast-reasoning",
          "mode": "list",
          "cachedResultName": "ai.algo.fit/grok-4-1-fast-reasoning"
        },
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        224,
        432
      ],
      "id": "aef189b5-58ad-4b0d-afaf-120c4f8a19f0",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "description": "call this tool then need to get x402Header, need to know recipient and amount from previous tool calls",
        "workflowId": {
          "__rl": true,
          "value": "8xjAhWtA2Fq_IEfonHXUw",
          "mode": "list",
          "cachedResultUrl": "/workflow/8xjAhWtA2Fq_IEfonHXUw",
          "cachedResultName": "client helper"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "recipient_address": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('recipient_address', ``, 'string') }}",
            "amount": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('amount', ``, 'string') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "recipient_address",
              "displayName": "recipient_address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "amount",
              "displayName": "amount",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        352,
        432
      ],
      "id": "87da98cf-21c1-441d-9a1a-7256af51c390",
      "name": "get x402Header"
    },
    {
      "parameters": {
        "description": "call this tool first to get information about recipient and amount to access protected resources",
        "workflowId": {
          "__rl": true,
          "value": "_U6-DUKJ7aQG66ljUePN_",
          "mode": "list",
          "cachedResultUrl": "/workflow/_U6-DUKJ7aQG66ljUePN_",
          "cachedResultName": "protected x402Header"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [
            "x402Header"
          ],
          "schema": [
            {
              "id": "x402Header",
              "displayName": "x402Header",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        480,
        432
      ],
      "id": "e555156a-f901-4124-bbc3-3a12d92ab5a6",
      "name": "get info"
    },
    {
      "parameters": {
        "description": "call this tool when you already know x402Header to get  ETHUSD state",
        "workflowId": {
          "__rl": true,
          "value": "_U6-DUKJ7aQG66ljUePN_",
          "mode": "list",
          "cachedResultUrl": "/workflow/_U6-DUKJ7aQG66ljUePN_",
          "cachedResultName": "protected x402Header"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "x402Header": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('x402Header', ``, 'string') }}"
          },
          "matchingColumns": [
            "x402Header"
          ],
          "schema": [
            {
              "id": "x402Header",
              "displayName": "x402Header",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        608,
        432
      ],
      "id": "98c86182-8585-4b9e-a087-c994f9cdfb51",
      "name": "get ETH info"
    },
    {
      "parameters": {
        "action": "notarize",
        "broadcast": true,
        "data": "={{ $json.output }}"
      },
      "type": "n8n-nodes-cronos-paytech.cronosX402",
      "typeVersion": 1,
      "position": [
        704,
        208
      ],
      "id": "672cec97-8d8e-4337-a159-eb3184be19b2",
      "name": "Cronos x402",
      "credentials": {
        "cronosWalletCredentialsApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Cronos x402",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "get x402Header": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get info": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get ETH info": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "templateCredsSetupCompleted": true
  }
}