Cloud Sandboxes Made Simple

Run code in secure cloud environments

Create isolated sandboxes and runtime environments in seconds. Build AI agents, run untrusted code safely, or deploy cloud workers—all with a simple API.

Fast startup

Start new environments in under a second. No waiting, just instant sandboxes ready to run your code.

🔒

Secure & isolated

Every sandbox runs in complete isolation. Safe to run untrusted code without worrying about security.

🎯

Simple API

Control everything with a few lines of code. Create, monitor, and manage sandboxes programmatically.

Easy to use

Use the Python SDK or web console to create and manage your sandboxes. Run code, stream logs, and get results—all with just a few lines of code.

Perfect for AI agents, testing code, running CI/CD jobs, or any task that needs a clean, isolated environment.

Try the console →

Get started in minutes

pip install microvm-magpie

from magpie import Magpie

client = Magpie(api_key="YOUR_API_KEY")

# Create a sandbox and run code
run = client.jobs.create(
    name="my-sandbox",
    script="python my_script.py",
    vcpus=4,
    memory_mb=8192,
)

# Wait for it to complete
result = client.jobs.wait_for_completion(
    run["request_id"]
)

print(result.status, result.exit_code)

Customize CPU and memory for your needs.

What you can build

Use Magpie for any task that needs a clean, secure environment.

🤖 AI Agents

Let AI agents run code safely in isolated sandboxes. Perfect for coding assistants that need to execute and test code.

🧠 ML Training

Train machine learning models with custom CPU and memory. Save checkpoints between runs to resume training.

☁️ Background Jobs

Run background tasks, process webhooks, or handle scheduled jobs. Scale up as needed automatically.

🔬 Safe Code Execution

Run untrusted user code safely in isolation. Great for online coding platforms and educational tools.

⚙️ Testing & CI/CD

Run tests and builds in clean environments every time. Cache dependencies to speed up repeat runs.

📊 Data Processing

Process data with the resources you need. Monitor progress in real-time and get results when done.

More features

Remote Access with SSH

# Create a sandbox with SSH access
vm = client.jobs.create_persistent_vm(
    name="dev-box",
    script="echo ready",
    ip_lease=True,
)

print("Connect at:", vm.ip_address)

# Run commands remotely
result = client.jobs.ssh(
    vm.request_id,
    "git clone https://github.com/myrepo"
)

print(result.stdout)

Connect to running sandboxes from anywhere.

Save Files Between Runs

# First run: install dependencies
first = client.jobs.run_and_wait(
    name="setup",
    script="pip install -r requirements.txt",
    stateful=True,
    workspace_size_gb=10,
)

# Next run: reuse the workspace
second = client.jobs.run_and_wait(
    name="train",
    script="python train.py",
    stateful=True,
    workspace_id=first.request_id,
)

Reuse installed packages and files across runs.

Reusable Templates

Save sandbox configurations as templates you can reuse. Great for creating self-service tools for your team.

Live Logs

Watch logs stream in real-time as your code runs. See what's happening and monitor progress instantly.

Self-Hosted Option

Run Magpie on your own infrastructure for full control. We can help you set it up and manage it.

How it works

1. Create

Write your code or choose a template. Pick how much CPU and memory you need. Decide if you want to save files or keep it running.

2. Run

Your code starts in seconds in a clean, isolated environment. Create as many sandboxes as you need.

3. Monitor

Watch logs in real-time, get results, or connect via SSH. Stop jobs anytime or let them finish automatically.

Ready to get started?

Create your first sandbox in minutes. No credit card required.