Looking for an
E2B alternative?
A Linux computer for your AI agent, with usage pricing and a spending cap. Run commands, upload files, SSH in, and open web previews. From $5/month.
SSH, custom images, and open source.
import { Mainbrella } from '@mainbrella/sdk';
const client = new Mainbrella({
apiKey: process.env.MAINBRELLA_API_KEY
});
const machine = await client.create({
catalogId: 'node', size: 'small'
});
try {
const result = await machine.commands.run(
'node --version'
);
console.log(result.stdout);
} finally { await machine.kill(); }
Predictable spend. A computer you can inspect.
A spending cap you control
A $5 one-time top-up adds $5 of compute credit. Compute costs $0.02 per unit-hour, with a separate monthly spending cap. Unused credit carries forward.
See the rates →Get inside the machine
Inspect the same environment your agent uses through SSH or the browser terminal. Run a dev server and open a temporary web preview.
SSH and terminal access →Bring your environment
Use a supplied runtime or build a custom image from your Dockerfile. JavaScript, Python, and HTTP interfaces connect it to your application.
Custom images →
How pricing differs from E2B
E2B offers a free Hobby plan with a one-time usage credit and paid plans with separate compute usage charges. Mainbrella offers prepaid compute with a $5 minimum top-up and a configurable monthly spending cap. Compare your runtime, machine size, and concurrency before switching.
Provider pricing: E2B’s official pricing · Reviewed October 6, 2026.
Before you start
Can I replace the E2B SDK without changing my code?
No. Mainbrella has its own JavaScript and Python SDKs and HTTP API. Adapt your creation, command, file, and cleanup calls; start with one representative workload.
What happens when I reach a limit?
New starts are blocked when your start or compute allowance is exhausted. Machine deadlines enforce reserved runtime. Usage sessions last up to 24 hours, with a 30-minute idle timeout. See the full limits before choosing a plan.
Does a saved workspace resume a running agent?
No. Saved workspaces preserve filesystem snapshots and restore into a fresh container. They do not preserve running processes or conversation state. Export or save your files before stopping.
Is Mainbrella open source?
Mainbrella publishes its platform source for inspection and self-hosting. Hosted accounts use Mainbrella’s managed service. See the repositories and license details.
Try your actual workload.
Start with usage billing, create an API key, and run your first machine. Need help checking fit? Talk to Andrew.
Start building — $5 minimumWorks with your agent.
Use skill instructions with a coding agent, or connect HTTP tools in your application.
Five-step setup instructions
Step 1: Set up Mainbrella
Read https://mainbrella.com/SKILL.md and follow its Quick Setup. It covers the API key handoff (MAINBRELLA_API_KEY, starts with mb_), prerequisites, and the read-only doctor command. Ask the user only where the skill says to.
Step 2: Detect the project
Do not ask. package.json means JavaScript/TypeScript, pyproject.toml or requirements.txt means Python, Cargo.toml means Rust, and go.mod means Go. An empty directory gets a minimal Python project in a new subdirectory unless the user named a language.
Step 3: Integrate
Follow the skill's HTTP workflow, matching the project's package manager, module format, and environment loading. Select an available image for the project. If agent or tool-calling code already exists, wire Mainbrella in where command execution happens and keep the existing conventions.
Step 4: Verify
Run the skill's verification script: create a container, run echo "hello from mainbrella", check stdout and exit code, and stop the created container in a finally block. Pass means stdout "hello from mainbrella", exit code 0, and cleanup completed. If it fails, follow Troubleshooting and re-run once only after cleanup is confirmed and allowance permits. Preserve existing containers.
Step 5: Report
One paragraph: what changed, what ran, and what you verified. Then offer one next step from the skill: a custom image, an LLM tool that runs commands, or a coding agent running inside a container.