# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: AI Copy-Trading Execution Agent
spec:
    description: Per-user execution agent that subscribes to trading signals and executes copy trades on Hyperliquid
    icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/python.svg
    tags:
        - Trading
        - Hyperliquid
        - Bot
    readme: |
        # AI Copy-Trading Execution Agent

        A per-user execution agent that subscribes to trading signals and executes copy trades on Hyperliquid.

        ## Configuration

        Configure these variables after deployment:
        - `AGENT_ID` - Agent UUID from backend
        - `AGENT_TOKEN` - Authentication token from backend
        - `BACKEND_URL` - Backend API URL
        - `REDIS_URL` - Redis connection for signal subscription
        - `PLATFORM_API_KEY` - Internal API key

        ## Default Values

        - `MAX_POSITION_USD`: 100
        - `MAX_LEVERAGE`: 3
        - `ALLOWED_SYMBOLS`: BTC,ETH

        ## License

        MIT License - See https://github.com/uuzor/experimental-cloud
    services:
        - name: execution-agent
          template: PREBUILT_V2
          spec:
            id: execution-agent
            source:
                image: ghcr.io/uuzor/experimental-cloud/execution-agent:latest
                command:
                    - python
                    - -m
                    - executor_agent
            ports:
                - id: api
                  port: 3002
                  type: HTTP
            env:
                AGENT_ID:
                    default: ""
                AGENT_TOKEN:
                    default: ""
                ALLOWED_SYMBOLS:
                    default: BTC,ETH
                BACKEND_URL:
                    default: ""
                LOG_LEVEL:
                    default: info
                MAX_LEVERAGE:
                    default: "3"
                MAX_POSITION_USD:
                    default: "100"
                NODE_ENV:
                    default: production
                PLATFORM_API_KEY:
                    default: ""
                PORT:
                    default: "3002"
                REDIS_URL:
                    default: ""
            healthCheck:
                type: HTTP
                port: api
                http:
                    path: /health
