{
  "manifest_version": "1.0.0",
  "template": {
    "id": "f0289daf-d6c4-44b8-bbdd-26a40c811256",
    "slug": "mirofish-v01-swarm-intelligence-engine",
    "name": "MiroFish v0.1 Swarm Intelligence Engine",
    "description": "Simulate many AI agents to explore how events and opinions unfold.",
    "url": "https://railway.com/deploy/mirofish-v01-swarm-intelligence-engine",
    "upstream": {
      "repo_url": "https://github.com/baranberkay96/mirofish-railway"
    }
  },
  "services": [
    {
      "name": "Web",
      "source": {
        "repo": "https://github.com/baranberkay96/mirofish-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "MiroFish",
      "source": {
        "repo": "https://github.com/baranberkay96/mirofish-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/backend/uploads",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Web",
      "description": "Caddy port (public domain target); only /healthz and /health skip the login.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "MIROFISH_BACKEND",
      "service": "Web",
      "description": "Private address of the MiroFish backend that /api/* is forwarded to.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BASIC_AUTH_PASSWORD",
      "service": "Web",
      "description": "Login password for the MiroFish UI and API. Generated; read it here.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "BASIC_AUTH_USERNAME",
      "service": "Web",
      "description": "Login name for the MiroFish UI and API (letters, digits, . _ @ -).",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "PORT",
      "service": "MiroFish",
      "description": "Backend (Flask) listen port; Railway health-checks /health on it.",
      "secret": false,
      "strategy": "default",
      "default": "5001"
    },
    {
      "key": "FLASK_HOST",
      "service": "MiroFish",
      "description": "Listen address. :: serves IPv4 and IPv6; use 0.0.0.0 only if IPv4-only is needed.",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "SECRET_KEY",
      "service": "MiroFish",
      "description": "Flask secret key (generated; replaces upstream's built-in default).",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "FLASK_DEBUG",
      "service": "MiroFish",
      "description": "Keep false. true turns on Flask debug mode, never for a public deployment.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LLM_API_KEY",
      "service": "MiroFish",
      "description": "Required. API key of your OpenAI-compatible LLM provider (billed by that provider).",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ZEP_API_KEY",
      "service": "MiroFish",
      "description": "Required. Zep Cloud API key (app.getzep.com) for the knowledge graph and agent memory.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LLM_BASE_URL",
      "service": "MiroFish",
      "description": "OpenAI-compatible API base URL (OpenAI, DashScope, OpenRouter, vLLM, ...).",
      "secret": false,
      "strategy": "default",
      "default": "https://api.openai.com/v1"
    },
    {
      "key": "LLM_MODEL_NAME",
      "service": "MiroFish",
      "description": "Model id used for graph building, agent personas, simulation and reports.",
      "secret": false,
      "strategy": "default",
      "default": "gpt-4o-mini"
    },
    {
      "key": "OASIS_DEFAULT_MAX_ROUNDS",
      "service": "MiroFish",
      "description": "Default simulation rounds. More rounds = many more LLM calls and cost.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "MiroFish",
      "description": "Shutdown grace so running simulation processes are stopped cleanly on redeploy.",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mirofish-v01-swarm-intelligence-engine"
      }
    },
    "cli": "railway deploy --template mirofish-v01-swarm-intelligence-engine",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "f0289daf-d6c4-44b8-bbdd-26a40c811256",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "025706dc-207a-5c7b-91f3-f1f2136befb7": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg",
                  "name": "Web",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 120
                  },
                  "source": {
                    "repo": "baranberkay96/mirofish-railway",
                    "branch": "main",
                    "rootDirectory": "/services/web"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Caddy port (public domain target); only /healthz and /health skip the login.",
                      "defaultValue": "8080"
                    },
                    "MIROFISH_BACKEND": {
                      "isOptional": true,
                      "description": "Private address of the MiroFish backend that /api/* is forwarded to.",
                      "defaultValue": "${{MiroFish.RAILWAY_PRIVATE_DOMAIN}}:5001"
                    },
                    "BASIC_AUTH_PASSWORD": {
                      "isOptional": true,
                      "description": "Login password for the MiroFish UI and API. Generated; read it here.",
                      "defaultValue": "{{BASIC_AUTH_PASSWORD}}"
                    },
                    "BASIC_AUTH_USERNAME": {
                      "isOptional": true,
                      "description": "Login name for the MiroFish UI and API (letters, digits, . _ @ -).",
                      "defaultValue": "admin"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "8a5f713c-2ae2-529d-a09b-2d46b8ee41da": {
                  "icon": "https://cdn.jsdelivr.net/gh/666ghj/MiroFish@7657031ac01184afe2cb220f5ee3545573b5e843/frontend/public/icon.png",
                  "name": "MiroFish",
                  "build": {
                    "builder": "DOCKERFILE"
                  },
                  "deploy": {
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "healthcheckTimeout": 600
                  },
                  "source": {
                    "repo": "baranberkay96/mirofish-railway",
                    "branch": "main",
                    "rootDirectory": "/services/mirofish"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "Backend (Flask) listen port; Railway health-checks /health on it.",
                      "defaultValue": "5001"
                    },
                    "FLASK_HOST": {
                      "isOptional": true,
                      "description": "Listen address. :: serves IPv4 and IPv6; use 0.0.0.0 only if IPv4-only is needed.",
                      "defaultValue": "::"
                    },
                    "SECRET_KEY": {
                      "isOptional": true,
                      "description": "Flask secret key (generated; replaces upstream's built-in default).",
                      "defaultValue": "{{SECRET_KEY}}"
                    },
                    "FLASK_DEBUG": {
                      "isOptional": true,
                      "description": "Keep false. true turns on Flask debug mode, never for a public deployment.",
                      "defaultValue": "false"
                    },
                    "LLM_API_KEY": {
                      "isOptional": false,
                      "description": "Required. API key of your OpenAI-compatible LLM provider (billed by that provider).",
                      "defaultValue": "{{LLM_API_KEY}}"
                    },
                    "ZEP_API_KEY": {
                      "isOptional": false,
                      "description": "Required. Zep Cloud API key (app.getzep.com) for the knowledge graph and agent memory.",
                      "defaultValue": "{{ZEP_API_KEY}}"
                    },
                    "LLM_BASE_URL": {
                      "isOptional": true,
                      "description": "OpenAI-compatible API base URL (OpenAI, DashScope, OpenRouter, vLLM, ...).",
                      "defaultValue": "https://api.openai.com/v1"
                    },
                    "LLM_MODEL_NAME": {
                      "isOptional": true,
                      "description": "Model id used for graph building, agent personas, simulation and reports.",
                      "defaultValue": "gpt-4o-mini"
                    },
                    "LLM_BOOST_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. Second OpenAI-compatible key; parallel runs use it for the Reddit agents.",
                      "defaultValue": ""
                    },
                    "LLM_BOOST_BASE_URL": {
                      "isOptional": true,
                      "description": "Optional. Base URL for LLM_BOOST_API_KEY (set all three LLM_BOOST_* or none).",
                      "defaultValue": ""
                    },
                    "LLM_BOOST_MODEL_NAME": {
                      "isOptional": true,
                      "description": "Optional. Model id for LLM_BOOST_API_KEY.",
                      "defaultValue": ""
                    },
                    "MIROFISH_CPU_THREADS": {
                      "isOptional": true,
                      "description": "Optional. Torch/BLAS threads for simulations; empty = from CPU quota, max 8.",
                      "defaultValue": ""
                    },
                    "OASIS_DEFAULT_MAX_ROUNDS": {
                      "isOptional": true,
                      "description": "Default simulation rounds. More rounds = many more LLM calls and cost.",
                      "defaultValue": "10"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": true,
                      "description": "Shutdown grace so running simulation processes are stopped cleanly on redeploy.",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "b41ceafa-3f83-5191-8c7b-784b563aa8c4": {
                      "mountPath": "/app/backend/uploads"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Web",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-19T22:14:48.327Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-10-19T22:13:44.903Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_1d1e1acd083e449aa983",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "DEPLOYING,QUEUED"
      }
    ]
  }
}
