{
  "id": "pumpfun-sniper-v1",
  "name": "Pump.fun Sniper v1",
  "nodes": [
    {
      "id": "1",
      "type": "pumpfun_config",
      "position": {
        "x": -400,
        "y": -200
      },
      "size": [
        400,
        120
      ],
      "inputs": {},
      "metadata": {
        "pumpfun_service_url": "{{process.env.PUMPFUN_SERVICE_URL}}",
        "api_key": "{{process.env.PUMPFUN_SERVICE_API_KEY}}"
      }
    },
    {
      "id": "2",
      "type": "solana_wallet",
      "position": {
        "x": -400,
        "y": -50
      },
      "size": [
        320,
        80
      ],
      "inputs": {},
      "metadata": {
        "private_key": "{{process.env.SOLANA_SWAP_PRIVATE_KEY}}"
      }
    },
    {
      "id": "3",
      "type": "memory_storage",
      "position": {
        "x": -750,
        "y": 50
      },
      "size": [
        245,
        82
      ],
      "inputs": {},
      "metadata": {
        "storage_path": "pumpfun-v1-mistral",
        "storage_type": "local_json"
      }
    },
    {
      "id": "4",
      "type": "pumpfun_launch_summary",
      "position": {
        "x": 180,
        "y": 55
      },
      "size": [
        320,
        230
      ],
      "inputs": {},
      "metadata": {
        "window_hours": 1,
        "limit": 10,
        "max_positions": 1
      }
    },
    {
      "id": "5",
      "type": "inference_config",
      "position": {
        "x": 526,
        "y": -209
      },
      "size": [
        280,
        150
      ],
      "inputs": {},
      "metadata": {
        "endpoint_url": "https://router.theobelisk.ai",
        "use_default": true,
        "agent_id": "",
        "model_path": "models/default_model",
        "auto_load": true
      }
    },
    {
      "id": "6",
      "type": "inference",
      "position": {
        "x": 1119,
        "y": -74
      },
      "size": [
        300,
        280
      ],
      "inputs": {},
      "metadata": {
        "quantum_influence": 0.7,
        "max_length": 1024,
        "system_prompt": "Trading Strategy (Pump.fun bonding-curve sniper, phase 2):\n- Buy amount: exactly 0.001 SOL per trade.\n- Buy the newest bonding-curve launch you do not already hold.\n- No volume, momentum, or maker filters — any fresh launch is valid.\n- Max open positions: 1.\n- Do NOT rebuy a token you already hold.\n- Output JSON only: { \"actions\": [{ \"action\": \"buy\", \"params\": { \"token_address\": \"<mint>\", \"amount_sol\": 0.001 } }] } or { \"actions\": [] } if no new launch.",
        "enable_thinking": true
      }
    },
    {
      "id": "7",
      "type": "action_router",
      "position": {
        "x": 1767,
        "y": 78
      },
      "size": [
        240,
        100
      ],
      "inputs": {},
      "metadata": {}
    },
    {
      "id": "8",
      "type": "pumpfun_buy",
      "position": {
        "x": 2031,
        "y": -61
      },
      "size": [
        280,
        200
      ],
      "inputs": {},
      "metadata": {
        "default_amount_sol": "{{process.env.DEFAULT_AMOUNT_SOL}}",
        "rebuy_cooldown_minutes": 30
      }
    },
    {
      "id": "9",
      "type": "add_to_bags",
      "position": {
        "x": 2509,
        "y": -200
      },
      "size": [
        240,
        140
      ],
      "inputs": {},
      "metadata": {
        "bags_file": "pumpfun_bags.json",
        "profit_target_percent": 9999,
        "stop_loss_percent": 9999
      }
    },
    {
      "id": "10",
      "type": "action_logger",
      "position": {
        "x": 2363,
        "y": -261
      },
      "size": [
        245,
        118
      ],
      "inputs": {},
      "metadata": {
        "max_actions": 100,
        "actions_file": "pumpfun_actions.json"
      }
    },
    {
      "id": "11",
      "type": "scheduler",
      "position": {
        "x": -560,
        "y": 200
      },
      "size": [
        210,
        146
      ],
      "inputs": {},
      "metadata": {
        "min_seconds": 30,
        "max_seconds": 30,
        "enabled": true
      }
    },
    {
      "id": "12",
      "type": "sol_balance_checker",
      "position": {
        "x": -134,
        "y": 223
      },
      "size": [
        240,
        120
      ],
      "inputs": {},
      "metadata": {
        "min_balance_sol": "0.002"
      }
    },
    {
      "id": "13",
      "type": "boolean_logic",
      "position": {
        "x": -37,
        "y": -252
      },
      "size": [
        220,
        130
      ],
      "inputs": {},
      "metadata": {
        "operation": "AND"
      }
    },
    {
      "id": "14",
      "type": "boolean_logic",
      "position": {
        "x": 534,
        "y": -24
      },
      "size": [
        220,
        130
      ],
      "inputs": {},
      "metadata": {
        "operation": "AND"
      }
    },
    {
      "id": "15",
      "type": "text",
      "position": {
        "x": 784,
        "y": -42
      },
      "size": [
        300,
        200
      ],
      "inputs": {},
      "metadata": {
        "text": "Context passed to LLM (recent Pump.fun launches):"
      }
    },
    {
      "id": "16",
      "type": "scheduler",
      "position": {
        "x": -77,
        "y": -1321
      },
      "size": [
        210,
        146
      ],
      "inputs": {},
      "metadata": {
        "min_seconds": 10,
        "max_seconds": 10,
        "enabled": true
      }
    },
    {
      "id": "17",
      "type": "bag_checker",
      "position": {
        "x": 975,
        "y": -847
      },
      "size": [
        260,
        220
      ],
      "inputs": {},
      "metadata": {
        "bags_file": "pumpfun_bags.json",
        "sell_timer_minutes": 1,
        "profit_target_percent": 9999,
        "stop_loss_percent": 9999
      }
    },
    {
      "id": "18",
      "type": "pumpfun_sell",
      "position": {
        "x": 1373,
        "y": -1249
      },
      "size": [
        280,
        160
      ],
      "inputs": {},
      "metadata": {
        "close_ata": true,
        "sell_all": true
      }
    },
    {
      "id": "19",
      "type": "update_bags_on_sell",
      "position": {
        "x": 1940,
        "y": -779
      },
      "size": [
        220,
        90
      ],
      "inputs": {},
      "metadata": {
        "bags_file": "pumpfun_bags.json"
      }
    },
    {
      "id": "20",
      "type": "action_logger",
      "position": {
        "x": 2261,
        "y": -998
      },
      "size": [
        245,
        118
      ],
      "inputs": {},
      "metadata": {
        "max_actions": 100,
        "actions_file": "pumpfun_actions.json"
      }
    },
    {
      "id": "21",
      "type": "pumpfun_config",
      "position": {
        "x": 509,
        "y": -1290
      },
      "size": [
        400,
        120
      ],
      "inputs": {},
      "metadata": {
        "pumpfun_service_url": "{{process.env.PUMPFUN_SERVICE_URL}}",
        "api_key": "{{process.env.PUMPFUN_SERVICE_API_KEY}}"
      }
    },
    {
      "id": "22",
      "type": "memory_storage",
      "position": {
        "x": -259,
        "y": -900
      },
      "size": [
        245,
        82
      ],
      "inputs": {},
      "metadata": {
        "storage_path": "pumpfun-v1-mistral",
        "storage_type": "local_json"
      }
    },
    {
      "id": "23",
      "type": "text",
      "position": {
        "x": 1443,
        "y": -23
      },
      "size": [
        300,
        200
      ],
      "inputs": {},
      "metadata": {
        "text": "Model output (debug)"
      }
    }
  ],
  "connections": [
    {
      "from": "2",
      "from_output": "private_key",
      "to": "8",
      "to_input": "private_key"
    },
    {
      "from": "2",
      "from_output": "private_key",
      "to": "12",
      "to_input": "private_key"
    },
    {
      "from": "2",
      "from_output": "private_key",
      "to": "18",
      "to_input": "private_key"
    },
    {
      "from": "1",
      "from_output": "state",
      "to": "8",
      "to_input": "state"
    },
    {
      "from": "1",
      "from_output": "state",
      "to": "4",
      "to_input": "state"
    },
    {
      "from": "1",
      "from_output": "state",
      "to": "9",
      "to_input": "state"
    },
    {
      "from": "21",
      "from_output": "state",
      "to": "17",
      "to_input": "state"
    },
    {
      "from": "3",
      "from_output": "storage_instance",
      "to": "4",
      "to_input": "storage_instance"
    },
    {
      "from": "3",
      "from_output": "storage_instance",
      "to": "8",
      "to_input": "storage_instance"
    },
    {
      "from": "3",
      "from_output": "storage_instance",
      "to": "9",
      "to_input": "storage_instance"
    },
    {
      "from": "3",
      "from_output": "storage_instance",
      "to": "10",
      "to_input": "storage_instance"
    },
    {
      "from": "22",
      "from_output": "storage_instance",
      "to": "17",
      "to_input": "storage_instance"
    },
    {
      "from": "22",
      "from_output": "storage_instance",
      "to": "18",
      "to_input": "storage_instance"
    },
    {
      "from": "22",
      "from_output": "storage_instance",
      "to": "19",
      "to_input": "storage_instance"
    },
    {
      "from": "22",
      "from_output": "storage_instance",
      "to": "20",
      "to_input": "storage_instance"
    },
    {
      "from": "5",
      "from_output": "model",
      "to": "6",
      "to_input": "model"
    },
    {
      "from": "6",
      "from_output": "response",
      "to": "23",
      "to_input": "text"
    },
    {
      "from": "23",
      "from_output": "text",
      "to": "7",
      "to_input": "response"
    },
    {
      "from": "7",
      "from_output": "tg_actions",
      "to": "8",
      "to_input": "tg_actions"
    },
    {
      "from": "8",
      "from_output": "result",
      "to": "9",
      "to_input": "buy_result"
    },
    {
      "from": "8",
      "from_output": "result",
      "to": "10",
      "to_input": "buy_result"
    },
    {
      "from": "15",
      "from_output": "text",
      "to": "6",
      "to_input": "query"
    },
    {
      "from": "14",
      "from_output": "result",
      "to": "6",
      "to_input": "trigger"
    },
    {
      "from": "14",
      "from_output": "pass",
      "to": "15",
      "to_input": "text"
    },
    {
      "from": "13",
      "from_output": "result",
      "to": "14",
      "to_input": "a"
    },
    {
      "from": "13",
      "from_output": "trigger",
      "to": "4",
      "to_input": "trigger"
    },
    {
      "from": "4",
      "from_output": "summary",
      "to": "14",
      "to_input": "value"
    },
    {
      "from": "4",
      "from_output": "has_tokens",
      "to": "14",
      "to_input": "b"
    },
    {
      "from": "11",
      "from_output": "trigger",
      "to": "12",
      "to_input": "trigger"
    },
    {
      "from": "11",
      "from_output": "trigger",
      "to": "13",
      "to_input": "a"
    },
    {
      "from": "12",
      "from_output": "has_funds",
      "to": "13",
      "to_input": "b"
    },
    {
      "from": "16",
      "from_output": "trigger",
      "to": "17",
      "to_input": "trigger"
    },
    {
      "from": "17",
      "from_output": "should_sell",
      "to": "18",
      "to_input": "should_sell"
    },
    {
      "from": "17",
      "from_output": "sell_params",
      "to": "18",
      "to_input": "sell_params"
    },
    {
      "from": "18",
      "from_output": "result",
      "to": "19",
      "to_input": "sell_result"
    },
    {
      "from": "18",
      "from_output": "result",
      "to": "20",
      "to_input": "sell_result"
    }
  ]
}