{
  "manifest_version": "1.0.0",
  "template": {
    "id": "10f472cd-c1d3-4bad-83f9-20d5aeba6648",
    "slug": "ai-trader",
    "name": "AI-Trader",
    "description": "AI-Trader with MCP tools, UI dashboard. AI Trader IA Trader",
    "url": "https://railway.com/deploy/ai-trader",
    "upstream": {
      "repo_url": "https://github.com/XavTo/AI-Trader"
    }
  },
  "services": [
    {
      "name": "AI-Trader",
      "source": {
        "repo": "https://github.com/XavTo/AI-Trader"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "END_DATE",
      "service": "AI-Trader",
      "description": "Simulation end date (YYYY-MM-DD)",
      "secret": false,
      "strategy": "default",
      "default": "2026-01-12"
    },
    {
      "key": "INIT_DATE",
      "service": "AI-Trader",
      "description": "Simulation start date (YYYY-MM-DD)",
      "secret": false,
      "strategy": "default",
      "default": "2026-01-01"
    },
    {
      "key": "CONFIG_PATH",
      "service": "AI-Trader",
      "description": "Scenario config to run (US market, daily). Use /app/configs/default_hour_config.json for hourly runs",
      "secret": false,
      "strategy": "default",
      "default": "/app/configs/default_config.json"
    },
    {
      "key": "JINA_API_KEY",
      "service": "AI-Trader",
      "description": "Jina API key used by the Search/market-intelligence tool (leave empty to disable external search)",
      "secret": true,
      "strategy": "default",
      "default": "YOUR_JINA_KEY"
    },
    {
      "key": "AGENT_MAX_STEP",
      "service": "AI-Trader",
      "description": "Max number of reasoning/action steps the agent can take per trading day (higher = more tool calls/cost)",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "MATH_HTTP_PORT",
      "service": "AI-Trader",
      "description": "MCP Math service port (calculations/metrics)",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "AI-Trader",
      "description": "OpenAI API key (required to run the agent)",
      "secret": true,
      "strategy": "default",
      "default": "YOUR_OPENAI_KEY"
    },
    {
      "key": "OPENAI_API_BASE",
      "service": "AI-Trader",
      "description": "OpenAI-compatible API base URL (must end with /v1)",
      "secret": false,
      "strategy": "default",
      "default": "https://api.openai.com/v1"
    },
    {
      "key": "TRADE_HTTP_PORT",
      "service": "AI-Trader",
      "description": "MCP TradeTools service port (buy/sell simulation)",
      "secret": false,
      "strategy": "default",
      "default": "8002"
    },
    {
      "key": "CRYPTO_HTTP_PORT",
      "service": "AI-Trader",
      "description": "MCP CryptoTradeTools service port (crypto tools)",
      "secret": false,
      "strategy": "default",
      "default": "8005"
    },
    {
      "key": "RESET_AGENT_DATA",
      "service": "AI-Trader",
      "description": "Set to 1 to wipe ./data/agent_data before running a new simulation",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "RUNTIME_ENV_PATH",
      "service": "AI-Trader",
      "description": "Runtime environment config file path used by the app (generated/consumed at startup)",
      "secret": false,
      "strategy": "default",
      "default": "/app/runtime_env.json"
    },
    {
      "key": "SEARCH_HTTP_PORT",
      "service": "AI-Trader",
      "description": "MCP Search/market intelligence service port (news/search)",
      "secret": false,
      "strategy": "default",
      "default": "8001"
    },
    {
      "key": "FORCE_REFRESH_DATA",
      "service": "AI-Trader",
      "description": "Set to 1 to force re-download/refresh of price data on boot (can hit API rate limits)",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "GETPRICE_HTTP_PORT",
      "service": "AI-Trader",
      "description": "MCP LocalPrices service port (local price lookup)",
      "secret": false,
      "strategy": "default",
      "default": "8003"
    },
    {
      "key": "ALPHAVANTAGE_API_KEY",
      "service": "AI-Trader",
      "description": "Alpha Vantage API key (used to download/update stock prices when local cache is missing)",
      "secret": true,
      "strategy": "default",
      "default": "YOUR_ALPHA_VANTAGE_KEY"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ai-trader"
      }
    },
    "cli": "railway deploy --template ai-trader",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "10f472cd-c1d3-4bad-83f9-20d5aeba6648",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "99867b98-e6de-4a78-ad31-c856c41644ce": {
                  "icon": "https://static.wixstatic.com/media/0ebf5a_b7df8ad2d8d74e839b08ff7ede26f91e~mv2.png/v1/fill/w_170,h_164,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/logo_2_bez_pozadi.png",
                  "name": "AI-Trader",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/XavTo/AI-Trader",
                    "rootDirectory": null
                  },
                  "variables": {
                    "END_DATE": {
                      "description": "Simulation end date (YYYY-MM-DD)",
                      "defaultValue": "2026-01-12"
                    },
                    "INIT_DATE": {
                      "description": "Simulation start date (YYYY-MM-DD)",
                      "defaultValue": "2026-01-01"
                    },
                    "CONFIG_PATH": {
                      "isOptional": false,
                      "description": "Scenario config to run (US market, daily). Use /app/configs/default_hour_config.json for hourly runs",
                      "defaultValue": "/app/configs/default_config.json"
                    },
                    "JINA_API_KEY": {
                      "isOptional": false,
                      "description": "Jina API key used by the Search/market-intelligence tool (leave empty to disable external search)",
                      "defaultValue": "YOUR_JINA_KEY"
                    },
                    "AGENT_MAX_STEP": {
                      "isOptional": false,
                      "description": "Max number of reasoning/action steps the agent can take per trading day (higher = more tool calls/cost)",
                      "defaultValue": "30"
                    },
                    "MATH_HTTP_PORT": {
                      "isOptional": false,
                      "description": "MCP Math service port (calculations/metrics)",
                      "defaultValue": "8000"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": false,
                      "description": "OpenAI API key (required to run the agent)",
                      "defaultValue": "YOUR_OPENAI_KEY"
                    },
                    "OPENAI_API_BASE": {
                      "isOptional": false,
                      "description": "OpenAI-compatible API base URL (must end with /v1)",
                      "defaultValue": "https://api.openai.com/v1"
                    },
                    "TRADE_HTTP_PORT": {
                      "isOptional": false,
                      "description": "MCP TradeTools service port (buy/sell simulation)",
                      "defaultValue": "8002"
                    },
                    "CRYPTO_HTTP_PORT": {
                      "isOptional": false,
                      "description": "MCP CryptoTradeTools service port (crypto tools)",
                      "defaultValue": "8005"
                    },
                    "RESET_AGENT_DATA": {
                      "description": "Set to 1 to wipe ./data/agent_data before running a new simulation",
                      "defaultValue": "0"
                    },
                    "RUNTIME_ENV_PATH": {
                      "isOptional": false,
                      "description": "Runtime environment config file path used by the app (generated/consumed at startup)",
                      "defaultValue": "/app/runtime_env.json"
                    },
                    "SEARCH_HTTP_PORT": {
                      "isOptional": false,
                      "description": "MCP Search/market intelligence service port (news/search)",
                      "defaultValue": "8001"
                    },
                    "FORCE_REFRESH_DATA": {
                      "description": "Set to 1 to force re-download/refresh of price data on boot (can hit API rate limits)",
                      "defaultValue": "0"
                    },
                    "GETPRICE_HTTP_PORT": {
                      "isOptional": false,
                      "description": "MCP LocalPrices service port (local price lookup)",
                      "defaultValue": "8003"
                    },
                    "ALPHAVANTAGE_API_KEY": {
                      "description": "Alpha Vantage API key (used to download/update stock prices when local cache is missing)",
                      "defaultValue": "YOUR_ALPHA_VANTAGE_KEY"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "99867b98-e6de-4a78-ad31-c856c41644ce": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T22:09:10.180Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_de2382b16310495abf17",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 175,
    "typical_build_seconds": 75,
    "typical_start_seconds": 10,
    "slowest_service": "AI-Trader"
  }
}
