AI Agent News/stories/e2b-ships-python-sdk-2-62-0-with-streaming-file-writes-and-optional-output.md

Infrastructure

E2B ships Python SDK 2.62.0 with streaming file writes and optional output retention

E2B has released version 2.62.0 of its SDK, adding an option to skip in-memory buffering of command output and streaming support for byte-chunk uploads in files.write. The release also includes breaking changes for JavaScript and Python users who rely on stream uploads or the gzip and octet-stream options.

Source: github.com/e2b-dev/E2B/releases/tag/%40e2b%2Fpython-sdk%402.62.0

E2B released @e2b/python-sdk 2.62.0 with two minor changes. The first adds a retainOutput option in JavaScript and a retain_output option in Python to commands.run and commands.connect, defaulting to true. When it is set to false, stdout and stderr are not kept in memory and read as undefined or None on the handle, result and exception, while output callbacks still receive all output.

The second change makes files.write stream iterables of byte chunks to the sandbox instead of buffering them. In Python, Sandbox accepts Iterable[bytes] and AsyncSandbox accepts AsyncIterable[bytes], and each SDK rejects the other's iterable type. Python file-like objects with a synchronous read() are now uploaded as files.

The release also contains breaking changes. In JavaScript, ReadableStream and AsyncIterable data is no longer buffered, so browsers that cannot stream request bodies throw an error, and E2B says Firefox, Safari and iOS browsers fall in that group. In both SDKs, combining gzip with octet-stream uploads turned off is now rejected as an invalid argument rather than silently overriding the setting.

Why it matters if you build agents

Agents that write large generated files can pass byte iterables straight into a sandbox without holding the whole payload in memory first. Code that sets gzip together with useOctetStream: false or use_octet_stream=False will now fail, and JavaScript code that streams data from Firefox, Safari or iOS needs to convert it to a Blob first.

Get stories like this every weekday

One short email with the day's agent tooling news.

Subscribe