{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a591e14c-00dd-44be-8d8c-ff202511467d",
    "slug": "mastra-durable-agents",
    "name": "Mastra Durable Agents",
    "description": "Durable AI agents with resumable streams via Redis and Inngest.",
    "url": "https://railway.com/deploy/mastra-durable-agents",
    "upstream": {
      "repo_url": "https://github.com/leoisadev1/mastra-template-durable-agents"
    }
  },
  "services": [
    {
      "name": "Mastra Server",
      "source": {
        "repo": "https://github.com/leoisadev1/mastra-template-durable-agents"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Inngest",
      "source": {
        "image": "inngest/inngest:v1.34.0"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "REDIS_URL",
      "service": "Mastra Server",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIBSQL_URL",
      "service": "Mastra Server",
      "description": "Provide a value for LIBSQL_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "OPENAI_API_KEY",
      "service": "Mastra Server",
      "description": "Provide a value for OPENAI_API_KEY.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "INNGEST_BASE_URL",
      "service": "Mastra Server",
      "description": "Provide a value for INNGEST_BASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Provide a value for REDIS_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Provide a value for REDIS_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MASTRA_INNGEST_URL",
      "service": "Inngest",
      "description": "Provide a value for MASTRA_INNGEST_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mastra-durable-agents"
      }
    },
    "cli": "railway deploy --template mastra-durable-agents",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a591e14c-00dd-44be-8d8c-ff202511467d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "2ec192c0-1973-4e91-8db7-bf504f47abbf": {
                  "icon": "https://unpkg.com/mastra/dist/studio/mastra.svg",
                  "name": "Mastra Server",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/leoisadev1/mastra-template-durable-agents",
                    "rootDirectory": null
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "LIBSQL_URL": {
                      "isOptional": false,
                      "defaultValue": "file:${{RAILWAY_VOLUME_MOUNT_PATH}}/mastra.db"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": false,
                      "defaultValue": "{{OPENAI_API_KEY}}"
                    },
                    "INNGEST_BASE_URL": {
                      "isOptional": false,
                      "defaultValue": "http://${{Inngest.RAILWAY_PRIVATE_DOMAIN}}:8288"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "2ec192c0-1973-4e91-8db7-bf504f47abbf": {
                      "mountPath": "/data"
                    }
                  }
                },
                "408bee8f-7cae-44bc-9ed4-4275b80d3f68": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "408bee8f-7cae-44bc-9ed4-4275b80d3f68": {
                      "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."
                  }
                },
                "a4f3ea2f-7d2f-4949-a94e-ebca3dcf8e52": {
                  "icon": "https://devicons.railway.com/inngest",
                  "name": "Inngest",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"inngest dev -p 8288 -u $MASTRA_INNGEST_URL --poll-interval=1\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "inngest/inngest:v1.34.0"
                  },
                  "variables": {
                    "MASTRA_INNGEST_URL": {
                      "isOptional": false,
                      "defaultValue": "http://${{Mastra Server.RAILWAY_PRIVATE_DOMAIN}}:8080/inngest/api"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Mastra Server",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-05T06:16:23.093Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c671cc24c8644f6da302",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 107,
    "typical_build_seconds": 81,
    "typical_start_seconds": 10,
    "slowest_service": "Mastra Server"
  }
}
