[GH-ISSUE #5] E2B API Compatibility Matrix for AgentENV #2

Open
opened 2026-10-29 14:18:12 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @LSX-s-Software on GitHub (Jul 27, 2026).
Original GitHub issue: https://github.com/kvcache-ai/AgentENV/issues/5

Context

This issue tracks AgentENV’s compatibility with E2B’s OpenAPI surface and handler semantics. The comparison checks both API shape and runtime behavior.

Comparison baseline:

Notes:

  • E2B APIs or fields marked deprecated are still compared when AgentENV implements them.
  • Cluster-wide AgentENV behavior should include services/gateway and services/scheduler, not only the per-node Rust API server.

Legend

Symbol Meaning
✅ Compatible: AgentENV implements this API/field with behavior that matches E2B’s semantics.
⚠️ Partial: AgentENV implements this API/field but with some semantic gaps or differences from E2B.
❌ Missing: AgentENV does not implement this API/field at all.
➖ Not implemented: This API/field is deprecated in E2B and AgentENV does not implement it.

Compatibility Matrix

Area E2B API AgentENV status Notes / semantic gaps
Health GET /health ✅
Auth API key, Bearer, admin auth ⚠️ AgentENV currently only support single tenant authentication via API key.
Teams GET /teams, GET /teams/{teamID}/metrics, GET /teams/{teamID}/metrics/max ❌ AgentENV currently does not support multi-tenant features.
Sandbox creation POST /sandboxes, POST /v2/sandboxes ⚠️ Core sandbox creation and network egress control rules work. E2B defaults autoPause to false, while AgentENV defaults to true. Missing or incomplete E2B semantics include mcp, iam, E2B tag/namespace template resolution, auto pause memory and maskRequestHost.
Sandbox listing Deprecated GET /sandboxes, GET /v2/sandboxes ✅
Sandbox detail GET /sandboxes/{sandboxID} ✅ Deprecated clientID is fixed to an empty string.
Sandbox lifecycle DELETE /sandboxes/{sandboxID}, deprecated POST /sandboxes/{sandboxID}/resume ✅ E2B returns 400 for invalid sandbox IDs, while AgentENV often maps to 404.
Sandbox pause POST /sandboxes/{sandboxID}/pause ⚠️ AgentENV currently does not support filesystem-only pause request (memory:false).
Sandbox fork POST /sandboxes/{sandboxID}/fork ✅ When timeout is omitted, AgentENV inherits the source sandbox timeout, while E2B uses its default timeout of 15 seconds.
Sandbox connect / TTL POST /sandboxes/{sandboxID}/connect, POST /v2/sandboxes/{sandboxID}/connect, POST /sandboxes/{sandboxID}/timeout, POST /sandboxes/{sandboxID}/refreshes ✅
Sandbox snapshot POST /sandboxes/{sandboxID}/snapshots, GET /snapshots ⚠️ Snapshot creation/listing and name filtering by snapshot ID or exact alias work. Existing template reuse and real tag/namespace semantics are not supported.
Sandbox logs GET /v2/sandboxes/{sandboxID}/logs, deprecated GET /sandboxes/{sandboxID}/logs ✅ / ➖ E2B v1 logs endpoint is deprecated and AgentENV does not implement it.
Sandbox metrics GET /sandboxes/{sandboxID}/metrics, GET /sandboxes/metrics ✅ AgentENV's bounded metric history is node-local and lost on restart.
Sandbox network PUT /sandboxes/{sandboxID}/network ⚠️ egressProxy, httpsPorts, maskRequestHost, and per-domain transform rules are not supported.
Template request POST /v3/templates ⚠️ AgentENV can create a pending build record. Gaps: E2B supports teamID, namespace validation, tags, updating an existing template by alias, and preserving public; AgentENV currently support only one build for each template, uses public=true, and does not support tags.
Template listing/detail GET /v2/templates, Deprecated GET /templates, GET /templates/{templateID} ⚠️ Endpoints exist. Several fields are fixed or simplified in AgentENV: public=true, spawnCount=0, buildCount=1, lastSpawnedAt=null.
Template update PATCH /v2/templates/{templateID}, deprecated PATCH /templates/{templateID} ❌ / ➖ Multi-tenant isolation is not implemented so all templates are "public". Updating template visibility via these APIs is also not supported.
Template delete DELETE /templates/{templateID} ✅
Template start build POST /v2/templates/{templateID}/builds/{buildID} ⚠️ Pulling from custom registries via API is not supported, but can be configured in config.toml.
Template build status/logs GET /templates/{templateID}/builds/{buildID}/status, GET /templates/{templateID}/builds/{buildID}/logs ✅
Template file upload/cache GET /templates/{templateID}/files/{hash} ❌ Uploading and caching of template files is not implemented.
Template tags POST /templates/tags, DELETE /templates/tags, GET /templates/{templateID}/tags ❌ Tag assignment, deletion, and listing APIs are not implemented.
Template aliases GET /templates/aliases/{alias} ⚠️ Namespaces and teams are not supported.
Nodes / cluster view GET /nodes, GET /nodes/{nodeID} ⚠️ AgentENV omits E2B's statusChangedAt, maxSandboxes, and outstandingWork fields.
Node admin action POST /nodes/{nodeID} ❌ Node administration functionality is not implemented.
Admin operations POST /admin/teams/{teamID}/sandboxes/kill, POST /admin/teams/{teamID}/builds/cancel, GET /admin/sandboxes/running-counts ❌ Team-wide admin running-count/kill/cancel APIs are currently not implemented.
API keys GET/POST /api-keys, PATCH/DELETE /api-keys/{apiKeyID}, POST /admin/teams/{teamID}/api-keys, DELETE /admin/teams/{teamID}/api-keys/{apiKeyID} ❌ API-key management API and multi-tenant features are currently not implemented.
Volumes GET/POST /volumes, GET/POST/DELETE /volumes/{volumeID} ⚠️ AENV supports exclusive and read-only volume which can be forked and snapshotted with the sandbox. Shared-write volume and direct content access are not supported yet.
Secrets GET/POST /secrets, GET/POST/DELETE /secrets/{secretID} ❌ Not supported.
Rig administration GET /clusters/{clusterID}/rigs, PUT /clusters/{clusterID}/rigs/{rigID}/capacity, DELETE /clusters/{clusterID}/rigs/instances/{instanceID}, GET /clusters/{clusterID}/rigs/{rigID}/instances, GET /clusters/{clusterID}/rigs/{rigID}/errors ❌ Rig/autoscaling administration are not supported.
Sandbox events GET /events/sandboxes, GET /events/sandboxes/{sandboxID} ❌ Not supported.
Event webhooks GET/POST /events/webhooks, GET/PATCH/DELETE /events/webhooks/{webhookID}, GET /events/webhooks/{webhookID}/deliveries, GET /events/webhooks/{webhookID}/stats ❌ Webhook is not supported. But has similar features like the custom extension API.
Originally created by @LSX-s-Software on GitHub (Jul 27, 2026). Original GitHub issue: https://github.com/kvcache-ai/AgentENV/issues/5 ## Context This issue tracks AgentENV’s compatibility with E2B’s OpenAPI surface and handler semantics. The comparison checks both API shape and runtime behavior. Comparison baseline: - AgentENV: 875faeecfbc2c69eed709de06764003b86ac5c28. - E2B: https://github.com/e2b-dev/infra/commit/9ddcf8a7ed5c27f8b668f886dd8b4b6750a8aedc. Notes: - E2B APIs or fields marked deprecated are still compared when AgentENV implements them. - Cluster-wide AgentENV behavior should include services/gateway and services/scheduler, not only the per-node Rust API server. ## Legend | Symbol | Meaning | |:-:|---| | ✅ | **Compatible:** AgentENV implements this API/field with behavior that matches E2B’s semantics. | | ⚠️ | **Partial:** AgentENV implements this API/field but with some semantic gaps or differences from E2B. | | ❌ | **Missing:** AgentENV does not implement this API/field at all. | | ➖ | **Not implemented:** This API/field is deprecated in E2B and AgentENV does not implement it. | ## Compatibility Matrix | Area | E2B API | AgentENV status | Notes / semantic gaps | |---|---|:-:|---| | Health | `GET /health` | ✅ | | | Auth | API key, Bearer, admin auth | ⚠️ | AgentENV currently only support single tenant authentication via API key. | | Teams | `GET /teams`, `GET /teams/{teamID}/metrics`, `GET /teams/{teamID}/metrics/max` | ❌ | AgentENV currently does not support multi-tenant features. | | Sandbox creation | `POST /sandboxes`, `POST /v2/sandboxes` | ⚠️ | Core sandbox creation and network egress control rules work. E2B defaults `autoPause` to `false`, while AgentENV defaults to `true`. Missing or incomplete E2B semantics include `mcp`, `iam`, E2B tag/namespace template resolution, auto pause memory and `maskRequestHost`. | | Sandbox listing | Deprecated `GET /sandboxes`, `GET /v2/sandboxes` | ✅ | | | Sandbox detail | `GET /sandboxes/{sandboxID}` | ✅ | Deprecated `clientID` is fixed to an empty string. | | Sandbox lifecycle | `DELETE /sandboxes/{sandboxID}`, deprecated `POST /sandboxes/{sandboxID}/resume` | ✅ | E2B returns `400` for invalid sandbox IDs, while AgentENV often maps to `404`. | | Sandbox pause | `POST /sandboxes/{sandboxID}/pause` | ⚠️ | AgentENV currently does not support filesystem-only pause request (`memory:false`). | | Sandbox fork | `POST /sandboxes/{sandboxID}/fork` | ✅ | When `timeout` is omitted, AgentENV inherits the source sandbox timeout, while E2B uses its default timeout of 15 seconds. | | Sandbox connect / TTL | `POST /sandboxes/{sandboxID}/connect`, `POST /v2/sandboxes/{sandboxID}/connect`, `POST /sandboxes/{sandboxID}/timeout`, `POST /sandboxes/{sandboxID}/refreshes` | ✅ | | | Sandbox snapshot | `POST /sandboxes/{sandboxID}/snapshots`, `GET /snapshots` | ⚠️ | Snapshot creation/listing and `name` filtering by snapshot ID or exact alias work. Existing template reuse and real tag/namespace semantics are not supported. | | Sandbox logs | `GET /v2/sandboxes/{sandboxID}/logs`, deprecated `GET /sandboxes/{sandboxID}/logs` | ✅ / ➖ | E2B v1 logs endpoint is deprecated and AgentENV does not implement it.| | Sandbox metrics | `GET /sandboxes/{sandboxID}/metrics`, `GET /sandboxes/metrics` | ✅ | AgentENV's bounded metric history is node-local and lost on restart. | | Sandbox network | `PUT /sandboxes/{sandboxID}/network` | ⚠️ | `egressProxy`, `httpsPorts`, `maskRequestHost`, and per-domain transform `rules` are not supported. | | Template request | `POST /v3/templates` | ⚠️ | AgentENV can create a pending build record. Gaps: E2B supports `teamID`, namespace validation, tags, updating an existing template by alias, and preserving `public`; AgentENV currently support only one build for each template, uses `public=true`, and does not support tags. | | Template listing/detail | `GET /v2/templates`, Deprecated `GET /templates`, `GET /templates/{templateID}` | ⚠️ | Endpoints exist. Several fields are fixed or simplified in AgentENV: `public=true`, `spawnCount=0`, `buildCount=1`, `lastSpawnedAt=null`. | | Template update | `PATCH /v2/templates/{templateID}`, deprecated `PATCH /templates/{templateID}` | ❌ / ➖ | Multi-tenant isolation is not implemented so all templates are "public". Updating template visibility via these APIs is also not supported. | | Template delete | `DELETE /templates/{templateID}` | ✅ | | | Template start build | `POST /v2/templates/{templateID}/builds/{buildID}` | ⚠️ | Pulling from custom registries via API is not supported, but can be configured in `config.toml`. | | Template build status/logs | `GET /templates/{templateID}/builds/{buildID}/status`, `GET /templates/{templateID}/builds/{buildID}/logs` | ✅ | | | Template file upload/cache | `GET /templates/{templateID}/files/{hash}` | ❌ | Uploading and caching of template files is not implemented. | | Template tags | `POST /templates/tags`, `DELETE /templates/tags`, `GET /templates/{templateID}/tags` | ❌ | Tag assignment, deletion, and listing APIs are not implemented. | | Template aliases | `GET /templates/aliases/{alias}` | ⚠️ | Namespaces and teams are not supported. | | Nodes / cluster view | `GET /nodes`, `GET /nodes/{nodeID}` | ⚠️ | AgentENV omits E2B's `statusChangedAt`, `maxSandboxes`, and `outstandingWork` fields. | | Node admin action | `POST /nodes/{nodeID}` | ❌ | Node administration functionality is not implemented. | | Admin operations | `POST /admin/teams/{teamID}/sandboxes/kill`, `POST /admin/teams/{teamID}/builds/cancel`, `GET /admin/sandboxes/running-counts` | ❌ | Team-wide admin running-count/kill/cancel APIs are currently not implemented. | | API keys | `GET/POST /api-keys`, `PATCH/DELETE /api-keys/{apiKeyID}`, `POST /admin/teams/{teamID}/api-keys`, `DELETE /admin/teams/{teamID}/api-keys/{apiKeyID}` | ❌ | API-key management API and multi-tenant features are currently not implemented. | | Volumes | `GET/POST /volumes`, `GET/POST/DELETE /volumes/{volumeID}` | ⚠️ | AENV supports exclusive and read-only volume which can be forked and snapshotted with the sandbox. Shared-write volume and direct content access are not supported yet. | | Secrets | `GET/POST /secrets`, `GET/POST/DELETE /secrets/{secretID}` | ❌ | Not supported. | | Rig administration | `GET /clusters/{clusterID}/rigs`, `PUT /clusters/{clusterID}/rigs/{rigID}/capacity`, `DELETE /clusters/{clusterID}/rigs/instances/{instanceID}`, `GET /clusters/{clusterID}/rigs/{rigID}/instances`, `GET /clusters/{clusterID}/rigs/{rigID}/errors` | ❌ | Rig/autoscaling administration are not supported. | | Sandbox events | `GET /events/sandboxes`, `GET /events/sandboxes/{sandboxID}` | ❌ | Not supported. | | Event webhooks | `GET/POST /events/webhooks`, `GET/PATCH/DELETE /events/webhooks/{webhookID}`, `GET /events/webhooks/{webhookID}/deliveries`, `GET /events/webhooks/{webhookID}/stats` | ❌ | Webhook is not supported. But has similar features like the custom extension API. |
Author
Owner

@murtuzamvista commented on GitHub (Oct 26, 2026):

Tested the E2B Python SDK against a local AgentENV (Ubuntu 24.04 arm64 VM on Apple M3 via Lima nested virt). Create, commands.run, files read/write/list, get_info, set_timeout, is_running and list all work. Data-plane calls only reached the local server after setting E2B_SANDBOX_URL=http://127.0.0.1:8000; with only E2B_API_URL set, the SDK built 49983-<id>.e2b.app hosts. Is E2B_SANDBOX_URL the intended single-node setup?

Gap I can reproduce: a malformed sandbox ID (e.g. not-a-valid-id) returns 404 sandbox <id> not found on GET, pause, fork, connect and timeout. The matrix says E2B returns 400 for invalid IDs. I’d like to take this one. Proposal: if the path ID doesn’t parse as a UUID, return 400 with a clear message; if it parses but doesn’t exist, keep 404. Does that match what you’d want, or should “invalid” be defined differently?

<!-- gh-comment-id:6421487851 --> @murtuzamvista commented on GitHub (Oct 26, 2026): Tested the E2B Python SDK against a local AgentENV (Ubuntu 24.04 arm64 VM on Apple M3 via Lima nested virt). Create, commands.run, files read/write/list, get_info, set_timeout, is_running and list all work. Data-plane calls only reached the local server after setting E2B_SANDBOX_URL=http://127.0.0.1:8000; with only E2B_API_URL set, the SDK built 49983-`<id>`.e2b.app hosts. Is E2B_SANDBOX_URL the intended single-node setup? Gap I can reproduce: a malformed sandbox ID (e.g. not-a-valid-id) returns 404 sandbox `<id>` not found on GET, pause, fork, connect and timeout. The matrix says E2B returns 400 for invalid IDs. I’d like to take this one. Proposal: if the path ID doesn’t parse as a UUID, return 400 with a clear message; if it parses but doesn’t exist, keep 404. Does that match what you’d want, or should “invalid” be defined differently?
Author
Owner

@LSX-s-Software commented on GitHub (Oct 27, 2026):

Data-plane calls only reached the local server after setting E2B_SANDBOX_URL=http://127.0.0.1:8000; with only E2B_API_URL set, the SDK built 49983-<id>.e2b.app hosts. Is E2B_SANDBOX_URL the intended single-node setup?

If E2B_SANDBOX_URL is not set, the SDK generates hosts such as <sandbox-id>.e2b.app, so the traffic is sent directly to the official E2B API. Therefore, for local usage, please set both E2B_API_URL and E2B_SANDBOX_URL.

For domain-based sandbox access, you need to deploy and configure your own DNS service.

 Gap I can reproduce: a malformed sandbox ID (e.g. not-a-valid-id) returns 404 sandbox `<id>` not found on GET, pause, fork, connect and timeout. The matrix says E2B returns 400 for invalid IDs. I’d like to take this one. Proposal: if the path ID doesn’t parse as a UUID, return 400 with a clear message; if it parses but doesn’t exist, keep 404. Does that match what you’d want, or should “invalid” be defined differently?

Please feel free to open a separate issue so we can track it independently.

<!-- gh-comment-id:6432307667 --> @LSX-s-Software commented on GitHub (Oct 27, 2026): > Data-plane calls only reached the local server after setting E2B_SANDBOX_URL=http://127.0.0.1:8000; with only E2B_API_URL set, the SDK built 49983-`<id>`.e2b.app hosts. Is E2B_SANDBOX_URL the intended single-node setup? If `E2B_SANDBOX_URL` is not set, the SDK generates hosts such as `<sandbox-id>.e2b.app`, so the traffic is sent directly to the official E2B API. Therefore, for local usage, please set **both** `E2B_API_URL` and `E2B_SANDBOX_URL`. For domain-based sandbox access, you need to deploy and configure your own DNS service. > Gap I can reproduce: a malformed sandbox ID (e.g. not-a-valid-id) returns 404 sandbox `<id>` not found on GET, pause, fork, connect and timeout. The matrix says E2B returns 400 for invalid IDs. I’d like to take this one. Proposal: if the path ID doesn’t parse as a UUID, return 400 with a clear message; if it parses but doesn’t exist, keep 404. Does that match what you’d want, or should “invalid” be defined differently? Please feel free to open a separate issue so we can track it independently.
Author
Owner

@nerdbugg commented on GitHub (Oct 27, 2026):

Hi, are there any plans for AgentENV to support E2B’s filesystem-only snapshots?
AgentENV’s current memory snapshot strategy consumes a significant amount of storage, making snapshots resource-intensive for long-running tasks. (https://github.com/kvcache-ai/AgentENV/issues/120, https://github.com/kvcache-ai/AgentENV/issues/439) For use cases that don’t require preserving memory state, it would be helpful to support filesystem-only snapshots.

<!-- gh-comment-id:6442644418 --> @nerdbugg commented on GitHub (Oct 27, 2026): Hi, are there any plans for AgentENV to support E2B’s filesystem-only snapshots? AgentENV’s current memory snapshot strategy consumes a significant amount of storage, making snapshots resource-intensive for long-running tasks. (https://github.com/kvcache-ai/AgentENV/issues/120, https://github.com/kvcache-ai/AgentENV/issues/439) For use cases that don’t require preserving memory state, it would be helpful to support filesystem-only snapshots.
Author
Owner

@yingdi-shan commented on GitHub (Oct 28, 2026):

15. Hi, are there any plans for AgentENV to support E2B’s filesystem-only snapshots?
AgentENV’s current memory snapshot strategy consumes a significant amount of storage, making snapshots resource-intensive for long-running tasks. (#120, #439) For use cases that don’t require preserving memory state, it would be helpful to support filesystem-only snapshots.

Yeah, this is on the plan, and we've implemented it internally. We need some more tests before merging the feature.

<!-- gh-comment-id:6459472069 --> @yingdi-shan commented on GitHub (Oct 28, 2026): > 15\. Hi, are there any plans for AgentENV to support E2B’s filesystem-only snapshots? > AgentENV’s current memory snapshot strategy consumes a significant amount of storage, making snapshots resource-intensive for long-running tasks. ([#120](https://github.com/kvcache-ai/AgentENV/issues/120), [#439](https://github.com/kvcache-ai/AgentENV/issues/439)) For use cases that don’t require preserving memory state, it would be helpful to support filesystem-only snapshots. Yeah, this is on the plan, and we've implemented it internally. We need some more tests before merging the feature.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#2
No description provided.