{
  "manifest_version": "1.0.0",
  "template": {
    "id": "52db3339-fa18-4312-b493-39ce6628c124",
    "slug": "aegra-agent-backend",
    "name": "Aegra agent backend",
    "description": "Durable agent backend with LangGraph APIs, pgvector, and Redis workers.",
    "url": "https://railway.com/deploy/aegra-agent-backend",
    "upstream": {
      "repo_url": "https://github.com/tech-progress/railway-template-aegra"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Aegra Redis",
      "source": {
        "image": "redis:8-alpine@sha256:e8eb6f2980c06c6a25c08f62cb2e00dc7d2fead9aa492cfdd8b54a42109ae0f2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Aegra PostgreSQL",
      "source": {
        "image": "pgvector/pgvector:pg18@sha256:691673308c99d2161ba298736f3147f1f22d79de2fb7ec93ae9b4afcab870b62"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    },
    {
      "name": "Aegra",
      "source": {
        "repo": "https://github.com/tech-progress/railway-template-aegra"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDIS_PASSWORD",
      "service": "Aegra Redis",
      "description": "Generated password for the private persistent Redis broker.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Aegra PostgreSQL",
      "description": "Database used for Agent Protocol state, runs, leases, and checkpoints.",
      "secret": false,
      "strategy": "default",
      "default": "aegra"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Aegra PostgreSQL",
      "description": "PostgreSQL role used by Aegra.",
      "secret": false,
      "strategy": "default",
      "default": "aegra"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Aegra PostgreSQL",
      "description": "Generated password for the private pgvector database.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "HOST",
      "service": "Aegra",
      "description": "Binds the HTTP server to every container interface.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "PORT",
      "service": "Aegra",
      "description": "HTTP port used by Railway routing and health checks.",
      "secret": false,
      "strategy": "default",
      "default": "2026"
    },
    {
      "key": "DEBUG",
      "service": "Aegra",
      "description": "Disables debug behavior in production.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "ENV_MODE",
      "service": "Aegra",
      "description": "Selects Aegra's production settings.",
      "secret": false,
      "strategy": "default",
      "default": "PRODUCTION"
    },
    {
      "key": "AUTH_TYPE",
      "service": "Aegra",
      "description": "Loads the bundled constant-time bearer-token authenticator.",
      "secret": false,
      "strategy": "default",
      "default": "custom"
    },
    {
      "key": "LOG_LEVEL",
      "service": "Aegra",
      "description": "Application log threshold.",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "REDIS_URL",
      "service": "Aegra",
      "description": "Authenticated private Redis connection string.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SERVER_URL",
      "service": "Aegra",
      "description": "Public Agent Protocol base URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_ECHO_LOG",
      "service": "Aegra",
      "description": "Keeps SQL statement logging disabled in production.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Aegra",
      "description": "Reference to the Aegra database name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AEGRA_CONFIG",
      "service": "Aegra",
      "description": "Absolute path to the graph and authentication configuration.",
      "secret": false,
      "strategy": "default",
      "default": "/app/aegra.json"
    },
    {
      "key": "CRON_ENABLED",
      "service": "Aegra",
      "description": "Runs Aegra's persisted cron scheduler in this instance.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OTEL_TARGETS",
      "service": "Aegra",
      "description": "Optional comma-separated observability targets; empty by default.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "WORKER_COUNT",
      "service": "Aegra",
      "description": "Worker loops started inside the Aegra instance.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "AEGRA_API_KEY",
      "service": "Aegra",
      "description": "Generated bearer token required by every protected Agent Protocol route.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "POSTGRES_HOST",
      "service": "Aegra",
      "description": "Private Railway hostname of PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_PORT",
      "service": "Aegra",
      "description": "Private PostgreSQL port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Aegra",
      "description": "Username reference for PostgreSQL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "METRICS_ENABLED",
      "service": "Aegra",
      "description": "Keeps the metrics route disabled unless explicitly enabled.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DB_POOL_MAX_SIZE",
      "service": "Aegra",
      "description": "Maximum API database pool size.",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "DB_POOL_MIN_SIZE",
      "service": "Aegra",
      "description": "Minimum API database pool size.",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "N_JOBS_PER_WORKER",
      "service": "Aegra",
      "description": "Maximum concurrent jobs handled by each worker loop.",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Aegra",
      "description": "Password reference for PostgreSQL.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_WORKER_COUNT",
      "service": "Aegra",
      "description": "Worker loops started inside the Aegra instance.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "OTEL_CONSOLE_EXPORT",
      "service": "Aegra",
      "description": "Disables console trace export.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "OTEL_CONSOLE_ENABLED",
      "service": "Aegra",
      "description": "Disables console trace export.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "REDIS_BROKER_ENABLED",
      "service": "Aegra",
      "description": "Uses Redis for queued workers and event streaming.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SQLALCHEMY_POOL_SIZE",
      "service": "Aegra",
      "description": "Base API database pool size.",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "REDIS_JOBS_PER_WORKER",
      "service": "Aegra",
      "description": "Maximum concurrent jobs handled by each worker loop.",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "DB_WORKER_POOL_MAX_SIZE",
      "service": "Aegra",
      "description": "Maximum worker database pool size.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "DB_WORKER_POOL_MIN_SIZE",
      "service": "Aegra",
      "description": "Minimum worker database pool size.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "LANGGRAPH_MAX_POOL_SIZE",
      "service": "Aegra",
      "description": "Maximum LangGraph checkpoint database pool size.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "LANGGRAPH_MIN_POOL_SIZE",
      "service": "Aegra",
      "description": "Minimum LangGraph checkpoint database pool size.",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "SQLALCHEMY_MAX_OVERFLOW",
      "service": "Aegra",
      "description": "Maximum overflow connections above the API pool size.",
      "secret": false,
      "strategy": "default",
      "default": "5"
    },
    {
      "key": "ENABLE_PROMETHEUS_METRICS",
      "service": "Aegra",
      "description": "Keeps the Prometheus metrics route disabled unless explicitly enabled.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "aegra-agent-backend"
      }
    },
    "cli": "railway deploy --template aegra-agent-backend",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "52db3339-fa18-4312-b493-39ce6628c124",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "4a510235-27be-43ac-99de-00920cc95f28": {
                  "icon": null,
                  "name": "Aegra Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'exec redis-server --appendonly yes --requirepass \"$REDIS_PASSWORD\"'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": null,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8-alpine@sha256:e8eb6f2980c06c6a25c08f62cb2e00dc7d2fead9aa492cfdd8b54a42109ae0f2"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the private persistent Redis broker.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "4a510235-27be-43ac-99de-00920cc95f28": {
                      "sizeMB": 1000,
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "650f1cfd-119a-4471-a75b-7571a1a5b320": {
                  "icon": null,
                  "name": "Aegra PostgreSQL",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": null,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg18@sha256:691673308c99d2161ba298736f3147f1f22d79de2fb7ec93ae9b4afcab870b62"
                  },
                  "variables": {
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database used for Agent Protocol state, runs, leases, and checkpoints.",
                      "defaultValue": "aegra"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "PostgreSQL role used by Aegra.",
                      "defaultValue": "aegra"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the private pgvector database.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "650f1cfd-119a-4471-a75b-7571a1a5b320": {
                      "sizeMB": 5000,
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                },
                "887b7980-d3ff-4707-aea6-64a5dcc99505": {
                  "icon": null,
                  "name": "Aegra",
                  "build": {
                    "builder": "DOCKERFILE",
                    "watchPatterns": [
                      "/**",
                      "!/FINDINGS.md"
                    ],
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/ready",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "tech-progress/railway-template-aegra",
                    "branch": "release-v1",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "HOST": {
                      "isOptional": false,
                      "description": "Binds the HTTP server to every container interface.",
                      "defaultValue": "0.0.0.0"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port used by Railway routing and health checks.",
                      "defaultValue": "2026"
                    },
                    "DEBUG": {
                      "isOptional": false,
                      "description": "Disables debug behavior in production.",
                      "defaultValue": "false"
                    },
                    "ENV_MODE": {
                      "isOptional": false,
                      "description": "Selects Aegra's production settings.",
                      "defaultValue": "PRODUCTION"
                    },
                    "AUTH_TYPE": {
                      "isOptional": false,
                      "description": "Loads the bundled constant-time bearer-token authenticator.",
                      "defaultValue": "custom"
                    },
                    "LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Application log threshold.",
                      "defaultValue": "INFO"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Authenticated private Redis connection string.",
                      "defaultValue": "redis://:${{Aegra Redis.REDIS_PASSWORD}}@${{Aegra Redis.RAILWAY_PRIVATE_DOMAIN}}:6379/0"
                    },
                    "SERVER_URL": {
                      "isOptional": false,
                      "description": "Public Agent Protocol base URL.",
                      "defaultValue": "https://${{Aegra.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_ECHO_LOG": {
                      "isOptional": false,
                      "description": "Keeps SQL statement logging disabled in production.",
                      "defaultValue": "false"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Reference to the Aegra database name.",
                      "defaultValue": "${{Aegra PostgreSQL.POSTGRES_DB}}"
                    },
                    "AEGRA_CONFIG": {
                      "isOptional": false,
                      "description": "Absolute path to the graph and authentication configuration.",
                      "defaultValue": "/app/aegra.json"
                    },
                    "CRON_ENABLED": {
                      "isOptional": false,
                      "description": "Runs Aegra's persisted cron scheduler in this instance.",
                      "defaultValue": "true"
                    },
                    "OTEL_TARGETS": {
                      "isOptional": false,
                      "description": "Optional comma-separated observability targets; empty by default.",
                      "defaultValue": "{{OTEL_TARGETS}}"
                    },
                    "WORKER_COUNT": {
                      "isOptional": false,
                      "description": "Worker loops started inside the Aegra instance.",
                      "defaultValue": "2"
                    },
                    "AEGRA_API_KEY": {
                      "isOptional": false,
                      "description": "Generated bearer token required by every protected Agent Protocol route.",
                      "defaultValue": "{{AEGRA_API_KEY}}"
                    },
                    "POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Private Railway hostname of PostgreSQL.",
                      "defaultValue": "${{Aegra PostgreSQL.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "Private PostgreSQL port.",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Username reference for PostgreSQL.",
                      "defaultValue": "${{Aegra PostgreSQL.POSTGRES_USER}}"
                    },
                    "METRICS_ENABLED": {
                      "isOptional": false,
                      "description": "Keeps the metrics route disabled unless explicitly enabled.",
                      "defaultValue": "false"
                    },
                    "DB_POOL_MAX_SIZE": {
                      "isOptional": false,
                      "description": "Maximum API database pool size.",
                      "defaultValue": "5"
                    },
                    "DB_POOL_MIN_SIZE": {
                      "isOptional": false,
                      "description": "Minimum API database pool size.",
                      "defaultValue": "5"
                    },
                    "N_JOBS_PER_WORKER": {
                      "isOptional": false,
                      "description": "Maximum concurrent jobs handled by each worker loop.",
                      "defaultValue": "4"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password reference for PostgreSQL.",
                      "defaultValue": "${{Aegra PostgreSQL.POSTGRES_PASSWORD}}"
                    },
                    "REDIS_WORKER_COUNT": {
                      "isOptional": false,
                      "description": "Worker loops started inside the Aegra instance.",
                      "defaultValue": "2"
                    },
                    "OTEL_CONSOLE_EXPORT": {
                      "isOptional": false,
                      "description": "Disables console trace export.",
                      "defaultValue": "false"
                    },
                    "OTEL_CONSOLE_ENABLED": {
                      "isOptional": false,
                      "description": "Disables console trace export.",
                      "defaultValue": "false"
                    },
                    "REDIS_BROKER_ENABLED": {
                      "isOptional": false,
                      "description": "Uses Redis for queued workers and event streaming.",
                      "defaultValue": "true"
                    },
                    "SQLALCHEMY_POOL_SIZE": {
                      "isOptional": false,
                      "description": "Base API database pool size.",
                      "defaultValue": "5"
                    },
                    "REDIS_JOBS_PER_WORKER": {
                      "isOptional": false,
                      "description": "Maximum concurrent jobs handled by each worker loop.",
                      "defaultValue": "4"
                    },
                    "DB_WORKER_POOL_MAX_SIZE": {
                      "isOptional": false,
                      "description": "Maximum worker database pool size.",
                      "defaultValue": "10"
                    },
                    "DB_WORKER_POOL_MIN_SIZE": {
                      "isOptional": false,
                      "description": "Minimum worker database pool size.",
                      "defaultValue": "2"
                    },
                    "LANGGRAPH_MAX_POOL_SIZE": {
                      "isOptional": false,
                      "description": "Maximum LangGraph checkpoint database pool size.",
                      "defaultValue": "10"
                    },
                    "LANGGRAPH_MIN_POOL_SIZE": {
                      "isOptional": false,
                      "description": "Minimum LangGraph checkpoint database pool size.",
                      "defaultValue": "2"
                    },
                    "SQLALCHEMY_MAX_OVERFLOW": {
                      "isOptional": false,
                      "description": "Maximum overflow connections above the API pool size.",
                      "defaultValue": "5"
                    },
                    "ENABLE_PROMETHEUS_METRICS": {
                      "isOptional": false,
                      "description": "Keeps the Prometheus metrics route disabled unless explicitly enabled.",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 2026
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Aegra",
      "method": "GET",
      "path": "/ready",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0"
}
