Skip to content

Conversation

@eyurtsev
Copy link
Collaborator

@eyurtsev eyurtsev commented Nov 6, 2025

Add protocol extension to support shell execution

Daytona

from daytona import CreateSandboxFromSnapshotParams, Daytona, DaytonaConfig
from daytona import Daytona
from deepagents_cli.integrations.daytona import DaytonaBackend

client = Daytona()

daytona_sandbox = client.create(
    params=CreateSandboxFromSnapshotParams(
        auto_stop_interval="15",
        auto_delete_interval="15",
    )
)

backend = DaytonaBackend(daytona_sandbox)

Runloop

import os

from runloop_api_client import Runloop

client = Runloop(
    bearer_token=os.environ.get("RUNLOOP_API_KEY"),  # This is the default and can be omitted
)

devbox_view = client.devboxes.create_and_await_running()
print(devbox_view.id)

backend = RunloopBackend(devbox_id=devbox_view.id, client=client)

@@ -0,0 +1,313 @@
"""Base sandbox implementation with execute() as the only abstract method.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general design decision of "everything is execute()" way of fs ops + bash in sandbox? vs Provider specific file APIs (ex: from modal)

app = modal.App.lookup("sandbox-fs-demo", create_if_missing=True)
sb = modal.Sandbox.create(app=app)

with sb.open("test.txt", "w") as f:
f.write("Hello World\n")

f = sb.open("test.txt", "rb")
print(f.read())
f.close()

@eyurtsev eyurtsev force-pushed the eugene/sandbox_integrations branch from 26920f6 to 53e9dd0 Compare November 6, 2025 21:04
follow same structure of tools=exec but for modal

---------

Co-authored-by: Eugene Yurtsev <[email protected]>
@eyurtsev eyurtsev changed the base branch from eugene/sandbox_exec to eugene/sandbox_exec_only November 6, 2025 21:51
eyurtsev and others added 2 commits November 6, 2025 16:52
* Improve escaping logic
* Encoding payload with json, send as stdin
pattern = data['pattern']
path = data['path']

os.chdir(path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing dir here doesn't seem right, shouldn't affect state of cwd

output = result.output.rstrip()
exit_code = result.exit_code

if exit_code != 0 or "Error: File not found" in output:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we want to string match for this? seems brittle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants