{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a2706a82-14c6-4529-8750-6c84ef33d1ae",
    "slug": "hindsight-ai-agent-memory",
    "name": "Hindsight — AI Agent Memory",
    "description": "Memory for AI agents that learns, recalls, and evolves over time.",
    "url": "https://railway.com/deploy/hindsight-ai-agent-memory",
    "upstream": {
      "image": "ghcr.io/vectorize-io/hindsight:latest"
    }
  },
  "services": [
    {
      "name": "hindsight",
      "source": {
        "image": "ghcr.io/vectorize-io/hindsight:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/hindsight/.pg0",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "RAILWAY_RUN_UID",
      "service": "hindsight",
      "description": "Ensure write access to the Railway-mounted persistent volume",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "HINDSIGHT_API_HOST",
      "service": "hindsight",
      "description": "Listen on all container network interfaces",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "HINDSIGHT_API_PORT",
      "service": "hindsight",
      "description": "Hindsight API and MCP server port",
      "secret": false,
      "strategy": "default",
      "default": "8888"
    },
    {
      "key": "HINDSIGHT_API_LLM_MODEL",
      "service": "hindsight",
      "description": "Model used by Hindsight for memory operations",
      "secret": false,
      "strategy": "default",
      "default": "gpt-5-nano"
    },
    {
      "key": "HINDSIGHT_API_WORKER_ID",
      "service": "hindsight",
      "description": "Stable worker identity across Railway restarts",
      "secret": false,
      "strategy": "default",
      "default": "railway-hindsight"
    },
    {
      "key": "HINDSIGHT_API_LLM_API_KEY",
      "service": "hindsight",
      "description": "Required: API key for the selected cloud LLM provider",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HINDSIGHT_API_LLM_PROVIDER",
      "service": "hindsight",
      "description": "LLM provider used by Hindsight memory processing",
      "secret": false,
      "strategy": "default",
      "default": "openai"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "hindsight-ai-agent-memory"
      }
    },
    "cli": "railway deploy --template hindsight-ai-agent-memory",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a2706a82-14c6-4529-8750-6c84ef33d1ae",
            "serializedConfig": {
              "services": {
                "a00d73bc-39cb-4cd7-b433-3986c01771d5": {
                  "icon": "https://hindsight.vectorize.io/img/logo.png",
                  "name": "hindsight",
                  "source": {
                    "image": "ghcr.io/vectorize-io/hindsight:latest"
                  },
                  "variables": {
                    "RAILWAY_RUN_UID": {
                      "description": "Ensure write access to the Railway-mounted persistent volume",
                      "defaultValue": "0"
                    },
                    "HINDSIGHT_API_HOST": {
                      "description": "Listen on all container network interfaces",
                      "defaultValue": "0.0.0.0"
                    },
                    "HINDSIGHT_API_PORT": {
                      "description": "Hindsight API and MCP server port",
                      "defaultValue": "8888"
                    },
                    "HINDSIGHT_API_LLM_MODEL": {
                      "description": "Model used by Hindsight for memory operations",
                      "defaultValue": "gpt-5-nano"
                    },
                    "HINDSIGHT_API_WORKER_ID": {
                      "description": "Stable worker identity across Railway restarts",
                      "defaultValue": "railway-hindsight"
                    },
                    "HINDSIGHT_API_LLM_API_KEY": {
                      "description": "Required: API key for the selected cloud LLM provider",
                      "defaultValue": "{{HINDSIGHT_API_LLM_API_KEY}}"
                    },
                    "HINDSIGHT_API_LLM_PROVIDER": {
                      "description": "LLM provider used by Hindsight memory processing",
                      "defaultValue": "openai"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:9999": {
                        "port": 9999
                      }
                    }
                  },
                  "volumeMounts": {
                    "a00d73bc-39cb-4cd7-b433-3986c01771d5": {
                      "mountPath": "/home/hindsight/.pg0"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T14:24:46.614Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_226b8aa128db440b9fd3",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 91,
    "typical_build_seconds": 0,
    "typical_start_seconds": 30,
    "slowest_service": "hindsight"
  }
}
