Feature Description
Support for asynchronous code execution with a callback/webhook mechanism.
Use Case
I'm building an agent that performs long-running tasks (e.g., 10+ minutes of data analysis). Currently, I need to keep the SDK connection open to receive results via on_result or on_stdout. For these long tasks, a persistent connection is unreliable.
Proposed API
It would be great if sandbox.run_code or a similar method could accept a callback configuration:
# Conceptual example
sandbox.run_code(
code="very_long_task()",
callback_url="[https://my-api.com/v1/e2b-webhook](https://my-api.com/v1/e2b-webhook)",
metadata={"task_id": "123"}
)