Give your AI agents an isolated home. Every sandbox is a real microVM — boots in <100ms, runs any code safely, and syncs your files to the cloud automatically.
$ npm install -g @magpiecloud/mags
$ mags run 'echo Hello World'
$ mags run -w myproject -p 'pip install flask'
$ mags new dev && mags ssh dev
from mags import Mags
client = Mags()
job = client.run("echo Hello from Python!")
print(job.logs)
# Persistent workspace
job = client.run(
script="pip install flask && python app.py",
workspace="my-app",
persist=True
)
import { Mags } from '@magpiecloud/mags';
const mags = new Mags();
const job = await mags.run('echo Hello!');
console.log(job.logs);
// Persistent workspace
const app = await mags.run({
script: 'npm install && npm start',
workspace: 'my-app',
persist: true,
});
From running untrusted code to spinning up full dev environments, Mags handles the infrastructure so you can focus on building.
Let your agents execute code in fully isolated sandboxes. No risk to your infrastructure. Every run starts clean or picks up where it left off.
Spin up a full dev environment in seconds. Install packages, clone repos, and SSH in. Workspaces persist between sessions automatically.
Upload files, run transformations, and download results. Each pipeline runs in isolation with its own filesystem and network stack.
Run your test suite in a clean environment every time. Cache dependencies with persistent workspaces and get results in seconds.
Ship a working prototype with a public URL in one command. Expose ports, serve web apps, and share instantly with your team.
Schedule recurring tasks with standard cron expressions. Scrape data, generate reports, or run health checks on autopilot.
Install the CLI, authenticate, and start running sandboxes. No Docker, no YAML, no infra to manage.
One command to install the CLI or SDK.
npm install -g @magpiecloud/mags
Log in with your browser or an API token.
mags login
Execute any script in an isolated sandbox.
mags run 'python train.py'
Mags handles compute, isolation, persistence, and networking. You bring the code.
Sandboxes start in milliseconds. No cold starts, no waiting. Your agents get compute instantly.
Every sandbox is a real microVM with its own kernel, filesystem, and network. Not a container.
Files sync to the cloud automatically with -p. Pick up exactly where you left off, every time.
Expose any port with HTTPS URLs. SSH into running sandboxes for debugging. Full network access.
Use the CLI for quick tasks, Python or Node.js SDKs for automation, or the REST API for full control.
Keep sandboxes running 24/7 as lightweight servers. Auto-recovery if they crash. Perfect for background services.
First-class support for CLI, Python, Node.js, and a full REST API. Pick what fits your stack.
# Install npm install -g @magpiecloud/mags # Run a script mags run 'pip install pandas && python analyze.py' # Persistent workspace with file upload mags run -w myproject -p -f data.csv 'python process.py' # SSH into a running sandbox mags new dev-env && mags ssh dev-env # Expose a web server mags run -w webapp -p --url 'npm start'
from mags import Mags client = Mags() # Simple script execution job = client.run("echo Hello World") print(job.logs) # With persistent workspace job = client.run( script="pip install flask && python app.py", workspace="my-app", persist=True, url=True # expose public URL ) print(f"App running at: {job.url}") # Upload files and process them job = client.run( script="python train.py", files=["model.py", "data.csv"], workspace="ml-training", persist=True )
import { Mags } from '@magpiecloud/mags'; const mags = new Mags(); // Simple script execution const job = await mags.run('echo Hello World'); console.log(job.logs); // With persistent workspace const app = await mags.run({ script: 'npm install && npm start', workspace: 'my-app', persist: true, url: true, }); console.log(`App running at: ${app.url}`);
# Submit a job curl -X POST https://api.magpiecloud.com/api/v1/mags-jobs \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "script": "echo Hello World", "type": "inline" }' # Check job status curl https://api.magpiecloud.com/api/v1/mags-jobs/$JOB_ID \ -H "Authorization: Bearer $TOKEN" # Get logs curl https://api.magpiecloud.com/api/v1/mags-jobs/$JOB_ID/logs \ -H "Authorization: Bearer $TOKEN"
Use Mags as the execution layer for any AI framework. Give your agents the power to run real code safely.
Install the Mags skill and let Claude execute scripts in isolated microVMs directly from your conversation.
Use the REST API or SDKs as a tool in LangChain, LlamaIndex, CrewAI, or any agent framework you prefer.