{
  "manifest_version": "1.0.0",
  "template": {
    "id": "aba3d93e-900f-4cd0-9335-5360744e9ad5",
    "slug": "follow-the-thread",
    "name": "Follow The Thread",
    "description": "AI Powered Multi Threaded Research Agent",
    "url": "https://railway.com/deploy/follow-the-thread",
    "upstream": {
      "repo_url": "https://github.com/Agent-Field/follow-the-thread"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "pgvector/pgvector:pg17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "follow-the-thread",
      "source": {
        "repo": "https://github.com/Agent-Field/follow-the-thread"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "FTT-DB",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "tcp_ports": [
        5432
      ],
      "http": false
    },
    {
      "name": "control-plane",
      "source": {
        "image": "agentfield/control-plane:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "deepresearch-agent",
      "source": {
        "repo": "https://github.com/Agent-Field/follow-the-thread"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "-",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "-",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "APP_SECRET",
      "service": "follow-the-thread",
      "description": "-",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_URL",
      "service": "follow-the-thread",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "JINA_API_KEY",
      "service": "follow-the-thread",
      "description": "-",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "AGENTFIELD_URL",
      "service": "follow-the-thread",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "follow-the-thread",
      "description": "-",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "AGENTFIELD_API_KEY",
      "service": "follow-the-thread",
      "description": "-",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AGENT_CALLBACK_URL",
      "service": "follow-the-thread",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OPENROUTER_API_KEY",
      "service": "follow-the-thread",
      "description": "-",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "NEXT_PUBLIC_APP_URL",
      "service": "follow-the-thread",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "AGENTFIELD_WEBHOOK_SECRET",
      "service": "follow-the-thread",
      "description": "-",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "FTT-DB",
      "description": "-",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "FTT-DB",
      "description": "-",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "FTT-DB",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "AGENTFIELD_PORT",
      "service": "control-plane",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "AGENTFIELD_API_KEY",
      "service": "control-plane",
      "description": "-",
      "secret": true,
      "strategy": "default",
      "default": "this-is-a-secret"
    },
    {
      "key": "AGENTFIELD_STORAGE_MODE",
      "service": "control-plane",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "AGENTFIELD_STORAGE_POSTGRES_URL",
      "service": "control-plane",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "JINA_API_KEY",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DEFAULT_MODEL",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "openrouter/deepseek/deepseek-chat-v3.1"
    },
    {
      "key": "EMBEDDING_MODEL",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "jina_ai/jina-embeddings-v3"
    },
    {
      "key": "AGENTFIELD_SERVER",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "http://control-plane.railway.internal:8080"
    },
    {
      "key": "AGENTFIELD_API_KEY",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AGENT_CALLBACK_URL",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OPENROUTER_API_KEY",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_ROOT_DIRECTORY",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "follow-the-thread/agents/general-deep-research"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "deepresearch-agent",
      "description": "-",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "follow-the-thread"
      }
    },
    "cli": "railway deploy --template follow-the-thread",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "aba3d93e-900f-4cd0-9335-5360744e9ad5",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "68c8f36b-2a66-4504-b946-236470ef143d": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "68c8f36b-2a66-4504-b946-236470ef143d": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "8e34c0a1-1259-4f8b-93cf-75fd7185a758": {
                  "icon": null,
                  "name": "follow-the-thread",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/Agent-Field/follow-the-thread",
                    "rootDirectory": null
                  },
                  "variables": {
                    "APP_SECRET": {
                      "isOptional": true,
                      "description": "-",
                      "defaultValue": "{{APP_SECRET}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{FTT-DB.DATABASE_URL}}"
                    },
                    "JINA_API_KEY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "{{JINA_API_KEY}}"
                    },
                    "AGENTFIELD_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "http://${{control-plane.RAILWAY_PRIVATE_DOMAIN}}:${{control-plane.AGENTFIELD_PORT}}"
                    },
                    "ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "{{ENCRYPTION_KEY}}"
                    },
                    "AGENTFIELD_API_KEY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{control-plane.AGENTFIELD_API_KEY}}"
                    },
                    "AGENT_CALLBACK_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "{{OPENROUTER_API_KEY}}"
                    },
                    "NEXT_PUBLIC_APP_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "AGENTFIELD_WEBHOOK_SECRET": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "{{AGENTFIELD_WEBHOOK_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "96b67189-a38a-4d37-88a7-b7bcbef724a6": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "FTT-DB",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "5432": {}
                    }
                  },
                  "volumeMounts": {
                    "96b67189-a38a-4d37-88a7-b7bcbef724a6": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "b6fb65c6-f84e-41e0-bd42-f627f659c665": {
                  "icon": null,
                  "name": "control-plane",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "agentfield/control-plane:latest"
                  },
                  "variables": {
                    "AGENTFIELD_PORT": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "8080"
                    },
                    "AGENTFIELD_API_KEY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "this-is-a-secret"
                    },
                    "AGENTFIELD_STORAGE_MODE": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "postgres"
                    },
                    "AGENTFIELD_STORAGE_POSTGRES_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "eec4d375-9c9f-4fbe-8836-1735a35a0d6b": {
                  "icon": null,
                  "name": "deepresearch-agent",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/Agent-Field/follow-the-thread",
                    "rootDirectory": "/agents/general-deep-research"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "8080"
                    },
                    "JINA_API_KEY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{follow-the-thread.JINA_API_KEY}}"
                    },
                    "DEFAULT_MODEL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "openrouter/deepseek/deepseek-chat-v3.1"
                    },
                    "EMBEDDING_MODEL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "jina_ai/jina-embeddings-v3"
                    },
                    "AGENTFIELD_SERVER": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "http://control-plane.railway.internal:8080"
                    },
                    "AGENTFIELD_API_KEY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{control-plane.AGENTFIELD_API_KEY}}"
                    },
                    "AGENT_CALLBACK_URL": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "http://${{RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "${{follow-the-thread.OPENROUTER_API_KEY}}"
                    },
                    "RAILWAY_ROOT_DIRECTORY": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "follow-the-thread/agents/general-deep-research"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "-",
                      "defaultValue": "Dockerfile"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T16:03:44.037Z",
  "success_rate_30d": 0.8333,
  "validation": {
    "last_run_id": "run_b4595608627f46f68c64",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 255,
    "typical_build_seconds": 72,
    "typical_start_seconds": 10,
    "slowest_service": "deepresearch-agent"
  }
}
