VM0VM0
Usage

Run Agent

Execute agents with vm0 run command

Use vm0 run to execute your agent.

Usage

vm0 run <agent-name> "<prompt>"

Examples:

# Run latest version
vm0 run my-agent "build a todo app"

# Run specific version
vm0 run my-agent:abc123 "build a todo app"

Options

OptionDescription
--vars <KEY=value>Pass variables for ${{ vars.xxx }}
--secrets <KEY=value>Pass secrets for ${{ secrets.xxx }}
--artifact-name <name>Use persistent artifact storage
--artifact-version <hash>Use specific artifact version
--env-file <path>Load environment variables from file (priority: CLI flags > file > env vars)
--volume-version <name=version>Volume version override (repeatable, format: volumeName=version)
--memory <name>Memory storage name
--conversation <id>Resume from conversation ID (for fine-grained control)
--model-provider <type>Override model provider (e.g., anthropic-api-key)
--verboseShow full tool inputs and outputs
--check-envValidate secrets and vars before running

Passing Variables and Secrets

Recommended: Store on Platform (one-time setup)

vm0 variable set ENV production
vm0 secret set API_KEY --body "sk-xxx"

Then run your agent - values are automatically loaded:

vm0 run my-agent "deploy to production"

Alternative: Pass at Runtime

For CI/CD or temporary overrides, pass values directly:

vm0 run my-agent "deploy to production" \
  --vars ENV=production \
  --secrets API_KEY=sk-xxx

See Environment Variable for more details.

Using Artifacts

vm0 run my-agent "continue the project" --artifact-name my-project

See Artifact for more details.

Continue a Session

After each run, VM0 outputs a Session ID that references the latest conversation and artifact state. Use vm0 run continue to keep working:

vm0 run continue <session-id> "add user authentication"
  • Uses latest conversation history
  • Uses latest artifact version
  • Best for ongoing iterative work

Frequently Asked Questions

On this page