{
  "manifest_version": "1.0.0",
  "template": {
    "id": "3abbcbb6-81d1-416e-9757-d9173b763b5b",
    "slug": "letta-ai-agent",
    "name": "Letta | Open-Source Stateful AI Agent Framework",
    "description": "Self-host Letta (MemGPT). Build AI agents that remember everything",
    "url": "https://railway.com/deploy/letta-ai-agent",
    "upstream": {
      "image": "letta/letta:latest"
    }
  },
  "services": [
    {
      "name": "Letta",
      "source": {
        "image": "letta/letta:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Letta-DB",
      "source": {
        "image": "pgvector/pgvector:pg16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Letta",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "8283"
    },
    {
      "key": "SECURE",
      "service": "Letta",
      "description": "Enable API password authentication",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LETTA_PG_URI",
      "service": "Letta",
      "description": "PostgreSQL connection with pgvector",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LETTA_SERVER_PASSWORD",
      "service": "Letta",
      "description": "API access password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGDATA",
      "service": "Letta-DB",
      "description": "Data directory subdirectory",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Letta-DB",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "letta"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Letta-DB",
      "description": "Database username",
      "secret": false,
      "strategy": "default",
      "default": "letta"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Letta-DB",
      "description": "Run as root for volume permissions",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Letta-DB",
      "description": "Database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "letta-ai-agent"
      }
    },
    "cli": "railway deploy --template letta-ai-agent",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "3abbcbb6-81d1-416e-9757-d9173b763b5b",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "438ad4b6-2bf0-49b9-88fb-70aa7a8a9f40": {
                  "icon": "https://avatars.githubusercontent.com/u/177780362?s=200&v=4",
                  "name": "Letta",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "letta/letta:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "8283"
                    },
                    "SECURE": {
                      "isOptional": false,
                      "description": "Enable API password authentication",
                      "defaultValue": "true"
                    },
                    "LETTA_PG_URI": {
                      "isOptional": false,
                      "description": "PostgreSQL connection with pgvector",
                      "defaultValue": "postgresql://letta:${{Letta-DB.POSTGRES_PASSWORD}}@${{Letta-DB.RAILWAY_PRIVATE_DOMAIN}}:5432/letta"
                    },
                    "LETTA_SERVER_PASSWORD": {
                      "isOptional": false,
                      "description": "API access password",
                      "defaultValue": "{{LETTA_SERVER_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "bafedac9-43b4-42c9-945d-46a80f1c9de4": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgres.svg",
                  "name": "Letta-DB",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory subdirectory",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "letta"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database username",
                      "defaultValue": "letta"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root for volume permissions",
                      "defaultValue": "0"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "bafedac9-43b4-42c9-945d-46a80f1c9de4": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T13:16:27.376Z",
  "success_rate_30d": 0.8333,
  "validation": {
    "last_run_id": "run_823729bf200341e5b1bc",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 74,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Letta"
  }
}
