Your config file (config.yaml) is the single source of truth for deployment. It tells the CLI where your code is, how to build it, and how to deploy it.
Copy
agent: name: my-namespace/my-agent # Must be in namespace/agent-name description: My first agent sdk_type: claude_agent_sdk temporal: enabled: false
Build Configuration
Copy
build: context: root: ./ # Root directory for Docker build include_paths: . # Paths to include in build context dockerfile: Dockerfile # Path to Dockerfile (relative to root) dockerignore: .dockerignore # Optional: path to .dockerignore
Deployment Configuration
Copy
deployment: production: replicaCount: 1 resources: requests: cpu: "500m" memory: "6Gi" limits: cpu: "1000m" memory: "6Gi" areTasksSticky: true # Tasks stay on old version during deploy preview: replicaCount: 1 resources: requests: cpu: "250m" memory: "2Gi" limits: cpu: "500m" memory: "2Gi" areTasksSticky: false # Tasks migrate to new version immediately
When you deploy a new version, what happens to running tasks?
Setting
Behavior
areTasksSticky: true (production default)
Running tasks stay on old version until complete
areTasksSticky: false (preview default)
Running tasks migrate to new version immediately
In production, if your new version doesn’t have a breaking change, you’ll want to migrate your tasks to your latest version. You can do this with tu tasks migrate --from <version_id> --to latest.
# List all environment variablestu env ls# Add a variable (interactive prompts for value and environment)tu env add DATABASE_URL# Mark env var as secret (cannot be retrieved later)tu env add API_KEY -v "sk-xxx" -e prod --secret# Remove a variabletu env rm API_KEY --environment all
Import multiple variables at once from a .env file:
Copy
# Import to .env to all environmentstu env import .env -e all# Mark specific keys as secretstu env import .env -e prod --secret API_KEY --secret DB_PASSWORD
Additional room to process concurent tasks on one replica
CPU units: 1 = 1 full core, 500m = 0.5 cores. Memory units: 1Gi = 1 gibibyte.
Replicas scale up as memory or CPU limits are reached. We recommend having a minimum of 6Gi on one replica in production to handle multiple concurrent requests as more replicas scale up.
If something goes wrong with a deployment, you can rollback to the previous version:
Copy
tu rollback
This shows recent versions and prompts you to confirm:
Version ID
Git Hash
Status
Deployed
e77b7dc1
f8c3a91
current
3 mins ago
c2bad41e
27da232
retired
1 hour ago
Copy
Rollback summary: From: e77b7dc1 → To: c2bad41e Git: f8c3a91 → 27da232Note: Pending secrets will NOT be modified. The rollback uses the secrets snapshot from the target version.? Rollback 'production' to version c2bad41e? Yes✓ Rollback initiated for 'production' From: e77b7dc1 (f8c3a91) To: c2bad41e (27da232)
Rollbacks use the secrets snapshot from the target version. Pending secret changes are not applied.