Appearance
Virtual Machine
Configurable Linux containers with per-second billing for complex computing tasks - from lightweight scripts to ML workloads.
Overview
Virtual Machine is a built-in capability that provides AI agents with real computing power through full-featured Linux containers. When enabled on your MCP Gateway, agents can install any Python, Node.js, or system packages - from pandas and TensorFlow to ffmpeg and Playwright. Each session gets its own dedicated container with direct access to session storage.
Key Features
- Configurable Sizes: Choose from 5 sizes (XS to XL) to match your workload - 0.5 to 8 vCPUs
- Full Package Access: Install any Python, Node.js, or system packages via pip, npm, or apt-get
- Session Filesystem Integration: Direct access to session storage (working, input, output directories)
- Complete OS Access: Full Linux environment with shell access
- Per-Second Billing: Pay only for what you use with transparent per-second pricing
How to Enable
- Navigate to your MCP Gateway settings
- Locate Virtual Machine in the Built-in Capabilities section
- Toggle the capability ON
- Save your configuration
Once enabled, any AI agent connected to your gateway can execute commands in a Linux container.
What AI Agents Can Do
Data Science and Analytics
- Process datasets with pandas and numpy
- Train machine learning models with scikit-learn
- Perform deep learning with TensorFlow or PyTorch
- Generate visualizations with matplotlib and seaborn
- Run statistical analysis with scipy
Web Automation
- Scrape dynamic websites with Selenium
- Automate browser interactions with Playwright
- Extract data from complex web applications
- Handle JavaScript-rendered content
- Process and store scraped data
Media Processing
- Process images with OpenCV or PIL
- Transcode videos with ffmpeg
- Generate thumbnails and previews
- Apply computer vision algorithms
- Perform OCR on documents
Development Workflows
- Install and test packages
- Run build processes
- Execute shell scripts
- Compile code in various languages
- Manage dependencies
Default Environment
- Base OS: Latest stable Linux with Python and Node.js
- Package Managers: apt-get, pip, npm
- Shell: bash with full system access
Install any software using standard package managers or build from source.
When to Use Virtual Machine vs Code Runner
Use Virtual Machine for:
- Data science with specialized libraries (pandas, numpy, tensorflow)
- Machine learning model training
- Web scraping and browser automation
- Media file processing (ffmpeg, OpenCV)
- Any workflow requiring package installation
- File system operations
- Long-running computations (choose appropriate size for your workload)
Use Code Runner for:
- Quick calculations (< 1 second)
- Simple data transformations
- Standard library operations only
- Stateless computations
- Sub-10ms latency requirements
Typical Applications
Research and Analysis
AI agents analyze large datasets, train predictive models, and generate detailed reports with visualizations using pandas, scikit-learn, and matplotlib.
Automated Testing
Agents run comprehensive test suites with Selenium or Playwright, validate APIs, and execute integration tests across different environments.
Content Processing
Agents process media files with ffmpeg, extract text with OCR tools, generate thumbnails, apply filters, and perform batch conversions.
Data Pipeline Automation
Agents build ETL pipelines, transform data formats, and orchestrate complex multi-step processing workflows with persistent intermediate storage.
Pricing
Size-Based Per-Second Pricing
VM pricing is based on a unit rate of $0.000015/second (XS size). Larger sizes are simple multiples of this base rate:
Size | vCPUs | Memory (MB) | Cost/Second | Multiplier | Example: 10 min |
---|---|---|---|---|---|
XS | 0.5 | 512 | $0.000015 | 1× | $0.009 |
SM | 1.0 | 1024 | $0.000030 | 2× | $0.018 |
MD | 2.0 | 2048 | $0.000060 | 4× | $0.036 |
LG | 4.0 | 4096 | $0.000120 | 8× | $0.072 |
XL | 8.0 | 8192 | $0.000240 | 16× | $0.144 |
Cost Examples
Lightweight Script (5 minutes, XS)
- 5 min × 60 sec = 300 seconds
- 300 × $0.000015 = $0.0045
Data Analysis (30 minutes, MD)
- 30 min × 60 sec = 1,800 seconds
- 1,800 × $0.000060 = $0.108
ML Training (2 hours, XL)
- 2 hours × 3,600 sec = 7,200 seconds
- 7,200 × $0.000240 = $1.728
Cost Optimization
- Choose the right size for your workload (start small, scale up if needed)
- VMs auto-terminate after 10 minutes of idleness
- Session storage persists across VM lifecycles
- Pay per-second - no minimum duration charges
Limitations
Container Constraints
- Idle Timeout: 10 minutes of inactivity (auto-terminates to save costs)
- Storage: Session-scoped only (use Files capability for persistence)
- Network: Outbound only, inbound connections blocked
- Sizes: 5 predefined sizes (XS to XL) - choose the one closest to your needs
Security Constraints
- No root/sudo access
- No kernel modifications
- No container orchestration
- Sandboxed execution environment
Resource Fair Use
- Resources allocated based on platform capacity
- Excessive consumption may be throttled
- One container per session at a time
Next Steps
Related Capabilities
- Code Runner - For quick computations with standard libraries only
- Files - For persistent file storage across sessions
- HTTP Client - For API calls without VM overhead
Platform Features
- All Capabilities - Explore other built-in tools
- MCP Gateway - Configure your gateway
- Usage & Limits - Understand platform constraints