+
+
+### BYOC Cluster Components
+- **Orchestrator**: Represents a node that is responsible for managing sandboxes and their lifecycle. Optionally, it can also run the template builder component.
+- **Edge Controller**: Routes traffic to sandboxes, exposes API for cluster management, and gRPC proxy used by E2B control plane to communicate with orchestrators.
+- **Monitoring**: Collector that receives sandbox and build logs and system metrics from orchestrators and edge controllers. Only anonymized metrics are sent to the E2B Cloud for observability purposes.
+- **Storage**: Persistent storage for sandbox templates, snapshots, and runtime logs. Image container repository for template images.
+
+## Onboarding
+
+Customers can initiate the onboarding process by reaching out to us.
+Customers need to have a dedicated AWS account and know the region they will use.
+After that, we will receive the IAM role needed for managing account resources.
+For AWS account quota limits may need to be increased.
+
+Terraform configuration and machine images will be used for provisioning BYOC cluster.
+When provisioning is done and running, we will create a new team under your E2B account that can be used by SDK/CLI the same way as it is hosted on E2B Cloud.
+
+## FAQ
+
+
+
+
+### Full final code
+Check the full code in JavaScript and Python below:
+
+
\ No newline at end of file
diff --git a/apps/web/src/app/(docs)/mintlify-docs/code-interpreting/streaming/index.mdx b/apps/web/src/app/(docs)/mintlify-docs/code-interpreting/streaming/index.mdx
new file mode 100644
index 0000000000..7120f9401f
--- /dev/null
+++ b/apps/web/src/app/(docs)/mintlify-docs/code-interpreting/streaming/index.mdx
@@ -0,0 +1,141 @@
+---
+title: "Streaming"
+---
+
+Use E2B SDK allows you to stream the output, and results when executing code in the sandbox.
+
+
+## Stream `stdout` and `stderr`
+When using the `runCode()` method in JavaScript or `run_code()` in Python you can pass `onStdout`/`on_stdout` and `onStderr`/`on_stderr` callbacks to handle the output.
+
+'
+const execution = await sandbox.notebook.execCell(code)
+
+// There was an error during execution, return the error and its traceback
+if (execution.error) {
+ return `There was an error during execution: ${execution.error.name}: ${execution.error.value}.\n
+ ${execution.error.traceback}`
+}
+
+// The execution has some result, summarize to LLM, what are the results
+if (execution.results.length > 0) {
+ let message = 'These are results of the execution:\n'
+ let counter = 1
+ for (const result of execution.results) {
+ message += `Result ${counter++}:\n`
+ if (result.isMainResult) {
+ message += `[Main result]: ${result.text}\n`
+ } else {
+ message += `[Display data]: ${result.text}\n`
+ }
+ if (result.formats().length > 0) {
+ message += `It has following formats: ${result.formats()}\n`
+ }
+ }
+
+ return message
+}
+
+// There were no results, check if there was something is stdout/err
+if (
+ execution.logs.stdout.length > 0 ||
+ execution.logs.stderr.length > 0
+) {
+ let message = 'There was no result of the execution, but here are the logs:\n'
+ if (execution.logs.stdout.length > 0) {
+ message += `Stdout: ${execution.logs.stdout.join('\n')}\n`
+ }
+ if (execution.logs.stderr.length > 0) {
+ message += `Stderr: ${execution.logs.stderr.join('\n')}\n`
+ }
+
+ return message
+}
+
+return 'There was no output of the execution.'
+```
+
+```python Python
+code = ""
+execution = sandbox.notebook.exec_cell(code)
+
+# There was an error during execution, return the error and its traceback
+if execution.error:
+ return (
+ f"There was an error during execution: {execution.error.name}: {execution.error.value}.\n"
+ f"{execution.error.traceback}"
+ )
+
+# The execution has some result, summarize to LLM, what are the results
+if execution.results:
+ message = "These are results of the execution:\n"
+ for i, result in enumerate(execution.results):
+ message += f"Result {i + 1}:\n"
+ if result.is_main_result:
+ message += f"[Main result]: {result.text}\n"
+ else:
+ message += f"[Display data]: {result.text}\n"
+
+ if result.formats():
+ message += f"It has also following formats: {result.formats()}\n"
+
+ return message
+
+# There were no results, check if there was something is stdout/err
+if execution.logs.stdout or execution.logs.stderr:
+ message = "There was no result of the execution, but here are the logs:\n"
+ if execution.logs.stdout:
+ message += "Stdout: " + "\n".join(execution.logs.stdout) + "\n"
+
+ if execution.logs.stderr:
+ message += "Stderr: " + "\n".join(execution.logs.stderr) + "\n"
+
+ return message
+
+return "There was no output of the execution."
+```
+
+
diff --git a/apps/web/src/app/(docs)/mintlify-docs/legacy/hello-world/py/index.mdx b/apps/web/src/app/(docs)/mintlify-docs/legacy/hello-world/py/index.mdx
new file mode 100644
index 0000000000..146c7c2e4e
--- /dev/null
+++ b/apps/web/src/app/(docs)/mintlify-docs/legacy/hello-world/py/index.mdx
@@ -0,0 +1,256 @@
+---
+title: "Hello World.py"
+---
+
+
+
diff --git a/apps/web/src/app/(docs)/mintlify-docs/legacy/index.mdx b/apps/web/src/app/(docs)/mintlify-docs/legacy/index.mdx
new file mode 100644
index 0000000000..9b1f174f18
--- /dev/null
+++ b/apps/web/src/app/(docs)/mintlify-docs/legacy/index.mdx
@@ -0,0 +1,53 @@
+---
+title: "Code interpreting for your AI app"
+---
+
+
+
+
+E2B Sandboxes are made exactly to solve these challenges. The sandbox is like an isolated runtime or playground for the LLM. **We give you our SDK to spawn and control these sandboxes.**
+
+
+## How sandboxes work under the hood
+When you create a new sandbox session, we start a small VM in our cloud. This VM is running a Ubuntu OS and it takes about 400-600ms to start it.
+
+Inside this sandbox, your AI app can [run code and start any programs](/legacy/sandbox/api/process), access the internet to download or upload data, use the [filesystem](/legacy/sandbox/api/filesystem), start long running processes such as web servers, and more.
+You can also [upload](/legacy/sandbox/api/upload) to sandbox and [download](/legacy/sandbox/api/upload) from sandbox any file you want.
+
+To start and control the sandbox, use the [E2B SDK](/legacy/getting-started/installation) for Python or JavaScript.
+
+
+
+
+
+
+
+## `e2b.Dockerfile`
+The Dockerfile must be Debian based (e.g. Ubuntu). Only the following [Dockerfile commands](https://docs.docker.com/engine/reference/builder/) are supported:
+ - `FROM`
+ - `ADD`
+ - `COPY`
+ - `RUN`
+ - `WORKDIR`
+ - `ARG`
+
+## Example
+
+The following example template file defines a Ubuntu-based sandbox with installed GitHub CLI.
+
+
+
+
+
+### State descriptions
+
+- **Running**: The sandbox is actively running and can execute code. This is the initial state after creation.
+- **Paused**: The sandbox execution is suspended but its state is preserved.
+- **Killed**: The sandbox is terminated and all resources are released. This is a terminal state.
+
+### Changing sandbox's state
+
+| Plan | +Hobby | +Pro | +Enterprise | +
|---|---|---|---|
| Sandbox lifecycle & management API | +20,000 / 30s | +20,000 / 30s | +Custom | +
| Sandbox operations | +40,000 / 60s per IP | +40,000 / 60s per IP | +Custom | +
| Concurrent sandboxes | +20 | +100 - 1,100* | +Custom | +
| Sandbox creation rate | +1 / sec | +5 / sec | +Custom | +