Mastra with CreateOS Sandbox
Use Mastra with CreateOS Sandbox: Mastra gives you the agent, memory, workflows and tracing, and its own docs say LocalSandbox is not isolated or secure by default, pointing to remote sandbox providers instead. A Mastra tool can call the CreateOS TypeScript SDK to create a micro-VM, run the agent's code there and destroy it. Mastra decides what to do; CreateOS is where the untrusted code runs.
Pricing at a Glance
CreateOS rates verified 17 October 2026. Mastra pricing as published on 17 October 2026. Rates billed per GB rather than per GiB, or as bundled sizes, are quoted as published rather than converted.
CreateOS Sandbox
- Compute
- $0.0362 /vCPU-hr
- Memory
- $0.0116 /GiB-hr
Mastra
Mastra Platform Starter is $0/month with 24 CPU hours and 100K events, Teams is $250/month with 250 CPU hours, extra CPU hours cost $0.35 or $0.25, egress past the included amount is $0.10/GB, and the framework is free under Apache 2.0, as of 17 October 2026.
What CreateOS Sandbox Adds
What CreateOS Sandbox brings to this matchup, with a plain note on where Mastra has the edge.
A remote, isolated place for Mastra agents to execute code: one Firecracker micro-VM per sandbox.
Egress allowlists enforced on the host, so a tool call cannot widen its own network access from inside the VM.
Pause an agent's workspace between workflow steps and fork it to explore alternatives.
Where Mastra is strong
A complete agent framework rather than a runtime alone: memory, workflows, evals, observability and a pluggable sandbox interface in one TypeScript codebase, open source under Apache 2.0.
Which to Pick
Pick CreateOS Sandbox if
- Your Mastra agent runs code it wrote and you want it isolated from your server
- You want per-run egress rules for agent tools
- You want to pause a workspace and resume it on a later workflow step
Pick Mastra if
- You want a TypeScript framework for agents, workflows and RAG
- You want hosted Studio, tracing and evals
- You want to self-host the framework under Apache 2.0
Head-to-Head Comparison
Every dimension side by side, checked on 17 October 2026 against each vendor's own docs and pricing pages. "Not published" means we could not find it on the vendor's pages, not that the feature is missing.
| Dimension | CreateOS Sandbox | Mastra |
|---|---|---|
| Built for | Running agent-written and untrusted code in isolated machines | Building TypeScript agents, tools, workflows and RAG, then hosting them on Mastra Platform or any Node host |
| Isolation | Firecracker micro-VM with its own guest kernel | Not published for Platform hosting; code execution delegated to a Workspace sandbox provider (local Seatbelt/Bubblewrap or remote providers) |
| Ephemeral per-run environments | Yes. Create a sandbox per task by API, SDK, CLI or MCP and destroy it after | Depends on the chosen sandbox provider |
| Pause and resume | Yes. Saves disk, memory and CPU state; vCPU stops billing while paused, memory and storage still bill | Depends on the sandbox provider; Persistent Server option keeps the server running 24/7 |
| Outbound network | Open with no rules; deny-by-default once any rule exists (host, IP, CIDR, wildcard), enforced on the host outside the VM | Depends on the sandbox provider; LocalSandbox native isolation can block network by default |
| Billing | Per second: $0.03616363/vCPU-hr, $0.01159025/GiB-hr, storage $0.0001584/GB-hr; no egress fees (50 GiB bandwidth budget per sandbox by default) | Monthly plan with included CPU hours, events and egress; framework free |
| Run untrusted code | Yes, the core use case; each sandbox is its own micro-VM | Through a sandbox provider; docs say LocalSandbox is not isolated or secure by default |
Common Questions
Does Mastra run agent code itself?
Mastra hands code execution to a Workspace sandbox provider. Locally that can use Seatbelt or Bubblewrap; remotely its docs list providers such as E2B, Daytona, Modal, Vercel, Cloudflare Sandbox and Docker. Its docs also say LocalSandbox is not isolated or secure by default.
How do I call CreateOS Sandbox from a Mastra agent?
Write a Mastra tool that uses the CreateOS TypeScript SDK or REST API: create a sandbox, exec the agent's command, read the output, then destroy the sandbox or pause it for the next step. Add an egress allowlist if the code should reach only certain hosts.
Who bills for what when I use Mastra and CreateOS together?
Mastra Platform bills its plan, CPU hours, observability events and egress for the hosted agent. CreateOS bills each sandbox per second for vCPU, memory and storage while it runs, and charges no egress fees within the default 50 GiB bandwidth budget per sandbox.
Sources
Checked 17 October 2026.
See CreateOS Sandbox for yourself
Book a demo, or explore the Sandbox and its pricing.