{
  "manifest_version": "1.0.0",
  "template": {
    "id": "aaa8045d-f7b9-491e-a75e-4c4af07897d2",
    "slug": "hindsight-memory-api",
    "name": "Hindsight",
    "description": "Open-source long-term memory.Retain/Recall/Reflect memory API",
    "url": "https://railway.com/deploy/hindsight-memory-api",
    "upstream": {
      "image": "ghcr.io/vectorize-io/hindsight-api:0.9.1"
    }
  },
  "services": [
    {
      "name": "hindsight-api",
      "source": {
        "image": "ghcr.io/vectorize-io/hindsight-api:0.9.1"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "hindsight-control-plane",
      "source": {
        "image": "ghcr.io/vectorize-io/hindsight-control-plane:0.9.1"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "hindsight-worker",
      "source": {
        "image": "ghcr.io/vectorize-io/hindsight-api:0.9.1"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "hindsight-api",
      "description": "Health-check port selector",
      "secret": false,
      "strategy": "default",
      "default": "8888"
    },
    {
      "key": "HINDSIGHT_API_PORT",
      "service": "hindsight-api",
      "description": "API HTTP listen port",
      "secret": false,
      "strategy": "default",
      "default": "8888"
    },
    {
      "key": "HINDSIGHT_API_LOG_LEVEL",
      "service": "hindsight-api",
      "description": "Log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "HINDSIGHT_API_DATABASE_URL",
      "service": "hindsight-api",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "HINDSIGHT_API_LLM_PROVIDER",
      "service": "hindsight-api",
      "description": "LLM provider; none = semantic store",
      "secret": false,
      "strategy": "default",
      "default": "none"
    },
    {
      "key": "HINDSIGHT_API_TENANT_API_KEY",
      "service": "hindsight-api",
      "description": "Bearer key for REST and MCP",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HINDSIGHT_API_WORKER_ENABLED",
      "service": "hindsight-api",
      "description": "Dedicated worker owns background tasks",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "HINDSIGHT_API_TENANT_EXTENSION",
      "service": "hindsight-api",
      "description": "Enable API-key auth",
      "secret": false,
      "strategy": "default",
      "default": "hindsight_api.extensions.builtin.tenant:ApiKeyTenantExtension"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "hindsight-control-plane",
      "description": "Health-check port selector",
      "secret": false,
      "strategy": "default",
      "default": "9999"
    },
    {
      "key": "HINDSIGHT_CP_PORT",
      "service": "hindsight-control-plane",
      "description": "Control Plane HTTP port",
      "secret": false,
      "strategy": "default",
      "default": "9999"
    },
    {
      "key": "HINDSIGHT_CP_HOSTNAME",
      "service": "hindsight-control-plane",
      "description": "Bind address",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "HINDSIGHT_CP_ACCESS_KEY",
      "service": "hindsight-control-plane",
      "description": "Dashboard login password",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HINDSIGHT_CP_DATAPLANE_API_KEY",
      "service": "hindsight-control-plane",
      "description": "API key the UI sends",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "HINDSIGHT_CP_DATAPLANE_API_URL",
      "service": "hindsight-control-plane",
      "description": "Private API URL",
      "secret": false,
      "strategy": "default",
      "default": "http://hindsight-api.railway.internal:8888"
    },
    {
      "key": "PORT",
      "service": "hindsight-worker",
      "description": "Health-check port selector",
      "secret": false,
      "strategy": "default",
      "default": "8889"
    },
    {
      "key": "HINDSIGHT_API_LOG_LEVEL",
      "service": "hindsight-worker",
      "description": "Log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "HINDSIGHT_API_WORKER_ID",
      "service": "hindsight-worker",
      "description": "Stable worker identity across restarts",
      "secret": false,
      "strategy": "default",
      "default": "hindsight-worker"
    },
    {
      "key": "HINDSIGHT_API_DATABASE_URL",
      "service": "hindsight-worker",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "HINDSIGHT_API_LLM_PROVIDER",
      "service": "hindsight-worker",
      "description": "LLM provider; none = semantic store",
      "secret": false,
      "strategy": "default",
      "default": "none"
    },
    {
      "key": "HINDSIGHT_API_WORKER_HTTP_PORT",
      "service": "hindsight-worker",
      "description": "Worker health/metrics port",
      "secret": false,
      "strategy": "default",
      "default": "8889"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "hindsight-memory-api"
      }
    },
    "cli": "railway deploy --template hindsight-memory-api",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "aaa8045d-f7b9-491e-a75e-4c4af07897d2",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "44ed8773-53b2-4b44-9443-b95a2f0187b3": {
                  "icon": "https://raw.githubusercontent.com/vectorize-io/hindsight/main/hindsight-favicon.png",
                  "name": "hindsight-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/vectorize-io/hindsight-api:0.9.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Health-check port selector",
                      "defaultValue": "8888"
                    },
                    "HINDSIGHT_API_PORT": {
                      "isOptional": false,
                      "description": "API HTTP listen port",
                      "defaultValue": "8888"
                    },
                    "HINDSIGHT_API_LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Log verbosity",
                      "defaultValue": "info"
                    },
                    "HINDSIGHT_API_DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "HINDSIGHT_API_LLM_PROVIDER": {
                      "isOptional": false,
                      "description": "LLM provider; none = semantic store",
                      "defaultValue": "none"
                    },
                    "HINDSIGHT_API_TENANT_API_KEY": {
                      "isOptional": false,
                      "description": "Bearer key for REST and MCP",
                      "defaultValue": "{{HINDSIGHT_API_TENANT_API_KEY}}"
                    },
                    "HINDSIGHT_API_WORKER_ENABLED": {
                      "isOptional": false,
                      "description": "Dedicated worker owns background tasks",
                      "defaultValue": "false"
                    },
                    "HINDSIGHT_API_TENANT_EXTENSION": {
                      "isOptional": false,
                      "description": "Enable API-key auth",
                      "defaultValue": "hindsight_api.extensions.builtin.tenant:ApiKeyTenantExtension"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8888": {
                        "port": 8888
                      }
                    }
                  }
                },
                "7db40ae3-454c-4a4e-881e-61c45c770c95": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "7db40ae3-454c-4a4e-881e-61c45c770c95": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "b205dc96-5bc3-426f-b225-f5d322272390": {
                  "icon": "https://raw.githubusercontent.com/vectorize-io/hindsight/main/hindsight-favicon.png",
                  "name": "hindsight-control-plane",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/vectorize-io/hindsight-control-plane:0.9.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Health-check port selector",
                      "defaultValue": "9999"
                    },
                    "HINDSIGHT_CP_PORT": {
                      "isOptional": false,
                      "description": "Control Plane HTTP port",
                      "defaultValue": "9999"
                    },
                    "HINDSIGHT_CP_HOSTNAME": {
                      "isOptional": false,
                      "description": "Bind address",
                      "defaultValue": "0.0.0.0"
                    },
                    "HINDSIGHT_CP_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Dashboard login password",
                      "defaultValue": "{{HINDSIGHT_CP_ACCESS_KEY}}"
                    },
                    "HINDSIGHT_CP_DATAPLANE_API_KEY": {
                      "isOptional": false,
                      "description": "API key the UI sends",
                      "defaultValue": "${{hindsight-api.HINDSIGHT_API_TENANT_API_KEY}}"
                    },
                    "HINDSIGHT_CP_DATAPLANE_API_URL": {
                      "isOptional": false,
                      "description": "Private API URL",
                      "defaultValue": "http://hindsight-api.railway.internal:8888"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:9999": {
                        "port": 9999
                      }
                    }
                  }
                },
                "e89b5e7b-baaa-4d3e-a00c-81f47855178e": {
                  "icon": "https://raw.githubusercontent.com/vectorize-io/hindsight/main/hindsight-favicon.png",
                  "name": "hindsight-worker",
                  "deploy": {
                    "startCommand": "hindsight-worker",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/vectorize-io/hindsight-api:0.9.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Health-check port selector",
                      "defaultValue": "8889"
                    },
                    "HINDSIGHT_API_LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Log verbosity",
                      "defaultValue": "info"
                    },
                    "HINDSIGHT_API_WORKER_ID": {
                      "isOptional": false,
                      "description": "Stable worker identity across restarts",
                      "defaultValue": "hindsight-worker"
                    },
                    "HINDSIGHT_API_DATABASE_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "HINDSIGHT_API_LLM_PROVIDER": {
                      "isOptional": false,
                      "description": "LLM provider; none = semantic store",
                      "defaultValue": "none"
                    },
                    "HINDSIGHT_API_WORKER_HTTP_PORT": {
                      "isOptional": false,
                      "description": "Worker health/metrics port",
                      "defaultValue": "8889"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "hindsight-api",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T16:53:21.982Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_5200553d42de4660a14c",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 127,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "hindsight-worker"
  }
}
