e2b-dev / e2b-dev/code-interpreter
Feature Request] Support Webhook/Callback for long-running code execution results
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 228
- Avg merge
- 48m
- Merged PRs (30d)
- 5
Description
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"}
)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing sandbox.run_code, on_result, and on_stdout APIs first. Define how callback_url and metadata should be accepted and how long-running execution results are delivered through the webhook, then verify that clients no longer need to keep the SDK connection open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100