-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft] Prototype for Docker executor #225
base: main
Are you sure you want to change the base?
Conversation
@stackviolator if you want to talk in more detail and have Slack we can open a colab there! |
Hey! I'll check these out. A slack collab would actually be great. In the process of disclosing a security issue to you guys, a docker executor would help remediate the issue :^) |
Ok I have some progress on my fork (main...stackviolator:smolagents:main) that is working fairly consistently for builtin tools. Major design differences:
I haven't tested yet with custom tools with the |
Hello @stackviolator ! Two constraints should indeed absolutely be handled
Also check the E2B executor, it can pass custom tools (via exporting the script using Tool.save()) and has state synchronisation between local and remote machine via pickling, I think this can be applied to remote tools to. |
In my solution, the additional_args dict which is passed into call is sent to the container and used during execution. These are then passed into the new instance of the LocalPythonInterpreter. Correct me if I'm wrong but I believe this is the state transfer that you're talking about. At least that's what it looks like is happening with the (un)pickling in e2b. I'm also a bit hesitant to keep a single container running throughout the lifetime of an agent. If an attacker can persist on the container during execution, various artifacts (API keys, previous code, data in the prompts) will likely pile up and defeat the purpose of having the sandbox in the first place. The idea behind the ephemeral containers was to emulate something like AWS Lambda. As for the custom tools -- yes need to support those. I'll look into how you guys are doing them for e2b and Erik's implementation :) |
cc @ErikKaum @stackviolator