# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: PilotDeck
spec:
    description: |
        PilotDeck is an open-source agent OS built around WorkSpace isolation,
        white-box memory, smart model routing, and always-on background agents.
        Official Docker image build from OpenBMB/PilotDeck (UI on port 3001).
    coverImage: https://raw.githubusercontent.com/OpenBMB/PilotDeck/main/assets/banner.png
    icon: https://raw.githubusercontent.com/OpenBMB/PilotDeck/main/assets/banner.png
    variables:
        - key: PUBLIC_DOMAIN
          type: DOMAIN
          name: Domain
          description: Public domain for PilotDeck Web UI (e.g. pilot.z88.dev)
        - key: PILOTDECK_API_KEY
          type: PASSWORD
          name: Model API Key
          description: OpenAI-compatible API key (OpenRouter / DeepSeek / DashScope / etc.)
        - key: PILOTDECK_API_URL
          type: STRING
          name: Model API Base URL
          description: OpenAI-compatible base URL
        - key: PILOTDECK_MODEL
          type: STRING
          name: Main Model
          description: Main model id, e.g. openrouter/deepseek/deepseek-v4-flash or openai/gpt-4.1
        - key: PILOTDECK_LIGHT_MODEL
          type: STRING
          name: Light Model
          description: Light model for smart routing (optional, can equal main model)
    tags:
        - AI
        - Agent
        - MCP
        - Productivity
    readme: "# PilotDeck\n\nWorkSpace-centric open-source **Agent OS** by OpenBMB / THUNLP / ModelBest / AI9Stars.\n\n**Upstream:** [github.com/OpenBMB/PilotDeck](https://github.com/OpenBMB/PilotDeck)  \n**Docs:** [pilotdeck.openbmb.cn](https://pilotdeck.openbmb.cn)  \n**License:** AGPL-3.0\n\n> Note: `OpenBMB/XDeck` does **not** exist on GitHub. This template is for **PilotDeck**.\n\n## Services\n\nSingle container built from the official `Dockerfile`:\n\n| Process | Port | Role |\n|---------|------|------|\n| UI Server | **3001** | Web UI + REST/WS |\n| Gateway | 18789 (internal) | Agent runtime |\n\nPersistent state: `/root/.pilotdeck` (config, auth, memory, projects, skills).\n\n## After deploy\n\n1. Open **PUBLIC_DOMAIN** (HTTPS via Zeabur Ingress).\n2. Complete onboarding: set provider + API key (or use template env vars).\n3. Create a WorkSpace and start tasks.\n\n## Env vars\n\n| Variable | Default / notes |\n|----------|-----------------|\n| `SERVER_PORT` | `3001` |\n| `PILOT_HOME` | `/root/.pilotdeck` |\n| `PILOTDECK_MODEL` | main model |\n| `PILOTDECK_LIGHT_MODEL` | light model for routing |\n| `PILOTDECK_API_KEY` | API key |\n| `PILOTDECK_API_URL` | API base URL |\n\n## Deploy note (Zeabur)\n\nMarketplace `deployTemplate` may reject `ARBITRARY_GIT`. Practical path:\n\n1. `createServiceFromArbitraryGit` → `https://github.com/OpenBMB/PilotDeck.git` (branch `main`)\n2. Set ports `web:3001/HTTP`, volume `/root/.pilotdeck`\n3. Set env vars, bind domain, redeploy (repo root has `Dockerfile`)\n"
    resourceRequirement:
        minConfig:
            cpu: 2
            ram: 4
        recommendedConfig:
            cpu: 4
            ram: 8
    services:
        - name: pilotdeck
          icon: https://raw.githubusercontent.com/OpenBMB/PilotDeck/main/assets/banner.png
          template: PREBUILT_V2
          spec:
            id: pilotdeck
            source:
                source: ARBITRARY_GIT
                gitURL: https://github.com/OpenBMB/PilotDeck.git
                branch: main
            ports:
                - id: web
                  port: 3001
                  type: HTTP
            volumes:
                - id: pilot-home
                  dir: /root/.pilotdeck
            env:
                HOST:
                    default: 0.0.0.0
                NODE_ENV:
                    default: production
                PILOT_HOME:
                    default: /root/.pilotdeck
                PILOTDECK_API_KEY:
                    default: ${PILOTDECK_API_KEY}
                PILOTDECK_API_URL:
                    default: ${PILOTDECK_API_URL}
                PILOTDECK_GATEWAY_PORT:
                    default: "18789"
                PILOTDECK_LIGHT_MODEL:
                    default: ${PILOTDECK_LIGHT_MODEL}
                PILOTDECK_MODEL:
                    default: ${PILOTDECK_MODEL}
                SERVER_PORT:
                    default: "3001"
            healthCheck:
                type: HTTP
                port: web
                http:
                    path: /
          domainKey: PUBLIC_DOMAIN
localization:
    zh-CN:
        description: |
            PilotDeck：以 WorkSpace 为核心的开源 Agent OS（白盒记忆、智能路由、常驻后台）。
            官方仓库 OpenBMB/PilotDeck。注意 OpenBMB/XDeck 仓库不存在。
        variables:
            - key: PUBLIC_DOMAIN
              type: DOMAIN
              name: 域名
              description: Web UI 公网域名（如 pilot.z88.dev）
            - key: PILOTDECK_API_KEY
              type: PASSWORD
              name: 模型 API Key
              description: OpenAI 兼容 Key
            - key: PILOTDECK_API_URL
              type: STRING
              name: API Base URL
              description: 模型接口地址
            - key: PILOTDECK_MODEL
              type: STRING
              name: 主模型
              description: 主模型 ID
            - key: PILOTDECK_LIGHT_MODEL
              type: STRING
              name: 轻量模型
              description: 智能路由用的轻量模型
        readme: |
            # PilotDeck

            上游：[OpenBMB/PilotDeck](https://github.com/OpenBMB/PilotDeck)

            ## 说明

            - 用户口误的 **XDeck** 在 GitHub 上 **404**；本模板对应 **PilotDeck**。
            - 你的机器名 `GIT-PilotDeck-Singapore` 即此产品向。
            - 构建使用仓库自带 `Dockerfile`，端口 **3001**，状态目录 `/root/.pilotdeck`。

            ## 部署后

            打开域名 → 完成引导配置模型 → 创建 WorkSpace。
