Skip to main content

Architecture

The overall architecture of OpenKruise Agents is shown as below:

alt

sandbox-manager

sandbox-manager is a stateless backend management component that provides E2B APIs and MCP APIs for managing and operating sandbox instances.

sandbox-gateway

sandbox-gateway is a lightweight and efficient gateway that proxy incoming traffic to the sandboxes, sandbox-gateway is built as an envoy filter.

sandbox-controller

sandbox-controller contains a group of controllers responsible for the reconcilation of resources such as sandboxset and sandboxclaim, it also provides the admission webhooks for related CRD resources。

agent-runtime

agent-runtime is a Sidecar injected into the Sandbox that provides utility services for the sandbox, including E2B envd-compatible command and file operations, dynamic CSI mounting, etc.

API

OpenKruise Agents provides K8S, E2B and MCP apis.

K8S APIs

OpenKruise Agents provides Kubernetes API in the forms of CRD,and they're targeting for platform builders and infrastructure teams.

$ kubectl get crd | grep kruise.io
checkpoints.agents.kruise.io 2026-05-19T03:49:36Z
sandboxclaims.agents.kruise.io 2026-05-19T03:49:36Z
sandboxes.agents.kruise.io 2026-05-19T03:49:36Z
sandboxsets.agents.kruise.io 2026-05-19T03:49:37Z
sandboxtemplates.agents.kruise.io 2026-05-19T03:49:37Z
sandboxupdateops.agents.kruise.io 2026-05-19T03:49:37Z

E2B APIs

OpenKruise Agents provides E2B protocol-compatible APIs

E2B Compatibility

⚠️ Important: The commands.run (command execution) and file system read/write APIs require the agent-runtime component to be injected into the Sandbox. Please ensure that your SandboxSet has configured runtimes: [{name: agent-runtime}]. For details, refer to the Runtime Injection documentation.

API CategoryAPICompatibility LevelNotes
Lifecycle ManagementcreatePartially CompatibleNetwork access control and resource management implementation pending
get_infoFully Compatible
listFully Compatible
killFully Compatible
pauseFully CompatibleDue to container ecosystem efficiency considerations, current pause implementation is asynchronous
resumeFully Compatible
connectFully Compatible
set_timeoutFully CompatibleSet the sandbox timeout (TTL), equivalent to E2B's Refresh sandbox API
Code Executionrun_codeFully CompatibleRequires e2b-code-interpreter running in main container
Command Executioncommands.runFully CompatibleRequires runtime injection of agent-runtime component
File Systemread/writeFully CompatibleRequires runtime injection of agent-runtime component
upload_url/download_urlNot SupportedUpload/download via pre-signed URL implementation pending
LogslogsNot SupportedSandbox logs retrieval implementation pending
MetricsmetricsNot SupportedSandbox metrics retrieval implementation pending
NetworknetworkNot SupportedSandbox network configuration (egress rules) implementation pending
Lifecycle Eventshttps://api.e2b.app/events/sandboxes/{sbx.sandbox_id}Not SupportedLifecycle events implementation pending
Snapshot ManagementsnapshotsFully CompatibleSpecific snapshot behavior depends on Checkpoint implementation
Template ManagementPartially CompatibleTemplate read supported, template write is not supported by design, recommend using container images as alternative
API Keys Managementteams, api-keysFully CompatibleOpenKruise Agents extension: multi-tenant API key management with team-based access control
VolumesvolumesNot SupportedPersistent volume management implementation pending