Loading...
Loading...
VM0 CLI for building and running AI agents in secure sandboxes. Use this skill when users need to install vm0, create agent projects, deploy agents, run agents, manage volumes/artifacts.
npx skill4agent add vm0-ai/vm0-skills vm0-cliOfficial docs: https://docs.vm0.ai
npm install -g @vm0/clivm0 --versionvm0 auth loginvm0 auth statusvm0 auth setup-tokenexport VM0_TOKEN=vm0_live_your-api-keyvm0 initvm0.yamlvm0 init --name my-agentvm0.yamlversion: "1.0"
agents:
my-agent:
framework: claude-code
instructions: AGENTS.md
skills:
- https://github.com/vm0-ai/vm0-skills/tree/main/github
environment:
DEBUG: "${{ vars.DEBUG }}"
API_KEY: "${{ secrets.API_KEY }}"vm0 compose vm0.yaml-yvm0 compose vm0.yaml -yvm0 run my-agent "Please analyze the codebase and suggest improvements"cookvm0.yamlvm0 cook "Analyze the code"vm0 run my-agent "Your prompt here"vm0 run my-agent "Process data" --vars DEBUG=true --secrets API_KEY=xxxvm0 run my-agent "Process data" --env-file=.env.localKEY=value${{ secrets.* }}vm0.yaml.env.localGH_TOKEN=github_pat_xxx
API_KEY=sk-xxx
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxxvm0 run my-agent "Generate report" --artifact-name my-outputvm0 run my-agent "Process files" --volume-version input-data=latestvm0 run my-agent "Hello" -vvm0 run resume <checkpoint-id> "Continue the task"vm0 run continue <session-id> "Next step"vm0.yamlvm0 cook "Your prompt"vm0 cook -y "Your prompt"vm0 cook --env-file=.env.local "Your prompt"-yvm0 cook -y --env-file=.env.local "Your prompt"vm0 cook continue "Follow up"vm0 cook resume "Continue"vm0 cook logsvm0 logs <run-id>vm0 logs <run-id> --systemvm0 logs <run-id> --metricsvm0 logs <run-id> --networkvm0 logs <run-id> --since 5m
vm0 logs <run-id> --since 2h
vm0 logs <run-id> --since 2024-01-15T10:30:00Zvm0 logs <run-id> --tail 20cd my-data-directory
vm0 volume initcd my-data-directory
vm0 volume init --name my-datavm0 volume pushvm0 volume pullvm0 volume pull abc123devm0 volume statusvm0 volume listvm0 volume clone my-volume ./local-dircd my-output-directory
vm0 artifact initcd my-output-directory
vm0 artifact init --name my-outputvm0 artifact pushvm0 artifact pullvm0 artifact pull abc123devm0 artifact statusvm0 artifact listvm0 artifact clone my-artifact ./local-dirvm0 agent listvm0 agent list --verbosevm0 agent inspect my-agentvm0 agent inspect my-agent:abc123vm0 agent clone my-agentvm0 agent clone my-agent ./my-projectvm0.yamlAGENTS.md${{ secrets.X }}vm0 usagevm0 usage --since 7d
vm0 usage --since 30d
vm0 usage --since 2024-01-01 --until 2024-01-31| Type | Description |
|---|---|
| Anthropic API key (Claude models) |
| OpenRouter API with auto model routing |
| Moonshot AI (Kimi) API key |
| MiniMax API key |
vm0 model-provider listvm0 model-provider setupvm0 model-provider setup --type anthropic-api-key --credential "sk-ant-xxx"vm0 model-provider set-default anthropic-api-keyvm0 model-provider delete anthropic-api-keyvm0 model-provider setup --type openrouter-api-key --credential "sk-or-xxx"vm0 model-provider setup --type openrouter-api-key --credential "sk-or-xxx" --model anthropic/claude-sonnet-4.5${{ secrets.NAME }}vm0 secret listvm0 secret set MY_API_KEYvm0 secret set MY_API_KEY --body "sk-xxx-secret-value"vm0 secret set MY_API_KEY --body "sk-xxx" --description "OpenAI API key for summarization"vm0 secret delete MY_API_KEYvm0 secret delete MY_API_KEY -y${{ vars.NAME }}vm0 variable listvm0 variable set DEBUG truevm0 variable set ENV_NAME production --description "Target environment"vm0 variable delete DEBUGvm0 variable delete ENV_NAME -yversion: "1.0"
agents:
agent-name:
framework: claude-code
instructions: AGENTS.md
skills:
- https://github.com/vm0-ai/vm0-skills/tree/main/github
- https://github.com/vm0-ai/vm0-skills/tree/main/slack
environment:
VAR_NAME: "value"
SECRET_VAR: "${{ secrets.SECRET_NAME }}"
CONFIG_VAR: "${{ vars.CONFIG_NAME }}"| Field | Description |
|---|---|
| Configuration version (currently "1.0") |
| Map of agent definitions |
| Agent framework (e.g., |
| Path to instructions file |
| List of skill URLs to include |
| Environment variables for the agent |
${{ secrets.NAME }}${{ vars.NAME }}vm0 infoprocess.stdout.isTTY === falseVM0_TOKENexport VM0_TOKEN=vm0_live_your-api-key| Command | Non-Interactive Flags | Notes |
|---|---|---|
| | Required in non-TTY |
| | Skip new secrets confirmation |
| | Load environment variables from file |
| | Skip prompts; load env vars from file |
| | Required in non-TTY |
| | Required in non-TTY |
| | All required; |
| | Skip deletion confirmation |
| | Required in non-TTY |
| | Skip confirmation |
| | Skip confirmation |
| | Both required together |
# Set authentication
export VM0_TOKEN=${{ secrets.VM0_TOKEN }}
# Initialize project (non-interactive)
vm0 init --name my-agent --force
# Initialize storage (non-interactive)
cd input-data && vm0 volume init --name input-data && cd ..
cd artifact && vm0 artifact init --name artifact && cd ..
# Deploy agent (skip confirmation)
vm0 compose vm0.yaml -y
# Run agent with environment file
vm0 run my-agent --artifact-name artifact --env-file=.env.local "Execute the task"jobs:
run-agent:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install VM0 CLI
run: npm install -g @vm0/cli
- name: Run Agent
env:
VM0_TOKEN: ${{ secrets.VM0_TOKEN }}
run: |
vm0 compose vm0.yaml -y
vm0 run my-agent --artifact-name output --env-file=.env "Generate daily report"vm0 model-provider setup --type anthropic-api-key --credential "sk-ant-xxx"vm0 auth loginvm0 initvm0 composevm0.yamlvm0 logs# 1. Initialize project
vm0 init --name my-agent
# 2. Edit vm0.yaml and AGENTS.md
# 3. Deploy configuration
vm0 compose vm0.yaml
# 4. Run the agent
vm0 run my-agent "Execute the task"
# 5. Check logs if needed
vm0 logs <run-id># 1. Create and navigate to data directory
mkdir input-data && cd input-data
# 2. Add your files
cp ~/documents/*.pdf .
# 3. Initialize and push volume (use --name for non-interactive)
vm0 volume init --name input-data
vm0 volume push
# 4. Run agent with volume
cd ..
vm0 run my-agent "Process the documents" --volume-version input-data=latest# 1. List artifacts
vm0 artifact list
# 2. Clone the artifact locally
vm0 artifact clone my-output ./results
# 3. Or pull to existing directory
cd my-output-dir
vm0 artifact pull# Check auth status
vm0 auth status
# Re-login if needed
vm0 auth logout
vm0 auth login# List available agents
vm0 agent list
# Check if deployed
vm0 compose vm0.yaml# Use verbose mode
vm0 run my-agent "prompt" -v
# Check system logs
vm0 logs <run-id> --system