# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Sam Hermes Agent Backup 2026-05-13
spec:
    description: |
        Hermes Agent 個人備份（2026-05-13）
        含 NVIDIA meta/llama-3.3-70b-instruct + Twinkle Hub MCP + Telegram 整合
        備份自 Zeabur 專案 hermes-agent（ID: 69e8ad004bdf5ec1ab0a54ee）
    tags:
        - AI
        - Agent
        - Backup
    readme: |
        # Sam Hermes Agent 備份 2026-05-13

        此模板為個人 hermes-agent 服務的完整備份，包含所有環境變數與設定。

        ## 已設定的整合
        - **LLM**：NVIDIA NIM（meta/llama-3.3-70b-instruct）
        - **MCP**：Twinkle Hub（42 工具，台灣政府開放資料 + 台灣工具）
        - **通訊**：Telegram Bot（long-polling 模式）
        - **API Server**：OpenAI-compatible，port 5000

        ## 還原後注意事項
        1. 確認 NVIDIA API Key 仍有效
        2. 確認 Telegram Bot Token 仍有效
        3. PUBLIC_DOMAIN 需設定為對應的子網域

        ## 原始專案資訊
        - 專案 ID: 69e8ad004bdf5ec1ab0a54ee
        - 服務 ID: 69e8ad014bdf5ec1ab0a54ef
        - 環境 ID: 69e8ad00d34cd657ee3453ba
        - 部署區域: Tencent Singapore 2C 8GB
    services:
        - name: hermes-agent
          icon: https://raw.githubusercontent.com/NousResearch/hermes-agent/main/website/static/img/logo.png
          template: PREBUILT_V2
          spec:
            id: hermes-agent
            source:
                image: nousresearch/hermes-agent:v2026.4.30
                command:
                    - /bin/bash
                    - -c
                    - /opt/zeabur/startup.sh
            ports:
                - id: web
                  port: 5000
                  type: HTTP
            volumes:
                - id: data
                  dir: /opt/data
            instructions:
                - title: API Server URL
                  content: ${ZEABUR_WEB_URL}/v1/chat/completions
                - title: API Server Key
                  content: ${API_SERVER_KEY}
            env:
                API_BASE_URL:
                    default: https://integrate.api.nvidia.com/v1
                API_SERVER_ENABLED:
                    default: "true"
                API_SERVER_HOST:
                    default: 0.0.0.0
                API_SERVER_KEY:
                    default: ${PASSWORD}
                    expose: true
                API_SERVER_PORT:
                    default: "5000"
                MCP_TWINKLE_HUB_TOKEN:
                    default: sk-oKxZBQaqwrzWTqsU2ub8YA
                    expose: false
                MODEL:
                    default: meta/llama-3.3-70b-instruct
                NVIDIA_API_KEY:
                    default: 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
                    expose: false
                OPENROUTER_API_KEY:
                    default: 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
                    expose: false
                PASSWORD:
                    default: 81LaK69gY3D4SC2PAeIOpy0q5vMdr7RN
                PROVIDER:
                    default: openai-compatible
                PUBLIC_DOMAIN:
                    default: sam-hermes
                TELEGRAM_ALLOWED_USERS:
                    default: "7895685490"
                TELEGRAM_BOT_TOKEN:
                    default: 8702278976:AAEGP90WY6HmOKI8upMlaZcHXj5-jOnMvlM
                    expose: false
                Tawwan_MCP_Hub_API:
                    default: sk-oKxZBQaqwrzWTqsU2ub8YA
                    expose: false
            configs:
                - path: /opt/zeabur/startup.sh
                  template: |
                    #!/bin/bash
                    set -e
                    chown -R hermes:hermes /opt/data 2>/dev/null || true
                    exec /opt/hermes/docker/entrypoint.sh gateway
                  permission: 493
                  envsubst: false
          domainKey: PUBLIC_DOMAIN
