use_docker
argument is set to True
by default in code executing agents. This change underscores our commitment to prioritizing security and safety in AutoGen.
UserProxyAgent
, where code execution is by default ON. Until now, unless explicitly specified by the user, any code generated by other agents would be executed by code-execution agents locally, i.e. wherever AutoGen was being executed. If AutoGen happened to be run in a docker container then the risks of running code were minimized. However, if AutoGen runs outside of Docker, it’s easy particularly for new users to overlook code-execution risks.
AutoGen has now changed to by default execute any code inside a docker container (unless execution is already happening inside a docker container). It will launch a Docker image (either user-provided or default), execute the new code, and then terminate the image, preparing for the next code execution cycle.
We understand that not everyone is concerned about this especially when playing around with AutoGen for the first time. We have provided easy ways to turn this requirement off. But we believe that making sure that the user is aware of the fact that code will be executed locally, and prompting them to think about the security implications of running code locally is the right step for AutoGen.
code_execution_config
to False
for each code-execution agent. E.g.:use_docker
can be set to False
in code_execution_config
for each code-execution agent.AUTOGEN_USE_DOCKER
to False
as an environment variable.