Repository navigation
Description
Hi, substrate community, we're building our agent infrastructure for our own RSI agents, mostly for evaluations and RL scenarios. We think substrate is a good fit for our needs on top of Kubernetes, so we want to understand how it compares to E2B in terms of API capabilities and lifecycle management as we hope to have one API for all our agents (we mostly run on Kubernetes, but we support other sandbox providers as well for some reason).
The comparison is structured around key areas of the sandbox lifecycle and core operations, but it does not imply that Substrate should adopt all these features. It is meant to help us and the community understand where the two systems align and where there are gaps.
I can help to keep this update to make it easier for the community to track the differences and gaps between E2B and Substrate if it makes sense.
If I misunderstand any aspect of Substrate's capabilities, please correct me. Thanks.
Sandbox lifecycle
| E2B SDK | Substrate | Status | Notes |
|---|---|---|---|
Sandbox.create() |
CreateActor + ResumeActor |
✅ | Would it be good to support batch OP? |
Sandbox.connect() |
ResumeActor |
✅ | |
sandbox.pause() |
SuspendActor |
✅ | |
sandbox.kill() |
DeleteActor |
✅ | |
sandbox.getInfo(), isRunning() |
GetActor |
✅ | |
Sandbox.list({query: {metadata, state}}) |
ListActors |
🟡 | No filter by metadata or state |
create({metadata}) |
— | ❌ | No labels on actors |
create({timeout, lifecycle: {onTimeout}}), setTimeout() |
— | ❌ | No expiry. Support auto-kill or auto-pause on timeout based on policy |
create({envVars}) |
template containers[].env |
❌ | Env is set per template, not per actor |
create({cpuCount}) |
template resources |
🟡 | Set per template, not per actor |
Snapshot and fork
An E2B snapshot maps to a Substrate Tag: a named, permanent copy of an actor's snapshot that can start new actors.
| E2B SDK | Substrate | Status | Notes |
|---|---|---|---|
sandbox.createSnapshot() |
SuspendActor + CreateTag |
🟡 | Works, but the actor stays suspended after the snapshot. E2B keeps it running |
Sandbox.listSnapshots({sandboxId, name}) |
ListTags, GetTag |
🟡 | 1. List all snapshots: ✅ ListTags lists every tag in an atespace.2. List snapshots taken from one sandbox ( sandboxId): 🟡 no server filter. List all tags and keep those whose source_actor matches.3. Find snapshots by name ( name): 🟡 E2B can save many snapshots under one name and returns them all. A Substrate tag name points to exactly one snapshot, fetched with GetTag. |
Sandbox.deleteSnapshot() |
DeleteTag |
✅ | |
Sandbox.create(snapshotId) |
CreateActor(source_tag) |
✅ | |
Sandbox.fork(id, {count}) |
SuspendActor → CreateTag → CreateActor(source_tag) × N |
🟡 | We want one call that copies a running actor into N new actors, while the original keeps running. We use it for group rollouts, tree search, and retrying from a checkpoint |
Commands and PTY
Core Substrate has no exec API, it uses agent-substrate/env, an alpha (v1alpha) project on top of Substrate. Its ate-env-guest daemon runs inside each actor, like E2B's envd.
| E2B SDK | Substrate | Status | Notes |
|---|---|---|---|
commands.run({cwd, envs, timeout}) |
StartProcess + StreamProcessOutput |
✅ | |
commands.connect() |
StreamProcessOutput with offsets |
✅ | Reattach and continue reading output |
commands.kill() |
SignalProcess |
✅ | Signals the whole process group |
commands.sendStdin(), closeStdin() |
WriteProcessInput |
✅ | close sends EOF |
pty.create(), resize(), sendInput() |
— | ❌ | No TTY support, useful for debugging |
Filesystem
These rows also use agent-substrate/env.
| E2B SDK | Substrate | Status | Notes |
|---|---|---|---|
files.read() |
ReadFile |
✅ | Streamed in chunks |
files.write(), writeFiles() |
WriteFile |
🟡 | One file per call; no batch like writeFiles(). For many files, upload a tar and extract it |
files.list(), exists(), getInfo(), makeDir(), rename(), remove() |
StartProcess (ls, stat, mkdir, mv, rm) |
🟡 | No file API for these. Run shell commands instead; output is text, not structured |
files.watchDir() |
— | ❌ |
Network egress
| E2B SDK | Substrate | Status | Notes |
|---|---|---|---|
create({network: {allowOut}}) |
EgressPolicy rules |
✅ | |
create({network: {denyOut}}) |
— | 🟡 | Substrate blocks everything by default and allows by hostname, so "block all, allow a list" works. "Allow all, block a few IPs" has no equivalent |
updateNetwork() |
UpdateActorEgressPolicy |
✅ | |
create({network: {rules}}) header transforms |
EgressPolicy replace_headers |
✅ | Works by replacing a placeholder the code sends (e.g. OPENAI_API_KEY=placeholder). |
create({network: {egressProxy}}) |
— | ❌ | E2B lets each sandbox send its outbound traffic through its own SOCKS5 proxy. Substrate has no upstream proxy |
Templates
| E2B SDK | Substrate | Status | Notes |
|---|---|---|---|
Template.list(), exists() |
ListActorTemplates, GetActorTemplate |
✅ | |
Template.delete() |
DeleteActorTemplate |
✅ |
Volumes, secrets, identity
| E2B SDK | Substrate | Status | Notes |
|---|---|---|---|
Volume.create(), list(), destroy() |
Image volumes (read-only), per-actor external volumes | 🟡 | No shared volumes: external volumes belong to one actor and are deleted with it. We have shared datasets for evaluation, which is important to us. |
create({volumeMounts}) |
template volumes |
🟡 | Mounts are fixed in the template. Every actor from it gets the same volumes; you can't choose mounts at create time |
Secret.* CRUD |
Kubernetes Secrets via credential providers | 🟡 | No secrets API. Create Kubernetes Secrets with kubectl, then reference them in EgressPolicy as ate-secret:// URIs. Secrets are injected on egress only; actors never see them |
create({iam: {tokens}}) |
EgressPolicy actorJwt, MintActorJwt |
✅ | Egress gateway injects a fresh actor JWT for the given audience, verifiable via OIDC. Like header injection, the code sends a placeholder header |
Related issues
Issues that relate to E2B protocol compatibility and features:
Activity
BenTheElder commentedon Nov 18, 2026
Hey, thanks for your interest in substrate and contributing.
We can generate this ourselves on demand, there are already issues about e2b compat, so this is just cluttering the issue tracker.