SKILL.md--- name: modal description: Modal is a serverless cloud platform for running Python on demand, including on-demand GPUs. Use when deploying or serving AI/ML models, running GPU-accelerated workloads (training, fine-tuning, inference), serving web endpoints, scheduling batch jobs, or scaling Python code to cloud containers with the Modal SDK. license: Apache-2.0 compatibility: Requires Python 3.10-3.14 and modal 1.6.0. Cloud execution needs a Modal account, authentication and network access; GPU use needs a payment method. Workload dependencies belong in their container Images. metadata: version: "1.5" last-reviewed: "2026-09-30" tested-sdk: "modal 1.6.0" skill-author: K-Dense Inc. openclaw: envVars: - name: MODAL_TOKEN_ID required: false description: Modal token id. - name: MODAL_TOKEN_SECRET required: false description: Modal token secret. --- # Modal ## Overview Modal is a cloud platform for running Python code serverlessly, with a focus on AI/ML workloads. Key capabilities: - **GPU compute** on demand (including H100, H200, B200 and B300) - **Serverless functions** with autoscaling from zero to thousands of containers - **Custom container images** built entirely in Python code - **Persistent storage** via Volumes for model weights and datasets - **Web endpoints** for serving models and APIs - **Scheduled jobs** via cron or fixed intervals - **Container reuse** and warm pools to reduce cold starts (model loading still takes time) Modal Apps and Images are defined in Python; existing Dockerfiles are also supported. ## When to Use This Skill Use this skill when: - Deploy or serve AI/ML models in the cloud - Run GPU-accelerated computations (training, inference, fine-tuning) - Create serverless web APIs or endpoints - Scale batch processing jobs in parallel - Schedule recurring tasks (data pipelines, retraining, scraping) - Need persistent cloud storage for model weights or datasets - Want to run code in custom container environments - Build job queues or async task processing systems ## Installation and Authentication ### Install ```bash uv pip install "modal==1.6.0" ``` Reviewed against SDK 1.6.0 and current [release notes](https://modal.com/docs/sdk/py/releases). Local SDK construction and selected handlers were tested; remote builds, deployments, GPU inference and cloud limits were not executed. Snippets using model/data placeholders or third-party workloads are illustrative and require their stated dependencies. ### Authenticate Prefer existing credentials before creating new ones. Only the two Modal-specific variables below are relevant — do not read, load, or expose any other environment variables or `.env` file contents: 1. Reuse an existing Modal profile, or check whether both `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET` are set; report presence only. 2. If not, look up only those two keys in a local `.env` file (ignore all other entries) and