Synopsis

runagent deploy [PATH] [OPTIONS]

Description

The deploy command packages and deploys your agent either locally with persistence or to RunAgent’s cloud infrastructure (coming soon).

Options

OptionDescriptionDefault
--local, -lDeploy locallyfalse
--name, -nDeployment nameFrom config
--env, -eEnvironmentproduction
--no-validateSkip validationfalse
--dry-runShow what would be deployedfalse

Examples

Local Deployment

# Deploy locally
runagent deploy . --local

# Deploy with custom name
runagent deploy . --local --name my-test-agent

# Dry run to see what would happen
runagent deploy . --dry-run

Cloud Deployment (Coming Soon)

# Deploy to cloud
runagent deploy .

# Deploy to staging environment
runagent deploy . --env staging

# Skip validation checks
runagent deploy . --no-validate

Deployment Process

1

Validation

  • Checks runagent.config.json
  • Validates entrypoints
  • Verifies dependencies
2

Packaging

  • Bundles agent code
  • Includes dependencies
  • Excludes unnecessary files
3

Upload

  • Uploads to RunAgent servers
  • Or creates local deployment
4

Initialization

  • Starts agent container
  • Configures environment
  • Runs health checks

Output

Successful deployment shows:

Validating agent configuration... ✓
Packaging agent files... ✓
Uploading to RunAgent... ✓
Initializing deployment... ✓

Deployment successful!
Agent ID: 055b73d7-6239-4a94-a156-1193fcf33ff0
Status: Running
Endpoint: https://api.run-agent.ai/agents/055b73d7

To test your agent:
  runagent run 055b73d7 --input '{"query": "test"}'

Local Deployment Details

Local deployments:

  • Run in Docker containers
  • Persist between restarts
  • Support multiple versions
  • Include local monitoring
# List local deployments
runagent list --local

# View deployment details
runagent status <deployment-id>

Configuration

Deployment Settings

In runagent.config.json:

{
  "deployment": {
    "memory": "512MB",
    "timeout": 30,
    "min_instances": 1,
    "max_instances": 10,
    "environment_variables": {
      "LOG_LEVEL": "INFO"
    }
  }
}

Excluded Files

By default, these are excluded:

  • .git/
  • __pycache__/
  • *.pyc
  • .env
  • tests/
  • docs/

Create .deployignore to customize:

# Custom exclusions
*.log
temp/
scratch.py

Validation Checks

Before deployment, RunAgent validates:

Troubleshooting

Best Practices

  1. Test Locally First: Always use runagent serve before deploying
  2. Use Environments: Deploy to staging before production
  3. Version Your Agents: Update version in config for each deployment
  4. Monitor Deployments: Check logs and metrics after deploying

See Also