{
  "manifest_version": "1.0.0",
  "template": {
    "id": "13ddb6b4-7d44-4f19-9186-c5a0c4465697",
    "slug": "ai-memory-server",
    "name": "AI Memory Server | Shared Long-Term Memory for Coding Agents",
    "description": "Long-term memory and handoffs for Claude Code, Codex, OpenCode over MCP",
    "url": "https://railway.com/deploy/ai-memory-server",
    "upstream": {
      "image": "akitaonrails/ai-memory:3.1.1"
    }
  },
  "services": [
    {
      "name": "AI Memory",
      "source": {
        "image": "akitaonrails/ai-memory:3.1.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "AI Memory",
      "description": "Port Railway routes to - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "49374"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "AI Memory",
      "description": "Run as root so ai-memory can write to the Railway volume",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "AI_MEMORY_AUTH_TOKEN",
      "service": "AI Memory",
      "description": "Bearer token your agents send - paste it into install-mcp/install-hooks",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "AI_MEMORY_ALLOWED_HOSTS",
      "service": "AI Memory",
      "description": "Hostnames the server answers to - add your custom domain here",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "AI_MEMORY_AUTH__SECURE_COOKIE",
      "service": "AI Memory",
      "description": "Railway serves HTTPS, so browser cookies are marked secure",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ai-memory-server"
      }
    },
    "cli": "railway deploy --template ai-memory-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "13ddb6b4-7d44-4f19-9186-c5a0c4465697",
            "serializedConfig": {
              "services": {
                "43c10ff8-1fee-4562-92a4-f63fb13af2e5": {
                  "icon": "https://raw.githubusercontent.com/two-workspaces/ai-memory/main/icon.png",
                  "name": "AI Memory",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "akitaonrails/ai-memory:3.1.1"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes to - leave as is",
                      "defaultValue": "49374"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so ai-memory can write to the Railway volume",
                      "defaultValue": "0"
                    },
                    "AI_MEMORY_AUTH_TOKEN": {
                      "isOptional": false,
                      "description": "Bearer token your agents send - paste it into install-mcp/install-hooks",
                      "defaultValue": "{{AI_MEMORY_AUTH_TOKEN}}"
                    },
                    "AI_MEMORY_ALLOWED_HOSTS": {
                      "isOptional": false,
                      "description": "Hostnames the server answers to - add your custom domain here",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}},${{RAILWAY_PRIVATE_DOMAIN}},healthcheck.railway.app,localhost,127.0.0.1"
                    },
                    "AI_MEMORY_AUTH__SECURE_COOKIE": {
                      "isOptional": false,
                      "description": "Railway serves HTTPS, so browser cookies are marked secure",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "b531a1d3-66a2-4b7a-b9fe-5874f0936c87": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "AI Memory",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-23T22:14:47.579Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-20T01:31:04.536Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_294b50b8bcaa4cf0a850",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 17,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "AI Memory"
  }
}
