# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Nanobot
spec:
    description: |
        Nanobot is an ultra-lightweight personal AI assistant (~4K lines core code) supporting multiple LLM providers and chat platforms including Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ, and Email.
    coverImage: https://raw.githubusercontent.com/HKUDS/nanobot/main/nanobot_arch.png
    icon: https://raw.githubusercontent.com/HKUDS/nanobot/main/nanobot_logo.png
    variables:
        - key: ZEABUR_AI_HUB_API_KEY
          type: STRING
          name: Zeabur AI Hub API Key
          description: Zeabur AI Hub API key for multi-model access (get one at zeabur.com). Recommended for Zeabur users. Leave empty to use other providers.
        - key: TELEGRAM_BOT_TOKEN
          type: STRING
          name: Telegram Bot Token
          description: Your Telegram bot token from @BotFather. Leave empty to configure later.
    tags:
        - AI
        - Assistant
        - Chatbot
        - Telegram
        - Discord
    readme: |
        # Nanobot

        > ⚠️ This template requires a [Dedicated Server](https://zeabur.com/docs/dedicated-server) on Zeabur and cannot run on shared clusters.

        **Recommended resources:** 1 vCPU / 2 GB RAM (minimum: 0.5 vCPU / 256 MB RAM)

        Nanobot is an ultra-lightweight personal AI assistant framework (~4K lines of core agent code) from [HKUDS](https://github.com/HKUDS/nanobot). It supports multiple LLM providers and connects to various messaging platforms via a unified Gateway architecture.

        **Official documentation:** [github.com/HKUDS/nanobot](https://github.com/HKUDS/nanobot)

        ## Supported Chat Platforms

        Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ, and Email.

        ## Quick Start

        1. After deployment, the Nanobot gateway starts automatically
        2. If you entered an API key during deployment (Zeabur AI Hub or OpenRouter), a chat model is already configured
        3. If you entered a Telegram bot token, the bot is ready — send it a message to start chatting
        4. To add more platforms or change settings, edit `/root/.nanobot/config.json` via the **Files** tab

        **Skipped a field during deployment?** You can add it later by editing `/root/.nanobot/config.json` in the **Files** tab, or by adding the corresponding environment variable in the Zeabur dashboard and restarting the service.

        **Default model:** When using Zeabur AI Hub, the default model is `openai/claude-sonnet-4-5`. When using OpenRouter, the default model is `openrouter/anthropic/claude-sonnet-4`. You can change this in the config file at any time.

        ## LLM Providers

        Nanobot supports many providers. You can switch at any time by editing `/root/.nanobot/config.json` via the **Files** tab and restarting the service.

        | Provider | How to get API key | `providers` config | Model ID example |
        |----------|-------------------|-------------------|-----------------|
        | Zeabur AI Hub | [zeabur.com/ai-hub](https://zeabur.com/ai-hub) | `"openai": {"api_key":"...","api_base":"https://hnd1.aihub.zeabur.ai/v1"}` | `openai/claude-sonnet-4-5` |
        | OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) | `"openrouter": {"api_key":"sk-or-..."}` | `openrouter/anthropic/claude-sonnet-4` |
        | Anthropic | [console.anthropic.com](https://console.anthropic.com/) | `"anthropic": {"api_key":"sk-ant-..."}` | `anthropic/claude-sonnet-4-5` |
        | OpenAI | [platform.openai.com](https://platform.openai.com/api-keys) | `"openai": {"api_key":"sk-..."}` | `openai/gpt-4o` |
        | DeepSeek | [platform.deepseek.com](https://platform.deepseek.com/) | `"deepseek": {"api_key":"..."}` | `deepseek/deepseek-chat` |

        **To switch provider:**
        1. Open `/root/.nanobot/config.json` in the **Files** tab
        2. Add or update the provider entry under `"providers"`
        3. Change `"agents" > "defaults" > "model"` to the new model ID
        4. **Restart the service** for changes to take effect

        **Example** — switch from Zeabur AI Hub to OpenRouter:
        ```json
        {
          "providers": {
            "openrouter": { "api_key": "sk-or-your-key" }
          },
          "agents": {
            "defaults": { "model": "openrouter/anthropic/claude-sonnet-4" }
          }
        }
        ```

        ## Chat Platforms

        Supported: Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ, and Email. See the [official documentation](https://github.com/HKUDS/nanobot#-chat-apps) for the full list and setup guides.

        **Telegram setup:**
        1. Search for `@BotFather` on Telegram and send `/newbot`
        2. Follow the prompts to set the bot name and username
        3. Copy the bot token you receive
        4. Enter it during deployment, or add it to config later

        If you entered the bot token during deployment, it's already active. Otherwise, add it to config:

        ```json
        "channels": {
          "telegram": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
        }
        ```

        **Other platforms** — add the corresponding channel in config and restart:

        ```json
        "channels": {
          "discord": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] },
          "slack": { "enabled": true, "bot_token": "xoxb-...", "app_token": "xapp-...", "allow_from": [] }
        }
        ```

        **`allow_from`** — controls who can talk to the bot. Empty list `[]` = anyone can use it. To restrict access, add user IDs (for Telegram, send a message to `@userinfobot` to find your user ID):

        ```json
        "allow_from": ["123456789", "987654321"]
        ```

        Restart the service after any config changes.

        ## CLI Commands

        Access the terminal via **Command** in Zeabur dashboard:
        - `nanobot agent -m "query"` - Send a single message
        - `nanobot agent` - Interactive chat
        - `nanobot status` - View provider configuration

        ## Data Persistence

        All data is stored under `/root/.nanobot` (mounted as a persistent volume):
        - `config.json` - Configuration
        - `workspace/` - Agent workspace and memory

        It is recommended to use [Zeabur's backup feature](https://zeabur.com/docs/manage/backup) to regularly back up your data.

        ## Troubleshooting

        **Service won't start?**
        1. Check **Logs** for error messages
        2. Edit config via **Files** tab to fix issues
        3. Restart the service

        **Update version:** Modify the startup script to install a specific version: `uv pip install --system nanobot-ai==0.1.3.post6`

        **More help:** See the [official documentation](https://github.com/HKUDS/nanobot) for detailed configuration and usage guides.
    resourceRequirement:
        minConfig:
            cpu: 1
            ram: 1
        recommendedConfig:
            cpu: 1
            ram: 2
    services:
        - name: nanobot
          icon: https://raw.githubusercontent.com/HKUDS/nanobot/main/nanobot_logo.png
          template: PREBUILT_V2
          spec:
            id: nanobot
            source:
                image: ghcr.io/canyugs/nanobot:latest
                command:
                    - /bin/sh
                    - -c
                    - /opt/nanobot/startup.sh
            ports:
                - id: web
                  port: 18790
                  type: HTTP
            volumes:
                - id: data
                  dir: /root/.nanobot
            env:
                OPENROUTER_API_KEY:
                    default: ${OPENROUTER_API_KEY}
                TELEGRAM_BOT_TOKEN:
                    default: ${TELEGRAM_BOT_TOKEN}
                ZEABUR_AI_HUB_API_KEY:
                    default: ${ZEABUR_AI_HUB_API_KEY}
            configs:
                - path: /opt/nanobot/startup.sh
                  template: |
                    #!/bin/sh
                    set -e

                    CONFIG_DIR="/root/.nanobot"
                    CONFIG_FILE="$CONFIG_DIR/config.json"
                    mkdir -p "$CONFIG_DIR"

                    if [ ! -f "$CONFIG_FILE" ]; then
                      echo "=== Creating initial configuration ==="
                      export NANOBOT_CONFIG_PATH="$CONFIG_FILE"
                      python3 << 'PYEOF'
                    import json, os

                    config_file = os.environ["NANOBOT_CONFIG_PATH"]
                    config = {
                        "gateway": {"host": "0.0.0.0", "port": 18790},
                        "agents": {"defaults": {"model": "anthropic/claude-opus-4-5", "max_tokens": 8192, "temperature": 0.7}},
                        "providers": {},
                        "channels": {},
                        "tools": {"restrict_to_workspace": True}
                    }

                    zeabur_key = os.environ.get("ZEABUR_AI_HUB_API_KEY", "")
                    if zeabur_key and not zeabur_key.startswith("${"):
                        config["providers"]["openai"] = {"api_key": zeabur_key, "api_base": "https://hnd1.aihub.zeabur.ai/v1"}
                        config["agents"]["defaults"]["model"] = "openai/claude-sonnet-4-5"

                    openrouter_key = os.environ.get("OPENROUTER_API_KEY", "")
                    if openrouter_key and not openrouter_key.startswith("${"):
                        config["providers"]["openrouter"] = {"api_key": openrouter_key}
                        if not (zeabur_key and not zeabur_key.startswith("${")):
                            config["agents"]["defaults"]["model"] = "openrouter/anthropic/claude-sonnet-4"

                    telegram_token = os.environ.get("TELEGRAM_BOT_TOKEN", "")
                    if telegram_token and not telegram_token.startswith("${"):
                        config["channels"]["telegram"] = {"enabled": True, "token": telegram_token, "allow_from": []}

                    discord_token = os.environ.get("DISCORD_BOT_TOKEN", "")
                    if discord_token and not discord_token.startswith("${"):
                        config["channels"]["discord"] = {"enabled": True, "token": discord_token, "allow_from": []}

                    with open(config_file, "w") as f:
                        json.dump(config, f, indent=2)
                    os.chmod(config_file, 0o600)
                    print(f"Config created at {config_file}")
                    PYEOF
                    else
                      echo "Config already exists at $CONFIG_FILE"
                    fi

                    # Export Zeabur AI Hub env vars for litellm
                    if [ -n "$ZEABUR_AI_HUB_API_KEY" ] && [ "$ZEABUR_AI_HUB_API_KEY" != '${ZEABUR_AI_HUB_API_KEY}' ]; then
                      export OPENAI_API_KEY="$ZEABUR_AI_HUB_API_KEY"
                      export OPENAI_API_BASE="https://hnd1.aihub.zeabur.ai/v1"
                    fi

                    echo "=== Starting health check server ==="
                    python3 -c "
                    from http.server import HTTPServer, BaseHTTPRequestHandler
                    import json

                    class Handler(BaseHTTPRequestHandler):
                        def do_GET(self):
                            self.send_response(200)
                            self.send_header('Content-Type', 'application/json')
                            self.end_headers()
                            self.wfile.write(json.dumps({'status': 'ok', 'service': 'nanobot'}).encode())
                        def log_message(self, *args):
                            pass

                    HTTPServer(('0.0.0.0', 18790), Handler).serve_forever()
                    " &

                    echo "=== Starting nanobot gateway ==="
                    exec nanobot gateway
                  permission: 493
                  envsubst: false
localization:
    es-ES:
        description: |
            Nanobot es un asistente personal de IA ultraligero (~4K lineas de codigo central) que soporta multiples proveedores de LLM y plataformas de chat incluyendo Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ y correo electronico.
        variables:
            - key: ZEABUR_AI_HUB_API_KEY
              type: STRING
              name: Clave API de Zeabur AI Hub
              description: Clave API de Zeabur AI Hub para acceso multimodelo (obtenga una en zeabur.com). Recomendado para usuarios de Zeabur. Dejelo vacio para usar otros proveedores.
            - key: TELEGRAM_BOT_TOKEN
              type: STRING
              name: Token de Bot de Telegram
              description: Su token de bot de Telegram de BotFather. Dejelo vacio para configurar despues.
        readme: |
            # Nanobot

            > ⚠️ Esta plantilla requiere un [Dedicated Server](https://zeabur.com/docs/dedicated-server) en Zeabur y no puede ejecutarse en clusters compartidos.

            **Recursos recomendados:** 1 vCPU / 2 GB RAM (minimo: 0.5 vCPU / 256 MB RAM)

            Nanobot es un framework de asistente personal de IA ultraligero (~4K lineas de codigo de agente central) de [HKUDS](https://github.com/HKUDS/nanobot). Soporta multiples proveedores de LLM y se conecta a varias plataformas de mensajeria a traves de una arquitectura Gateway unificada.

            **Documentacion oficial:** [github.com/HKUDS/nanobot](https://github.com/HKUDS/nanobot)

            ## Plataformas de Chat Soportadas

            Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ y correo electronico.

            ## Inicio Rapido

            1. Despues del despliegue, la puerta de enlace de Nanobot se inicia automaticamente
            2. Si ingreso una clave API durante el despliegue (Zeabur AI Hub u OpenRouter), el modelo de chat ya esta configurado
            3. Si ingreso un token de bot de Telegram, el bot esta listo — envie un mensaje para comenzar
            4. Para agregar mas plataformas o cambiar configuracion, edite `/root/.nanobot/config.json` en la pestana **Files**

            **Omitio un campo durante el despliegue?** Puede agregarlo despues editando `/root/.nanobot/config.json` en la pestana **Files**, o agregando la variable de entorno correspondiente en el panel de Zeabur y reiniciando el servicio.

            **Modelo predeterminado:** Con Zeabur AI Hub es `openai/claude-sonnet-4-5`, con OpenRouter es `openrouter/anthropic/claude-sonnet-4`. Puede cambiarlo en el archivo de configuracion en cualquier momento.

            ## Proveedores de LLM

            Nanobot soporta multiples proveedores. Puede cambiar en cualquier momento editando `/root/.nanobot/config.json` en la pestana **Files** y reiniciando el servicio.

            | Proveedor | Obtener clave API | Configuracion `providers` | Ejemplo de Model ID |
            |-----------|------------------|--------------------------|-------------------|
            | Zeabur AI Hub | [zeabur.com/ai-hub](https://zeabur.com/ai-hub) | `"openai": {"api_key":"...","api_base":"https://hnd1.aihub.zeabur.ai/v1"}` | `openai/claude-sonnet-4-5` |
            | OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) | `"openrouter": {"api_key":"sk-or-..."}` | `openrouter/anthropic/claude-sonnet-4` |
            | Anthropic | [console.anthropic.com](https://console.anthropic.com/) | `"anthropic": {"api_key":"sk-ant-..."}` | `anthropic/claude-sonnet-4-5` |
            | OpenAI | [platform.openai.com](https://platform.openai.com/api-keys) | `"openai": {"api_key":"sk-..."}` | `openai/gpt-4o` |
            | DeepSeek | [platform.deepseek.com](https://platform.deepseek.com/) | `"deepseek": {"api_key":"..."}` | `deepseek/deepseek-chat` |

            **Para cambiar de proveedor:**
            1. Abra `/root/.nanobot/config.json` en la pestana **Files**
            2. Agregue o modifique la configuracion del proveedor en `"providers"`
            3. Cambie `"agents" > "defaults" > "model"` al nuevo Model ID
            4. **Reinicie el servicio** para aplicar los cambios

            ## Plataformas de Chat

            Soportadas: Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ y correo electronico. Consulte la [documentacion oficial](https://github.com/HKUDS/nanobot#-chat-apps) para guias completas de configuracion.

            **Configuracion de Telegram:**
            1. Busque `@BotFather` en Telegram y envie `/newbot`
            2. Siga las instrucciones para configurar el nombre y username del bot
            3. Copie el token del bot que reciba
            4. Ingreselo durante el despliegue o agreguelo al config despues

            Si ingreso el token del bot durante el despliegue, ya esta activo. De lo contrario, agregue en config:

            ```json
            "channels": {
              "telegram": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **Otras plataformas** — agregue el canal correspondiente en config y reinicie:

            ```json
            "channels": {
              "discord": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **`allow_from`** — controla quien puede hablar con el bot. Lista vacia `[]` = cualquiera puede usarlo. Para restringir acceso, agregue IDs de usuario (en Telegram, envie un mensaje a `@userinfobot` para obtener su ID):

            ```json
            "allow_from": ["123456789", "987654321"]
            ```

            Reinicie el servicio despues de cambios en la configuracion.

            ## Persistencia de Datos

            Todos los datos se almacenan en `/root/.nanobot` (montado como volumen persistente).

            Se recomienda usar la [funcion de respaldo de Zeabur](https://zeabur.com/docs/manage/backup) para respaldar sus datos regularmente.

            **Mas informacion:** Consulte la [documentacion oficial](https://github.com/HKUDS/nanobot).
    id-ID:
        description: |
            Nanobot adalah asisten AI pribadi yang sangat ringan (~4K baris kode inti) yang mendukung berbagai penyedia LLM dan platform chat termasuk Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ, dan Email.
        variables:
            - key: ZEABUR_AI_HUB_API_KEY
              type: STRING
              name: Kunci API Zeabur AI Hub
              description: Kunci API Zeabur AI Hub untuk akses multi-model (dapatkan di zeabur.com). Direkomendasikan untuk pengguna Zeabur. Kosongkan untuk menggunakan penyedia lain.
            - key: TELEGRAM_BOT_TOKEN
              type: STRING
              name: Token Bot Telegram
              description: Token bot Telegram Anda dari BotFather. Kosongkan untuk mengonfigurasi nanti.
        readme: |
            # Nanobot

            > ⚠️ Template ini memerlukan [Dedicated Server](https://zeabur.com/docs/dedicated-server) di Zeabur dan tidak dapat berjalan di cluster bersama.

            **Sumber daya yang direkomendasikan:** 1 vCPU / 2 GB RAM (minimum: 0.5 vCPU / 256 MB RAM)

            Nanobot adalah framework asisten AI pribadi yang sangat ringan (~4K baris kode agen inti) dari [HKUDS](https://github.com/HKUDS/nanobot). Mendukung berbagai penyedia LLM dan terhubung ke berbagai platform pesan melalui arsitektur Gateway terpadu.

            **Dokumentasi resmi:** [github.com/HKUDS/nanobot](https://github.com/HKUDS/nanobot)

            ## Platform Chat yang Didukung

            Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ, dan Email.

            ## Mulai Cepat

            1. Setelah deploy, gateway Nanobot akan dimulai secara otomatis
            2. Jika Anda memasukkan kunci API saat deploy (Zeabur AI Hub atau OpenRouter), model chat sudah dikonfigurasi
            3. Jika Anda memasukkan token bot Telegram, bot sudah siap — kirim pesan untuk mulai
            4. Untuk menambah platform atau mengubah pengaturan, edit `/root/.nanobot/config.json` di tab **Files**

            **Melewatkan kolom saat deploy?** Anda dapat menambahkannya nanti dengan mengedit `/root/.nanobot/config.json` di tab **Files**, atau menambahkan variabel lingkungan yang sesuai di dashboard Zeabur dan me-restart layanan.

            **Model default:** Dengan Zeabur AI Hub defaultnya `openai/claude-sonnet-4-5`, dengan OpenRouter defaultnya `openrouter/anthropic/claude-sonnet-4`. Dapat diubah di file konfigurasi kapan saja.

            ## Penyedia LLM

            Nanobot mendukung berbagai penyedia. Anda dapat beralih kapan saja dengan mengedit `/root/.nanobot/config.json` di tab **Files** dan me-restart layanan.

            | Penyedia | Dapatkan kunci API | Konfigurasi `providers` | Contoh Model ID |
            |----------|-------------------|------------------------|----------------|
            | Zeabur AI Hub | [zeabur.com/ai-hub](https://zeabur.com/ai-hub) | `"openai": {"api_key":"...","api_base":"https://hnd1.aihub.zeabur.ai/v1"}` | `openai/claude-sonnet-4-5` |
            | OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) | `"openrouter": {"api_key":"sk-or-..."}` | `openrouter/anthropic/claude-sonnet-4` |
            | Anthropic | [console.anthropic.com](https://console.anthropic.com/) | `"anthropic": {"api_key":"sk-ant-..."}` | `anthropic/claude-sonnet-4-5` |
            | OpenAI | [platform.openai.com](https://platform.openai.com/api-keys) | `"openai": {"api_key":"sk-..."}` | `openai/gpt-4o` |
            | DeepSeek | [platform.deepseek.com](https://platform.deepseek.com/) | `"deepseek": {"api_key":"..."}` | `deepseek/deepseek-chat` |

            **Cara beralih penyedia:**
            1. Buka `/root/.nanobot/config.json` di tab **Files**
            2. Tambahkan atau ubah konfigurasi penyedia di `"providers"`
            3. Ubah `"agents" > "defaults" > "model"` ke Model ID baru
            4. **Restart layanan** agar perubahan diterapkan

            ## Platform Chat

            Didukung: Telegram, Discord, WhatsApp, Slack, DingTalk, Feishu, QQ, dan Email. Lihat [dokumentasi resmi](https://github.com/HKUDS/nanobot#-chat-apps) untuk panduan konfigurasi lengkap.

            **Pengaturan Telegram:**
            1. Cari `@BotFather` di Telegram dan kirim `/newbot`
            2. Ikuti petunjuk untuk mengatur nama dan username bot
            3. Salin token bot yang Anda terima
            4. Masukkan saat deploy atau tambahkan ke config nanti

            Jika Anda memasukkan token bot saat deploy, sudah aktif otomatis. Jika tidak, tambahkan di config:

            ```json
            "channels": {
              "telegram": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **Platform lain** — tambahkan channel yang sesuai di config dan restart:

            ```json
            "channels": {
              "discord": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **`allow_from`** — mengontrol siapa yang dapat berbicara dengan bot. Daftar kosong `[]` = siapa saja bisa menggunakan. Untuk membatasi akses, tambahkan ID pengguna (di Telegram, kirim pesan ke `@userinfobot` untuk mengetahui ID Anda):

            ```json
            "allow_from": ["123456789", "987654321"]
            ```

            Restart layanan setelah perubahan konfigurasi.

            ## Persistensi Data

            Semua data disimpan di `/root/.nanobot` (dipasang sebagai volume persisten).

            Disarankan untuk menggunakan [fitur backup Zeabur](https://zeabur.com/docs/manage/backup) untuk mencadangkan data Anda secara berkala.

            **Info lebih lanjut:** Lihat [dokumentasi resmi](https://github.com/HKUDS/nanobot).
    ja-JP:
        description: |
            Nanobot は超軽量パーソナル AI アシスタント（コアコード約4K行）で、複数の LLM プロバイダーと Telegram、Discord、WhatsApp、Slack、DingTalk、Feishu、QQ、メールなどのチャットプラットフォームをサポートしています。
        variables:
            - key: ZEABUR_AI_HUB_API_KEY
              type: STRING
              name: Zeabur AI Hub API キー
              description: Zeabur AI Hub API キー（zeabur.com で取得）。Zeabur ユーザーにおすすめ。空欄の場合は他のプロバイダーを使用できます。
            - key: TELEGRAM_BOT_TOKEN
              type: STRING
              name: Telegram Bot トークン
              description: BotFather から取得した Telegram ボットトークン。後で設定する場合は空欄にしてください。
        readme: |
            # Nanobot

            > ⚠️ このテンプレートは Zeabur の[専用サーバー](https://zeabur.com/docs/dedicated-server)が必要です。共有クラスターでは実行できません。

            **推奨リソース：** 1 vCPU / 2 GB RAM（最小：0.5 vCPU / 256 MB RAM）

            Nanobot は [HKUDS](https://github.com/HKUDS/nanobot) による超軽量パーソナル AI アシスタントフレームワーク（コアエージェントコード約4K行）です。複数の LLM プロバイダーをサポートし、統一された Gateway アーキテクチャを通じて様々なメッセージングプラットフォームに接続します。

            **公式ドキュメント：** [github.com/HKUDS/nanobot](https://github.com/HKUDS/nanobot)

            ## サポートされるチャットプラットフォーム

            Telegram、Discord、WhatsApp、Slack、DingTalk、Feishu、QQ、メール。

            ## クイックスタート

            1. デプロイ後、Nanobot ゲートウェイが自動的に起動します
            2. デプロイ時に API キー（Zeabur AI Hub または OpenRouter）を入力した場合、チャットモデルは自動設定済みです
            3. Telegram ボットトークンを入力した場合、ボットは準備完了 — メッセージを送信して会話を開始
            4. プラットフォームの追加や設定変更は **Files** タブから `/root/.nanobot/config.json` を編集

            **デプロイ時に入力をスキップした場合：** **Files** タブから `/root/.nanobot/config.json` を編集するか、Zeabur ダッシュボードで対応する環境変数を追加してサービスを再起動してください。

            **デフォルトモデル：** Zeabur AI Hub 使用時は `openai/claude-sonnet-4-5`、OpenRouter 使用時は `openrouter/anthropic/claude-sonnet-4`。設定ファイルでいつでも変更できます。

            ## LLM プロバイダー

            Nanobot は複数のプロバイダーをサポートしています。**Files** タブから `/root/.nanobot/config.json` を編集し、サービスを再起動することでいつでも切り替えできます。

            | プロバイダー | API キー取得先 | `providers` 設定 | モデル ID 例 |
            |------------|--------------|-----------------|-------------|
            | Zeabur AI Hub | [zeabur.com/ai-hub](https://zeabur.com/ai-hub) | `"openai": {"api_key":"...","api_base":"https://hnd1.aihub.zeabur.ai/v1"}` | `openai/claude-sonnet-4-5` |
            | OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) | `"openrouter": {"api_key":"sk-or-..."}` | `openrouter/anthropic/claude-sonnet-4` |
            | Anthropic | [console.anthropic.com](https://console.anthropic.com/) | `"anthropic": {"api_key":"sk-ant-..."}` | `anthropic/claude-sonnet-4-5` |
            | OpenAI | [platform.openai.com](https://platform.openai.com/api-keys) | `"openai": {"api_key":"sk-..."}` | `openai/gpt-4o` |
            | DeepSeek | [platform.deepseek.com](https://platform.deepseek.com/) | `"deepseek": {"api_key":"..."}` | `deepseek/deepseek-chat` |

            **プロバイダー切り替え手順：**
            1. **Files** タブで `/root/.nanobot/config.json` を開く
            2. `"providers"` にプロバイダー設定を追加または変更
            3. `"agents" > "defaults" > "model"` を新しいモデル ID に変更
            4. **サービスを再起動**して変更を反映

            ## チャットプラットフォーム

            対応：Telegram、Discord、WhatsApp、Slack、DingTalk、Feishu、QQ、メール。設定方法の詳細は[公式ドキュメント](https://github.com/HKUDS/nanobot#-chat-apps)をご覧ください。

            **Telegram セットアップ手順：**
            1. Telegram で `@BotFather` を検索し `/newbot` を送信
            2. プロンプトに従ってボット名とユーザー名を設定
            3. 取得したボットトークンをコピー
            4. デプロイ時に入力するか、後で設定ファイルに追加

            デプロイ時にボットトークンを入力した場合、自動的に有効化済みです。そうでない場合は設定ファイルに追加：

            ```json
            "channels": {
              "telegram": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **その他のプラットフォーム** — 設定ファイルにチャネルを追加して再起動：

            ```json
            "channels": {
              "discord": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **`allow_from`** — ボットと会話できるユーザーを制御。空リスト `[]` = 誰でも利用可能。アクセスを制限するにはユーザー ID を追加（Telegram では `@userinfobot` にメッセージを送信して自分の ID を確認）：

            ```json
            "allow_from": ["123456789", "987654321"]
            ```

            設定変更後はサービスの再起動が必要です。

            ## データの永続化

            すべてのデータは `/root/.nanobot`（永続ボリュームとしてマウント）に保存されます。

            [Zeabur のバックアップ機能](https://zeabur.com/docs/manage/backup)を使用して定期的にデータをバックアップすることをお勧めします。

            **詳細：** [公式ドキュメント](https://github.com/HKUDS/nanobot)をご覧ください。
    zh-CN:
        description: |
            Nanobot 是一个超轻量级个人 AI 助手（约 4K 行核心代码），支持多种 LLM 供应商和聊天平台，包括 Telegram、Discord、WhatsApp、Slack、钉钉、飞书、QQ 和电子邮件。
        variables:
            - key: ZEABUR_AI_HUB_API_KEY
              type: STRING
              name: Zeabur AI Hub API 密钥
              description: Zeabur AI Hub API 密钥，用于多模型访问（在 zeabur.com 获取）。推荐 Zeabur 用户使用。留空可使用其他供应商。
            - key: TELEGRAM_BOT_TOKEN
              type: STRING
              name: Telegram Bot Token
              description: 您的 Telegram 机器人 Token（从 @BotFather 获取）。留空可稍后设置。
        readme: |
            # Nanobot

            > ⚠️ 此模板需要在 Zeabur 上使用[专用服务器](https://zeabur.com/docs/dedicated-server)，无法在共享集群上运行。

            **建议资源：** 1 vCPU / 2 GB RAM（最低：0.5 vCPU / 256 MB RAM）

            Nanobot 是来自 [HKUDS](https://github.com/HKUDS/nanobot) 的超轻量级个人 AI 助手框架（约 4K 行核心代理代码）。支持多种 LLM 供应商，并通过统一的 Gateway 架构连接各种消息平台。

            **官方文档：** [github.com/HKUDS/nanobot](https://github.com/HKUDS/nanobot)

            ## 支持的聊天平台

            Telegram、Discord、WhatsApp、Slack、钉钉、飞书、QQ 和电子邮件。

            ## 快速开始

            1. 部署后，Nanobot 网关将自动启动
            2. 如果您在部署时输入了 API 密钥（Zeabur AI Hub 或 OpenRouter），聊天模型已自动配置
            3. 如果您输入了 Telegram bot token，机器人已就绪 — 直接发消息即可开始对话
            4. 如需添加更多平台或修改设置，通过**文件**标签编辑 `/root/.nanobot/config.json`

            **部署时跳过了某个字段？** 可以事后通过**文件**标签编辑 `/root/.nanobot/config.json`，或在 Zeabur 控制台添加对应的环境变量并重启服务。

            **默认模型：** 使用 Zeabur AI Hub 时默认为 `openai/claude-sonnet-4-5`，使用 OpenRouter 时默认为 `openrouter/anthropic/claude-sonnet-4`。可随时在配置文件中修改。

            ## LLM 供应商

            Nanobot 支持多种供应商，您可以随时通过**文件**标签编辑 `/root/.nanobot/config.json` 并重启服务来切换。

            | 供应商 | 获取 API 密钥 | `providers` 配置 | 模型 ID 示例 |
            |--------|-------------|-----------------|-------------|
            | Zeabur AI Hub | [zeabur.com/ai-hub](https://zeabur.com/ai-hub) | `"openai": {"api_key":"...","api_base":"https://hnd1.aihub.zeabur.ai/v1"}` | `openai/claude-sonnet-4-5` |
            | OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) | `"openrouter": {"api_key":"sk-or-..."}` | `openrouter/anthropic/claude-sonnet-4` |
            | Anthropic | [console.anthropic.com](https://console.anthropic.com/) | `"anthropic": {"api_key":"sk-ant-..."}` | `anthropic/claude-sonnet-4-5` |
            | OpenAI | [platform.openai.com](https://platform.openai.com/api-keys) | `"openai": {"api_key":"sk-..."}` | `openai/gpt-4o` |
            | DeepSeek | [platform.deepseek.com](https://platform.deepseek.com/) | `"deepseek": {"api_key":"..."}` | `deepseek/deepseek-chat` |

            **切换供应商步骤：**
            1. 在**文件**标签打开 `/root/.nanobot/config.json`
            2. 在 `"providers"` 中添加或修改供应商配置
            3. 将 `"agents" > "defaults" > "model"` 改为新的模型 ID
            4. **重启服务**使更改生效

            ## 聊天平台

            支持：Telegram、Discord、WhatsApp、Slack、钉钉、飞书、QQ 和电子邮件。完整的配置方式请参考[官方文档](https://github.com/HKUDS/nanobot#-chat-apps)。

            **Telegram 设置步骤：**
            1. 在 Telegram 搜索 `@BotFather` 并发送 `/newbot`
            2. 按照提示设置 bot 名称和 username
            3. 复制获得的 bot token
            4. 在部署时填入，或之后添加到配置文件

            如果您在部署时输入了 bot token，已自动启用。否则在配置文件中添加：

            ```json
            "channels": {
              "telegram": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **其他平台** — 在配置文件中添加对应的频道并重启：

            ```json
            "channels": {
              "discord": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **`allow_from`** — 控制谁可以与机器人对话。空列表 `[]` = 任何人都可使用。如需限制访问，添加用户 ID（Telegram 用户可向 `@userinfobot` 发消息查询自己的 ID）：

            ```json
            "allow_from": ["123456789", "987654321"]
            ```

            修改配置后需重启服务。

            ## 数据持久化

            所有数据存储在 `/root/.nanobot`（挂载为持久卷）。

            建议使用 [Zeabur 的备份功能](https://zeabur.com/docs/manage/backup)定期备份您的数据。

            **更多说明：** 请参考[官方文档](https://github.com/HKUDS/nanobot)。
    zh-TW:
        description: |
            Nanobot 是一個超輕量級個人 AI 助手（約 4K 行核心程式碼），支援多種 LLM 供應商和聊天平台，包括 Telegram、Discord、WhatsApp、Slack、釘釘、飛書、QQ 和電子郵件。
        variables:
            - key: ZEABUR_AI_HUB_API_KEY
              type: STRING
              name: Zeabur AI Hub API 金鑰
              description: Zeabur AI Hub API 金鑰，用於多模型存取（在 zeabur.com 取得）。推薦 Zeabur 用戶使用。留空可使用其他供應商。
            - key: TELEGRAM_BOT_TOKEN
              type: STRING
              name: Telegram Bot Token
              description: 您的 Telegram 機器人 Token（從 @BotFather 取得）。留空可稍後設定。
        readme: |
            # Nanobot

            > ⚠️ 此模板需要在 Zeabur 上使用[專用伺服器](https://zeabur.com/docs/dedicated-server)，無法在共享叢集上運行。

            **建議資源：** 1 vCPU / 2 GB RAM（最低：0.5 vCPU / 256 MB RAM）

            Nanobot 是來自 [HKUDS](https://github.com/HKUDS/nanobot) 的超輕量級個人 AI 助手框架（約 4K 行核心代理程式碼）。支援多種 LLM 供應商，並透過統一的 Gateway 架構連接各種訊息平台。

            **官方文件：** [github.com/HKUDS/nanobot](https://github.com/HKUDS/nanobot)

            ## 支援的聊天平台

            Telegram、Discord、WhatsApp、Slack、釘釘、飛書、QQ 和電子郵件。

            ## 快速開始

            1. 部署後，Nanobot 閘道將自動啟動
            2. 如果您在部署時輸入了 API 金鑰（Zeabur AI Hub 或 OpenRouter），聊天模型已自動設定
            3. 如果您輸入了 Telegram bot token，機器人已就緒 — 直接發訊息即可開始對話
            4. 如需新增更多平台或修改設定，透過**檔案**標籤編輯 `/root/.nanobot/config.json`

            **部署時跳過了某個欄位？** 可以事後透過**檔案**標籤編輯 `/root/.nanobot/config.json`，或在 Zeabur 控制台新增對應的環境變數並重啟服務。

            **預設模型：** 使用 Zeabur AI Hub 時預設為 `openai/claude-sonnet-4-5`，使用 OpenRouter 時預設為 `openrouter/anthropic/claude-sonnet-4`。可隨時在設定檔中修改。

            ## LLM 供應商

            Nanobot 支援多種供應商，您可以隨時透過**檔案**標籤編輯 `/root/.nanobot/config.json` 並重啟服務來切換。

            | 供應商 | 取得 API 金鑰 | `providers` 設定 | 模型 ID 範例 |
            |--------|-------------|-----------------|-------------|
            | Zeabur AI Hub | [zeabur.com/ai-hub](https://zeabur.com/ai-hub) | `"openai": {"api_key":"...","api_base":"https://hnd1.aihub.zeabur.ai/v1"}` | `openai/claude-sonnet-4-5` |
            | OpenRouter | [openrouter.ai/keys](https://openrouter.ai/keys) | `"openrouter": {"api_key":"sk-or-..."}` | `openrouter/anthropic/claude-sonnet-4` |
            | Anthropic | [console.anthropic.com](https://console.anthropic.com/) | `"anthropic": {"api_key":"sk-ant-..."}` | `anthropic/claude-sonnet-4-5` |
            | OpenAI | [platform.openai.com](https://platform.openai.com/api-keys) | `"openai": {"api_key":"sk-..."}` | `openai/gpt-4o` |
            | DeepSeek | [platform.deepseek.com](https://platform.deepseek.com/) | `"deepseek": {"api_key":"..."}` | `deepseek/deepseek-chat` |

            **切換供應商步驟：**
            1. 在**檔案**標籤開啟 `/root/.nanobot/config.json`
            2. 在 `"providers"` 中新增或修改供應商設定
            3. 將 `"agents" > "defaults" > "model"` 改為新的模型 ID
            4. **重啟服務**使變更生效

            ## 聊天平台

            支援：Telegram、Discord、WhatsApp、Slack、釘釘、飛書、QQ 和電子郵件。完整的設定方式請參考[官方文件](https://github.com/HKUDS/nanobot#-chat-apps)。

            **Telegram 設定步驟：**
            1. 在 Telegram 搜尋 `@BotFather` 並發送 `/newbot`
            2. 依照提示設定 bot 名稱和 username
            3. 複製取得的 bot token
            4. 在部署時填入，或事後加到設定檔

            如果您在部署時輸入了 bot token，已自動啟用。否則在設定檔中新增：

            ```json
            "channels": {
              "telegram": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **其他平台** — 在設定檔中新增對應的頻道並重啟：

            ```json
            "channels": {
              "discord": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
            }
            ```

            **`allow_from`** — 控制誰可以與機器人對話。空清單 `[]` = 任何人都可使用。如需限制存取，加入使用者 ID（Telegram 使用者可傳送訊息給 `@userinfobot` 查詢自己的 ID）：

            ```json
            "allow_from": ["123456789", "987654321"]
            ```

            修改設定後需重啟服務。

            ## 資料持久化

            所有資料儲存在 `/root/.nanobot`（掛載為持久卷）。

            建議使用 [Zeabur 的備份功能](https://zeabur.com/docs/manage/backup)定期備份您的資料。

            **更多說明：** 請參考[官方文件](https://github.com/HKUDS/nanobot)。
