Skip to main content

Daita Push

Deploy your Daita agents and workflows to the cloud. The push command packages your project, validates configuration, and deploys to production infrastructure.

Usage

daita push [options]

Note: This command requires DAITA_API_KEY to be set in your environment.

Examples

Basic Deployment

# Deploy to production
daita push

# Preview deployment without executing
daita push --dry-run

# Force deployment without confirmation
daita push --force

Advanced Deployment Options

# Deploy with verbose output for debugging
daita push --verbose

# Dry run to preview changes without deploying
daita push --dry-run

# Force deployment (skip confirmation prompts)
daita push --force

Options

OptionDescriptionExample
--dry-runPreview deployment without executing--dry-run
--forceSkip confirmation prompts--force
--verboseEnable detailed output--verbose

Deployment Process

1. Pre-Deployment Validation

Before deployment, the CLI validates:

  • Project structure - Required files and directories exist
  • Configuration syntax - YAML configuration is valid
  • Agent definitions - All agents are properly defined
  • Dependencies - Required packages are specified
  • API authentication - DAITA_API_KEY is set
# Check what will be deployed
daita push --dry-run --verbose

2. Package Creation and Upload

The CLI packages your project:

  • Compresses source code (agents/, workflows/, daita-project.yaml)
  • Excludes files in .gitignore
  • Uploads package to S3 storage
  • Registers deployment with API

3. Cloud Deployment

In the cloud infrastructure:

  • Package is registered with deployment system
  • Agents and workflows become available for execution
  • Webhooks are activated if configured
  • Schedules are created if configured

4. Post-Deployment

After deployment:

  • Deployment ID is returned
  • Agents/workflows can be executed with daita run
  • Webhooks can receive external triggers
  • Scheduled tasks run automatically

Deployment Examples

Basic Workflow

# Test locally first
daita test

# Preview deployment
daita push --dry-run

# Deploy to production
daita push

# Monitor deployment
daita logs --follow

# Test deployed agent
daita run my_agent --data test_data.json

Deployment with Webhooks

# Deploy with webhook configuration
daita push

# List webhook URLs
daita webhook list

# Test webhook
curl -X POST https://api.daita-tech.io/api/v1/webhooks/trigger/{org_id}/{webhook_slug} \
-H "Content-Type: application/json" \
-d '{"repository": {"name": "my-repo"}}'

Deployment Management

View Deployment History

# List all deployments
daita deployments list

# Show detailed deployment info
daita deployments show <deployment-id>

# Download deployment package
daita deployments download <deployment-id>

Deployment Rollback

# Rollback to previous deployment
daita deployments rollback <deployment-id>

# Delete a deployment
daita deployments delete <deployment-id> --force

Configuration for Deployment

Project Configuration

Your daita-project.yaml controls what gets deployed:

name: my-project
version: 1.0.0

agents:
- name: data_processor
display_name: "Data Processor"
enable_retry: true
retry_policy:
max_retries: 3
strategy: exponential

workflows:
- name: data_pipeline
display_name: "Data Pipeline"

Webhook Configuration

Configure webhooks in daita-project.yaml:

agents:
- name: github_agent
webhooks:
- slug: "github-push"
field_mapping:
"repository.name": "repo_name"
"commits[0].message": "commit_message"

Schedule Configuration

Configure cron schedules in daita-project.yaml:

schedules:
agents:
data_processor:
cron: "0 */6 * * *" # Every 6 hours
enabled: true
timezone: "UTC"

Error Handling and Troubleshooting

Common Errors

Missing API Key:

❌ DAITA_API_KEY not set
Get your API key at daita-tech.io

# Set your API key
export DAITA_API_KEY="your-api-key"
daita push

Configuration validation failed:

❌ Error: Invalid configuration in daita-project.yaml
Check your YAML syntax

# Fix configuration and retry
nano daita-project.yaml
daita push --dry-run # Preview first
daita push

Deployment failed:

❌ Deployment failed: Package upload error

# Check verbose output
daita push --verbose

# Check network and API key
curl -H "Authorization: Bearer $DAITA_API_KEY" \
https://api.daita-tech.io/health

Debugging Deployment Issues

# Use dry-run to preview
daita push --dry-run --verbose

# Monitor deployment in real-time
daita push
daita logs --follow

Deployment Recovery

# Check deployment status
daita status --verbose

# List recent deployments
daita deployments list

# Rollback if necessary
daita deployments rollback <deployment-id>

Post-Deployment Verification

Verify Deployment

# Check deployment status
daita status

# View recent logs
daita logs --lines 50

# Test deployed agent
daita run my_agent --data test_input.json

# View execution history
daita executions --limit 10

# List webhooks (if configured)
daita webhook list

Best Practices

Before Deploying

# 1. Test locally first
daita test

# 2. Preview deployment
daita push --dry-run

# 3. Check configuration
cat daita-project.yaml

During Deployment

# Use verbose for first-time deployments
daita push --verbose

# Monitor logs
daita logs --follow

After Deployment

# Verify status
daita status

# Test execution
daita run my_agent --data test.json

# Save deployment ID
daita deployments list

Next Steps

After successful deployment:

  1. Monitor Logs - View deployment logs and execution history
  2. Check Status - Verify deployment status
  3. Configuration Guide - Learn about webhooks and schedules
  4. CLI Reference - Complete CLI command reference